From a0a268c18aee5014ed78aa34750a6d286a7696ed Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 4 Jul 2014 11:12:55 +0800 Subject: [PATCH] Notify.php --- Notify.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } -- 2.39.2