debug request variable sets error_reporting to E_ALL

master
Andrew Dolgov 19 years ago
parent 721064e1a2
commit cce28758b2

@ -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";
@ -111,7 +119,7 @@
print "<label id=\"$id\" counter=\"$count\"/>";
error_reporting (E_ERROR | E_WARNING | E_PARSE);
error_reporting (DEFAULT_ERROR_LEVEL);
}
}
@ -227,7 +235,7 @@
$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);
@ -836,7 +844,7 @@
$lnum = 0;
error_reporting (E_ERROR | E_WARNING | E_PARSE);
error_reporting (DEFAULT_ERROR_LEVEL);
$num_unread = 0;

@ -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

@ -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';
@ -130,7 +136,7 @@
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");
@ -152,7 +158,7 @@
chmod($icon_file, 0644);
error_reporting (E_ERROR | E_WARNING | E_PARSE);
error_reporting (DEFAULT_ERROR_LEVEL);
}
}
@ -167,7 +173,7 @@
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");
@ -352,7 +358,7 @@
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

Loading…
Cancel
Save