]> git.wh0rd.org Git - tt-rss.git/commitdiff
debug request variable sets error_reporting to E_ALL
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 23 Nov 2005 18:08:01 +0000 (19:08 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 23 Nov 2005 18:08:01 +0000 (19:08 +0100)
backend.php
config.php-dist
functions.php

index cdad2083f8077fb8df6d9d9cc96bf2c1e0adeb8a..327030e32da4e208062960d7f73c0b914784fff0 100644 (file)
@@ -1,6 +1,14 @@
 <?
        session_start();
 
+       if ($_GET["debug"]) {
+               define('DEFAULT_ERROR_LEVEL', E_ALL);
+       } else {
+               define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
+       }
+
+       error_reporting(DEFAULT_ERROR_LEVEL);
+
        $op = $_REQUEST["op"];
 
        if ((!$op || $op == "rpc" || $op == "globalUpdateFeeds") && !$_REQUEST["noxml"]) {
@@ -20,7 +28,7 @@
                exit;
        }
 
-       define(SCHEMA_VERSION, 2);
+       define('SCHEMA_VERSION', 2);
 
        require_once "sanity_check.php";
        require_once "config.php";
 
                        print "<label id=\"$id\" counter=\"$count\"/>";
 
-                       error_reporting (E_ERROR | E_WARNING | E_PARSE);
+                       error_reporting (DEFAULT_ERROR_LEVEL);
        
                }
        }
                                                $class .= "Unread";
                                        }
                                        
-                                       error_reporting (E_ERROR | E_WARNING | E_PARSE);
+                                       error_reporting (DEFAULT_ERROR_LEVEL);
        
                                        printFeedEntry(-$line["id"]-11, 
                                                $class, $line["description"], $count, "images/label.png", $link);
 
                $lnum = 0;
 
-               error_reporting (E_ERROR | E_WARNING | E_PARSE);
+               error_reporting (DEFAULT_ERROR_LEVEL);
 
                $num_unread = 0;
 
index 8212184c5cc27d0bf928bdba2fd7c6853650187f..68c35ff44b036d0d8b924416c7ce54b86749f414 100644 (file)
@@ -2,29 +2,29 @@
        // Your RDBMS must be configured to accept connections
        // via TCP/IP and authentified by password.
 
-       define(DB_TYPE, "pgsql"); // or mysql
-       define(DB_HOST, "localhost");
-       define(DB_USER, "fox");
-       define(DB_NAME, "fox");
-       define(DB_PASS, "XXXXXX");
+       define('DB_TYPE', "pgsql"); // or mysql
+       define('DB_HOST', "localhost");
+       define('DB_USER', "fox");
+       define('DB_NAME', "fox");
+       define('DB_PASS', "XXXXXX");
 
        define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache');
        // Local cache directory for RSS feeds
        
-       define(WEB_DEMO_MODE, false);
+       define('WEB_DEMO_MODE', false);
        // Demo mode with reduced functionality.
 
-       define(ICONS_DIR, "icons");
-       define(ICONS_URL, "icons");
+       define('ICONS_DIR', "icons");
+       define('ICONS_URL', "icons");
 
-       define(USE_HTTP_AUTH, false);
+       define('USE_HTTP_AUTH', false);
        // Use HTTP Basic authentication instead of login form. Has some problems.
 
-       define(SINGLE_USER_MODE, true);
+       define('SINGLE_USER_MODE', true);
        // Operate in single user mode, disables all functionality related to
        // multiple users.
 
-       define(DAEMON_REFRESH_ONLY, false);
+       define('DAEMON_REFRESH_ONLY', false);
        // updates to all feeds will only run when the backend script is
        // invoked with a "daemon" option on the URI stem. This is useful when you
        // are hosting multi-user system and want to control how often 
index ed2910a2a4747d9c04b1d4d3764a9c4578e62d71..e479c28b7821d58a60b0553907a49c662cae6155 100644 (file)
@@ -1,6 +1,12 @@
 <?
        session_start();
 
+       if ($_GET["debug"]) {
+               define('DEFAULT_ERROR_LEVEL', E_ALL);
+       } else {
+               define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
+       }
+
        require_once 'config.php';
        require_once 'db-prefs.php';
 
                                
                        error_reporting(0);
                        $r = fopen($icon_url, "r");
-                       error_reporting (E_ERROR | E_WARNING | E_PARSE);
+                       error_reporting (DEFAULT_ERROR_LEVEL);
 
                        if ($r) {
                                $tmpfname = tempnam("/tmp", "ttrssicon");
 
                                chmod($icon_file, 0644);
                                
-                               error_reporting (E_ERROR | E_WARNING | E_PARSE);
+                               error_reporting (DEFAULT_ERROR_LEVEL);
 
                        }       
                }
                error_reporting(0);
                $rss = fetch_rss($feed_url);
 
-               error_reporting (E_ERROR | E_WARNING | E_PARSE);
+               error_reporting (DEFAULT_ERROR_LEVEL);
 
                db_query($link, "BEGIN");
 
                                                if (is_filtered($entry_title, $entry_content, $entry_link, $filters)) {
                                                        continue;
                                                }
-                                               error_reporting (E_ERROR | E_WARNING | E_PARSE);
+                                               error_reporting (DEFAULT_ERROR_LEVEL);
 
                                                $result = db_query($link,
                                                        "SELECT ref_id FROM ttrss_user_entries WHERE