]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
Add translator documentation.
[quix0rs-gnu-social.git] / index.php
index 3265f0c0e9e4b647803e246cb9b2c2e29fee960f..850208c9d1501a80337a7a8d568a85aa88100527 100644 (file)
--- a/index.php
+++ b/index.php
@@ -116,16 +116,14 @@ function handleError($error)
                 common_config('site', 'name'),
                 common_config('site', 'email')
             );
+
+            $dac = new DBErrorAction($msg, 500);
+            $dac->showPage();
         } else {
-            // TRANS: Error message.
-            $msg = _('An important error occured, probably related to email setup. '.
-                'Check logfiles for more info.'
-            );
+            $sac = new ServerErrorAction($error->getMessage(), 500, $error);
+            $sac->showPage();
         }
 
-        $dac = new DBErrorAction($msg, 500);
-        $dac->showPage();
-
     } catch (Exception $e) {
         // TRANS: Error message.
         echo _('An error occurred.');
@@ -175,15 +173,24 @@ function setupRW()
 
     static $alwaysRW = array('session', 'remember_me');
 
-    // We ensure that these tables always are used
-    // on the master DB
+    $rwdb = $config['db']['database'];
+
+    if (Event::handle('StartReadWriteTables', array(&$alwaysRW, &$rwdb))) {
 
-    $config['db']['database_rw'] = $config['db']['database'];
-    $config['db']['ini_rw'] = INSTALLDIR.'/classes/statusnet.ini';
+        // We ensure that these tables always are used
+        // on the master DB
 
-    foreach ($alwaysRW as $table) {
-        $config['db']['table_'.$table] = 'rw';
+        $config['db']['database_rw'] = $rwdb;
+        $config['db']['ini_rw'] = INSTALLDIR.'/classes/statusnet.ini';
+
+        foreach ($alwaysRW as $table) {
+            $config['db']['table_'.$table] = 'rw';
+        }
+
+        Event::handle('EndReadWriteTables', array($alwaysRW, $rwdb));
     }
+
+    return;
 }
 
 function checkMirror($action_obj, $args)