From: Alan Knowles Date: Fri, 4 Jul 2014 03:12:55 +0000 (+0800) Subject: Notify.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=a0a268c18aee5014ed78aa34750a6d286a7696ed Notify.php --- diff --git a/Notify.php b/Notify.php index bad6700d..4659e36b 100644 --- a/Notify.php +++ b/Notify.php @@ -42,7 +42,7 @@ class Pman_Core_Notify extends Pman ), 'old' => array( - 'desc' => 'Show old messages..', + 'desc' => 'Show old messages.. (and new messages...)', 'default' => 0, 'short' => 'o', 'min' => 0, @@ -175,7 +175,12 @@ class Pman_Core_Notify extends Pman if (!empty($opts['old'])) { + // show old and new... + $w->orderBy('act_when DESC'); // latest first + $w->limit($opts['limit']); // we can run + + } else { // standard //$w->whereAdd('act_when > sent'); // eg.. sent is not valid.. @@ -190,11 +195,9 @@ class Pman_Core_Notify extends Pman $this->logecho("QUEUE is {$w->count()}"); - $w->limit($opts['limit']); // we can run 1000 ... - } else { - $w->orderBy('act_when DESC'); // latest first $w->limit($opts['limit']); // we can run 1000 ... } + if (!empty($this->evtype)) { $w->evtype = $this->evtype; }