summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-06 16:17:58 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-03-06 16:17:58 -0800
commit13c183e2f4e0738233658ca79103bbe4a6d57992 (patch)
tree298b18c43906919b2ee615e20f3507f333354575 /index.php
parent9a2f3358537566084a29fd421891fbc236185e9f (diff)
parent0617c7b7730e4e42cd6285737f9fe999688fbdc6 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/index.php b/index.php
index 914ba5bde..dae1ae751 100644
--- a/index.php
+++ b/index.php
@@ -43,7 +43,11 @@ function handleError($error)
return;
}
- common_log(LOG_ERR, "PEAR error: " . $error->getMessage());
+ $logmsg = "PEAR error: " . $error->getMessage();
+ if(common_config('site', 'logdebug')) {
+ $logmsg .= " : ". $error->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, '.
@@ -61,6 +65,14 @@ function main()
{
global $user, $action;
+ if (!_have_config()) {
+ $msg = sprintf(_("No configuration file found. Try running ".
+ "the installation program first."));
+ $sac = new ServerErrorAction($msg);
+ $sac->showPage();
+ return;
+ }
+
// For database errors
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handleError');