X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Notify.php;h=fd582092af5a14fa15dae313ff2f70dba6e54320;hp=5ed6a7b562a531aaac6f516b15b3872cfefe233b;hb=HEAD;hpb=976d54e7b28d381b97cb49aed15365ae5db8d45b diff --git a/Notify.php b/Notify.php index 5ed6a7b5..3fd4c5b4 100644 --- a/Notify.php +++ b/Notify.php @@ -178,6 +178,12 @@ class Pman_Core_Notify extends Pman function get($r,$opts=array()) { + + // if ($this->database_is_locked()) { + // die("LATER - DATABASE IS LOCKED"); + //} + + $this->parseArgs($opts); //date_default_timezone_set('UTC'); @@ -225,6 +231,7 @@ class Pman_Core_Notify extends Pman if (!$this->force) { $w->whereAdd('act_when < NOW()'); // eg.. not if future.. } + $w->orderBy('act_when ASC'); // oldest first. $total = min($w->count(), $opts['limit']);