From 56ef9b96cf85ba4b1e5df37ac113143f102d3642 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 19 Apr 2012 11:23:45 +0200 Subject: some more debug output in the indexer webbug --- lib/exe/indexer.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/exe/indexer.php') diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 95e2af05b..738a29503 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -55,6 +55,8 @@ exit; function runTrimRecentChanges($media_changes = false) { global $conf; + echo "runTrimRecentChanges($media_changes): started".NL; + $fn = ($media_changes ? $conf['media_changelog'] : $conf['changelog']); // Trim the Recent Changes @@ -70,6 +72,7 @@ function runTrimRecentChanges($media_changes = false) { if (count($lines)<=$conf['recent']) { // nothing to trim io_unlock($fn); + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -91,6 +94,7 @@ function runTrimRecentChanges($media_changes = false) { // nothing to trim @unlink($fn.'_tmp'); io_unlock($fn); + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -114,10 +118,12 @@ function runTrimRecentChanges($media_changes = false) { } else { io_unlock($fn); } + echo "runTrimRecentChanges($media_changes): finished".NL; return true; } // nothing done + echo "runTrimRecentChanges($media_changes): finished".NL; return false; } @@ -160,11 +166,12 @@ function runSitemapper(){ * @author Adrian Lang */ function sendDigest() { - echo 'sendDigest(): start'.NL; + echo 'sendDigest(): started'.NL; global $ID; global $conf; if (!$conf['subscribers']) { - return; + echo 'sendDigest(): disabled'.NL; + return false; } $subscriptions = subscription_find($ID, array('style' => '(digest|list)', 'escaped' => true)); @@ -243,6 +250,8 @@ function sendDigest() { // restore current user info $USERINFO = $olduinfo; $_SERVER['REMOTE_USER'] = $olduser; + echo 'sendDigest(): finished'.NL; + return true; } /** -- cgit v1.2.3 From bfd0f5975e6e3578b4fa0c712e9779a0861fdc72 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 28 Jun 2012 22:04:10 -0400 Subject: Input wrapper for exe scripts --- lib/exe/indexer.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/exe/indexer.php') diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 738a29503..e149770c0 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -20,10 +20,10 @@ if(!$defer){ sendGIF(); // send gif } -$ID = cleanID($_REQUEST['id']); +$ID = cleanID($INPUT->str('id')); // Catch any possible output (e.g. errors) -$output = isset($_REQUEST['debug']) && $conf['allowdebug']; +$output = $INPUT->has('debug') && $conf['allowdebug']; if(!$output) ob_start(); // run one of the jobs @@ -261,7 +261,8 @@ function sendDigest() { * @author Harry Fuecks */ function sendGIF(){ - if(isset($_REQUEST['debug'])){ + global $INPUT; + if($INPUT->has('debug')){ header('Content-Type: text/plain'); return; } -- cgit v1.2.3 From cd2f903b3e35c080dc9c1aa0c9f7383573dcae31 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 7 Sep 2012 21:10:44 +0200 Subject: Correct and add some PHPDoc comments, initialize some variables --- lib/exe/indexer.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/exe/indexer.php') diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index e149770c0..1ccede923 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -175,6 +175,7 @@ function sendDigest() { } $subscriptions = subscription_find($ID, array('style' => '(digest|list)', 'escaped' => true)); + /** @var auth_basic $auth */ global $auth; global $lang; global $conf; -- cgit v1.2.3