Skip to content

Commit

Permalink
correct return in sendDigest()
Browse files Browse the repository at this point in the history
the function always returned true, even if no action was taken. This
resulted in no further indexer tasks being run.
  • Loading branch information
splitbrain committed Nov 27, 2012
1 parent e4a8ea5 commit 46a853c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/exe/indexer.php
Expand Up @@ -181,6 +181,8 @@ function sendDigest() {
global $conf;
global $USERINFO;

$sent = false;

// remember current user info
$olduinfo = $USERINFO;
$olduser = $_SERVER['REMOTE_USER'];
Expand Down Expand Up @@ -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.

Expand All @@ -252,7 +256,7 @@ function sendDigest() {
$USERINFO = $olduinfo;
$_SERVER['REMOTE_USER'] = $olduser;
echo 'sendDigest(): finished'.NL;
return true;
return $sent;
}

/**
Expand Down

0 comments on commit 46a853c

Please sign in to comment.