-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.php
51 lines (31 loc) · 1.51 KB
/
errors.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
set_include_path(dirname(__FILE__) . '/include' . PATH_SEPARATOR . get_include_path());
require_once 'functions.php';
$ERRORS = array();
$ERRORS[] = '';
$ERRORS[] = __('This program requires XmlHttpRequest ' .
'to function properly. Your browser doesn\'t seem to support it.');
$ERRORS[] = __('This program requires cookies ' .
'to function properly. Your browser doesn\'t seem to support them.');
$ERRORS[] = __('Backend sanity check failed.');
$ERRORS[] = __('Frontend sanity check failed.');
$ERRORS[] = __('Incorrect database schema version. <a href="db-updater.php">Please update</a>.');
$ERRORS[] = __('Request not authorized.');
$ERRORS[] = __('No operation to perform.');
$ERRORS[] = __('Could not display feed: query failed. Please check label match syntax or local configuration.');
$ERRORS[] = __('Denied. Your access level is insufficient to access this page.');
$ERRORS[] = __('Configuration check failed');
$ERRORS[] = __('Your version of MySQL is not currently supported. Please see official site for more information.');
$ERRORS[] = '[This error is not returned by server]';
$ERRORS[] = __('SQL escaping test failed, check your database and PHP configuration');
if ($_REQUEST['mode'] == 'js')
{
header('Content-Type: text/plain; charset=UTF-8');
echo 'var ERRORS = [];' . PHP_EOL;
foreach ($ERRORS as $id => $error)
{
$error = preg_replace("/\n/", '', $error);
$error = preg_replace("/\"/", "\\\"", $error);
echo 'ERRORS[$id] = "' . $error . '";' . PHP_EOL;
}
}