]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 4 Mar 2009 19:05:58 +0000 (11:05 -0800)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 4 Mar 2009 19:05:58 +0000 (11:05 -0800)
1  2 
index.php
lib/common.php

diff --combined index.php
index 7f580b836783993e0d5aafa2df8e536590edff40,03c044415dc2f31e6178afded3236ec92efbad18..dae1ae75145e127a906b64a488f5248ebae05ae8
+++ b/index.php
@@@ -43,7 -43,11 +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,14 -65,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');
diff --combined lib/common.php
index ca8dedeefe5e63d9438b888d4d5bc2b7cc5793c2,3df68d98a2140cf6e43ac85c1bc787a6c0b3d625..f215192f45ef6489cb77c83b5c8e2b0c4d6c0d0d
@@@ -73,6 -73,7 +73,7 @@@ $config 
                'theme' => 'default',
                'path' => $_path,
                'logfile' => null,
+               'logdebug' => false,
                'fancy' => false,
                'locale_path' => INSTALLDIR.'/locale',
                'language' => 'en_US',
@@@ -187,12 -188,6 +188,12 @@@ foreach ($_config_files as $_config_fil
      }
  }
  
 +function _have_config()
 +{
 +    global $_have_a_config;
 +    return $_have_a_config;
 +}
 +
  // XXX: Throw a conniption if database not installed
  
  // Fixup for laconica.ini