X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=cb26e21961412e2cc59b41965762e3acb74965ed;hb=29bebdb50bf008a02e6c3e9530b3dff3bdd2b821;hp=e24bde9179fd884a220b05f26f170a06914b07b5;hpb=3a0c59052ace6cdd1ac23e8f6b5c5ba8cb6fffcd;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index e24bde9179..cb26e21961 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ getDebugInfo(); } common_log(LOG_ERR, $logmsg); - $msg = sprintf(_('The database for %s isn\'t responding correctly, '. - 'so the site won\'t work properly. '. - 'The site admins probably know about the problem, '. - 'but you can contact them at %s to make sure. '. - 'Otherwise, wait a few minutes and try again.'), - common_config('site', 'name'), - common_config('site', 'email')); + if ($error instanceof DB_DataObject_Error) { + $msg = sprintf(_('The database for %s isn\'t responding correctly, '. + 'so the site won\'t work properly. '. + 'The site admins probably know about the problem, '. + 'but you can contact them at %s to make sure. '. + 'Otherwise, wait a few minutes and try again.'), + common_config('site', 'name'), + common_config('site', 'email')); + } else { + $msg = _('An important error occured, probably related to email setup. '. + 'Check logfiles for more info..'); + } $dac = new DBErrorAction($msg, 500); $dac->showPage(); @@ -63,8 +68,14 @@ function handleError($error) function main() { + // quick check for fancy URL auto-detection support in installer. + if (isset($_SERVER['REDIRECT_URL']) && ((dirname($_SERVER['REQUEST_URI']) . '/check-fancy') === $_SERVER['REDIRECT_URL'])) { + die("Fancy URL support detection succeeded. We suggest you enable this to get fancy (pretty) URLs."); + } global $user, $action, $config; + Snapshot::check(); + if (!_have_config()) { $msg = sprintf(_("No configuration file found. Try running ". "the installation program first.")); @@ -101,6 +112,8 @@ function main() $args = array_merge($args, $_REQUEST); + Event::handle('ArgsInitialize', array(&$args)); + $action = $args['action']; if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {