mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 15:15:56 +00:00
remove debug_enabled global
This commit is contained in:
@@ -129,26 +129,20 @@
|
||||
$utc_tz = new DateTimeZone('UTC');
|
||||
$schema_version = false;
|
||||
|
||||
global $_debug_enabled;
|
||||
$_debug_enabled = true;
|
||||
|
||||
/**
|
||||
* Print a timestamped debug message.
|
||||
*
|
||||
* @param string $msg The debug message.
|
||||
* @return void
|
||||
*/
|
||||
function _debug($msg) {
|
||||
global $_debug_enabled;
|
||||
|
||||
if (!$_debug_enabled) return;
|
||||
function _debug($msg, $show = true) {
|
||||
|
||||
$ts = strftime("%H:%M:%S", time());
|
||||
if (function_exists('posix_getpid')) {
|
||||
$ts = "$ts/" . posix_getpid();
|
||||
}
|
||||
|
||||
if (!(defined('QUIET') && QUIET)) {
|
||||
if ($show && !(defined('QUIET') && QUIET)) {
|
||||
print "[$ts] $msg\n";
|
||||
}
|
||||
|
||||
@@ -163,15 +157,6 @@
|
||||
|
||||
} // function _debug
|
||||
|
||||
function _debug_enable($enabled) {
|
||||
global $_debug_enabled;
|
||||
|
||||
$old = $_debug_enabled;
|
||||
$_debug_enabled = $enabled;
|
||||
|
||||
return $old;
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge a feed old posts.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user