From 46a853c3756aa4abe582ccb0de6f4e1f4b2035c4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Tue, 27 Nov 2012 17:39:04 +0100 Subject: [PATCH] correct return in sendDigest() the function always returned true, even if no action was taken. This resulted in no further indexer tasks being run. --- lib/exe/indexer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 1ccede923..c336514cd 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -181,6 +181,8 @@ function sendDigest() { global $conf; global $USERINFO; + $sent = false; + // remember current user info $olduinfo = $USERINFO; $olduser = $_SERVER['REMOTE_USER']; @@ -236,9 +238,11 @@ function sendDigest() { foreach($change_ids as $change_id) { subscription_send_digest($USERINFO['mail'], $change_id, $lastupdate); + $sent = true; } } elseif ($style === 'list') { subscription_send_list($USERINFO['mail'], $change_ids, $id); + $sent = true; } // TODO: Handle duplicate subscriptions. @@ -252,7 +256,7 @@ function sendDigest() { $USERINFO = $olduinfo; $_SERVER['REMOTE_USER'] = $olduser; echo 'sendDigest(): finished'.NL; - return true; + return $sent; } /** -- GitLab