* @license GNU Affero General Public License http://www.gnu.org/licenses/
*/
+$_startTime = microtime(true);
+$_perfCounters = array();
+
define('INSTALLDIR', dirname(__FILE__));
define('STATUSNET', true);
define('LACONICA', true); // compatibility
$_cur = null;
$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.'
+ // TRANS: Database error message.
+ _('The database for %1$s is not responding correctly, '.
+ 'so the site will not work properly. '.
+ 'The site admins probably know about the problem, '.
+ 'but you can contact them at %2$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..'
+ // TRANS: Error message.
+ $msg = _('An important error occured, probably related to email setup. '.
+ 'Check logfiles for more info.'
);
}
$dac->showPage();
} catch (Exception $e) {
+ // TRANS: Error message.
echo _('An error occurred.');
}
exit(-1);
{
// fake HTTP redirects using lighttpd's 404 redirects
if (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false) {
- $_lighty_url = $base_url.$_SERVER['REQUEST_URI'];
+ $_lighty_url = $_SERVER['REQUEST_URI'];
$_lighty_url = @parse_url($_lighty_url);
if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') {
if (!_have_config()) {
$msg = sprintf(
- _(
- "No configuration file found. Try running ".
- "the installation program first."
+ // TRANS: Error message displayed when there is no StatusNet configuration file.
+ _("No configuration file found. Try running ".
+ "the installation program first."
)
);
$sac = new ServerErrorAction($msg);
$args = $r->map($path);
if (!$args) {
+ // TRANS: Error message displayed when trying to access a non-existing page.
$cac = new ClientErrorAction(_('Unknown page'), 404);
$cac->showPage();
return;
$action_class = ucfirst($action).'Action';
if (!class_exists($action_class)) {
+ // TRANS: Error message displayed when trying to perform an undefined action.
$cac = new ClientErrorAction(_('Unknown action'), 404);
$cac->showPage();
} else {