projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DataObjects/Core_notify.php
[Pman.Core]
/
DataObjects
/
Core_notify.php
diff --git
a/DataObjects/Core_notify.php
b/DataObjects/Core_notify.php
index
8a6c2a6
..
87b5a74
100644
(file)
--- a/
DataObjects/Core_notify.php
+++ b/
DataObjects/Core_notify.php
@@
-77,6
+77,11
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
return false;
}
return false;
}
+ function beforeDelete($dependants_array, $roo) {
+ if ($this->delivered()) {
+ $roo->jerr("you can not delete a record of a successfull delivery");
+ }
+ }
function act_start($set = false)
function act_start($set = false)
@@
-109,7
+114,7
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
{
switch($this->event_id) {
case -1:
{
switch($this->event_id) {
case -1:
- return 'DELIVERED';
/
//not valid..
+ return 'DELIVERED'; //not valid..
case 0:
return 'PENDING';
default:
case 0:
return 'PENDING';
default:
@@
-130,7
+135,13
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
//DB_DAtaObject::DebugLevel(1);
// then we can build a join..
$d = DB_DataObject::Factory($q['ontable']);
//DB_DAtaObject::DebugLevel(1);
// then we can build a join..
$d = DB_DataObject::Factory($q['ontable']);
- $d->autoJoin();
+ $ji = $d->autoJoin();
+ //print_R($jinfo);
+ // get cols
+ foreach($ji['cols'] as $cname=>$fname) {
+ $this->selectAdd($fname . ' as ontable_id_' . $cname );
+ }
+
//$this->selectAdd($d->_query['data_select']); -- this will cause the same dataIndex...
$this->_join .= "
LEFT JOIN {$d->tableName()} ON {$this->tableName()}.onid = {$d->tableName()}.id
//$this->selectAdd($d->_query['data_select']); -- this will cause the same dataIndex...
$this->_join .= "
LEFT JOIN {$d->tableName()} ON {$this->tableName()}.onid = {$d->tableName()}.id
@@
-146,10
+157,11
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
switch ($q['query']['status']) {
case 'SUCCESS';
switch ($q['query']['status']) {
case 'SUCCESS';
- $this->whereAdd("
event_id < 0
");
+ $this->whereAdd("
msgid != ''
");
break;
case 'FAILED';
break;
case 'FAILED';
- $this->whereAdd('event_id > 0 AND act_when <= NOW() ');
+
+ $this->whereAdd("msgid = '' AND event_id > 0 AND act_when < NOW()");
break;
case 'PENDING';
break;
case 'PENDING';