2006-08-19 07:04:45 +00:00
|
|
|
<?php
|
2012-12-09 09:41:22 +00:00
|
|
|
set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
|
|
|
|
get_include_path());
|
2011-12-11 19:59:25 +00:00
|
|
|
|
2011-02-18 09:28:03 +00:00
|
|
|
require_once "functions.php";
|
2007-03-05 09:04:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
function get_error_types() {
|
|
|
|
$ERRORS[0] = "";
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[1] = __("This program requires XmlHttpRequest " .
|
|
|
|
"to function properly. Your browser doesn't seem to support it.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[2] = __("This program requires cookies " .
|
|
|
|
"to function properly. Your browser doesn't seem to support them.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[3] = __("Backend sanity check failed.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[4] = __("Frontend sanity check failed.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[5] = __("Incorrect database schema version. <a href='db-updater.php'>Please update</a>.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[6] = __("Request not authorized.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[7] = __("No operation to perform.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[8] = __("Could not display feed: query failed. Please check label match syntax or local configuration.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[8] = __("Denied. Your access level is insufficient to access this page.");
|
2006-03-31 05:18:55 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[9] = __("Configuration check failed");
|
2006-08-13 04:46:40 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[10] = __("Your version of MySQL is not currently supported. Please see official site for more information.");
|
2007-04-24 03:28:10 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[11] = "[This error is not returned by server]";
|
2008-11-10 05:29:19 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[12] = __("SQL escaping test failed, check your database and PHP configuration");
|
2011-02-18 09:28:03 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[13] = __("Method not found");
|
2015-03-30 10:02:24 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[14] = __("Plugin not found");
|
2015-03-30 10:02:24 +00:00
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
$ERRORS[15] = __("Encoding data as JSON failed");
|
2020-12-18 13:53:07 +00:00
|
|
|
|
|
|
|
return $ERRORS;
|
2020-12-12 15:50:43 +00:00
|
|
|
}
|
2018-12-24 09:28:11 +00:00
|
|
|
|
2021-02-05 20:41:32 +00:00
|
|
|
if ($_REQUEST['mode'] ?? "" == 'js') {
|
2013-05-31 20:37:12 +00:00
|
|
|
header("Content-Type: text/javascript; charset=UTF-8");
|
2011-02-18 09:28:03 +00:00
|
|
|
|
|
|
|
print "var ERRORS = [];\n";
|
|
|
|
|
2020-12-12 15:50:43 +00:00
|
|
|
foreach (get_error_types() as $id => $error) {
|
2011-02-18 09:28:03 +00:00
|
|
|
|
|
|
|
$error = preg_replace("/\n/", "", $error);
|
|
|
|
$error = preg_replace("/\"/", "\\\"", $error);
|
|
|
|
|
|
|
|
print "ERRORS[$id] = \"$error\";\n";
|
|
|
|
}
|
|
|
|
}
|
2006-03-31 05:18:55 +00:00
|
|
|
?>
|