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
684c3f6
..
0e80c6d
100644
(file)
--- a/
DataObjects/Core_notify.php
+++ b/
DataObjects/Core_notify.php
@@
-64,11
+64,13
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
return $set;
}
$c = DB_DataObject::factory($this->ontable);
return $set;
}
$c = DB_DataObject::factory($this->ontable);
+
if ($this->onid == 0) {
return $c; // empty dataobject.
}
$c->autoJoin();
if ($this->onid == 0) {
return $c; // empty dataobject.
}
$c->autoJoin();
+
if ($c->get($this->onid)) {
return $c;
}
if ($c->get($this->onid)) {
return $c;
}
@@
-100,7
+102,7
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
}
function delivered()
{
}
function delivered()
{
- return !empty($msgid);
+ return !empty($
this->
msgid);
}
function status() // used by commandline reporting at present..
}
function status() // used by commandline reporting at present..
@@
-129,7
+131,7
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
// then we can build a join..
$d = DB_DataObject::Factory($q['ontable']);
$d->autoJoin();
// then we can build a join..
$d = DB_DataObject::Factory($q['ontable']);
$d->autoJoin();
- $this->selectAdd($d->_query['data_select']);
+ //$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
{$d->_join}
$this->_join .= "
LEFT JOIN {$d->tableName()} ON {$this->tableName()}.onid = {$d->tableName()}.id
{$d->_join}
@@
-140,6
+142,23
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
$this->whereAdd( "join_person_id_id.name LIKE '{$this->escape($q['query']['person_id_name'])}%'");
}
$this->whereAdd( "join_person_id_id.name LIKE '{$this->escape($q['query']['person_id_name'])}%'");
}
+ if (!empty($q['query']['status'])) {
+ switch ($q['query']['status']) {
+
+ case 'SUCCESS';
+ $this->is_active = 1;
+ break;
+ case 'FAILED';
+ $this->is_active = 0;
+ break;
+ case 'PENDING';
+ $this->is_active = 0;
+ break;
+ case 'ALL':
+ default:
+ break;
+ }
+ }