]> git.wh0rd.org Git - tt-rss.git/blob - errors.php
if empty session is autostarted because of a cookie, immediately destroy it
[tt-rss.git] / errors.php
1 <?php
2         set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
3                 get_include_path());
4
5         require_once "functions.php";
6
7         $ERRORS[0] = "";
8
9         $ERRORS[1] = __("This program requires XmlHttpRequest " .
10                         "to function properly. Your browser doesn't seem to support it.");
11
12         $ERRORS[2] = __("This program requires cookies " .
13                         "to function properly. Your browser doesn't seem to support them.");
14
15         $ERRORS[3] = __("Backend sanity check failed.");
16
17         $ERRORS[4] = __("Frontend sanity check failed.");
18
19         $ERRORS[5] = __("Incorrect database schema version. &lt;a href='db-updater.php'&gt;Please update&lt;/a&gt;.");
20
21         $ERRORS[6] = __("Request not authorized.");
22
23         $ERRORS[7] = __("No operation to perform.");
24
25         $ERRORS[8] = __("Could not display feed: query failed. Please check label match syntax or local configuration.");
26
27         $ERRORS[8] = __("Denied. Your access level is insufficient to access this page.");
28
29         $ERRORS[9] = __("Configuration check failed");
30
31         $ERRORS[10] = __("Your version of MySQL is not currently supported. Please see official site for more information.");
32
33         $ERRORS[11] = "[This error is not returned by server]";
34
35         $ERRORS[12] = __("SQL escaping test failed, check your database and PHP configuration");
36
37         $ERRORS[13] = __("Method not found");
38
39         $ERRORS[14] = __("Plugin not found");
40
41         if ($_REQUEST['mode'] == 'js') {
42                 header("Content-Type: text/javascript; charset=UTF-8");
43
44                 print "var ERRORS = [];\n";
45
46                 foreach ($ERRORS as $id => $error) {
47
48                         $error = preg_replace("/\n/", "", $error);
49                         $error = preg_replace("/\"/", "\\\"", $error);
50
51                         print "ERRORS[$id] = \"$error\";\n";
52                 }
53         }
54 ?>