From: Alan Knowles Date: Sat, 27 Oct 2012 13:08:27 +0000 (+0800) Subject: Merge branch 'master' of http://git.roojs.com:8081/Pman.Core X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=7e9cdd246cc8bba1ce46a4db263a0f49b7cbc5a0;hp=-c Merge branch 'master' of git.roojs.com:8081/Pman.Core --- 7e9cdd246cc8bba1ce46a4db263a0f49b7cbc5a0 diff --combined Notify.php index bacad593,319f6784..15bbc7a2 --- a/Notify.php +++ b/Notify.php @@@ -16,13 -16,7 +16,13 @@@ require_once 'Pman.php' class Pman_Core_Notify extends Pman { - static $cli_desc = "Send out notification emails (usually from cron)"; + static $cli_desc = "Runs the notification queue (usually from cron) + Normally used to sends out emails to anyone in the notification list. + + /etc/cron.d/pman-core-notify + * * * * * www-data /usr/bin/php /home/gitlive/web.mtrack/admin.php Core/Notify > /dev/null + +"; static $cli_opts = array( 'debug' => array( @@@ -123,8 -117,11 +123,11 @@@ $w = DB_DataObject::factory($this->table); if (!$showold) { - $w->whereAdd('act_when > sent'); // eg.. sent is not valid.. + // standard + + $w->whereAdd('act_when > sent'); // eg.. sent is not valid.. + $w->whereAdd('act_start > NOW() - INTERVAL 14 DAY'); // ignore the ones stuck in the queue if (!$this->force) { $w->whereAdd('act_when < NOW()'); // eg.. not if future.. } diff --combined Pman.js index 1fcd8430,502bf70e..41bad06d --- a/Pman.js +++ b/Pman.js @@@ -417,13 -417,14 +417,14 @@@ Pman = new Roo.Document onLoadTrackCall : function(id,cb, cls) { Roo.get(document.body).mask("Loading Document details"); - Pman.request({ + new Pman.Request({ url: baseURL + '/Roo/Documents.html', params: { _id: id }, method: 'GET', - success : function(data) { + success : function(res) { + var data = res.data; Roo.get(document.body).unmask(); @@@ -562,7 -563,7 +563,7 @@@ tab.grid.getView().mainWrap.mask("Deleting"); new Pman.Request({ url: baseURL + '/Roo/'+tbl+'.php', - method: 'GET', + method: 'POST', params: { _delete : r.join(',') }, @@@ -619,13 -620,13 +620,13 @@@ }, /** * Depreciated - USE new Pman.Request - * + * We need to replace all the uses with this, however the api is slightly different, + * the success argument is res.data, not res.. * */ request : function(c) { - return new Pman.Request(c); - /* - + //return new Pman.Request(c); + var r= new Roo.data.Connection({ timeout : typeof(c.timeout) == 'undefined' ? 30000 : c.timeout }); @@@ -668,7 -669,7 +669,7 @@@ scope: this }); - */ + },