<?
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"]) {
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;
// 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
<?
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