projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7e1b124
)
DataObjects/Core_watch.php
author
Alan Knowles
<alan@akbkhome.com>
Sun, 28 Oct 2012 13:53:43 +0000
(21:53 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Sun, 28 Oct 2012 13:53:43 +0000
(21:53 +0800)
DataObjects/Core_watch.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_watch.php
b/DataObjects/Core_watch.php
index
0cb966d
..
86f6f4b
100644
(file)
--- a/
DataObjects/Core_watch.php
+++ b/
DataObjects/Core_watch.php
@@
-87,15
+87,16
@@
class Pman_Core_DataObjects_Core_watch extends DB_DataObject
}
$w->selectAdd();
$w->selectAdd('distinct(person_id) as person_id');
}
$w->selectAdd();
$w->selectAdd('distinct(person_id) as person_id');
- $people = $w->fetchAll('person_id');
- $nn = DB_DataObject::Factory('core_notify');
- $nn->ontable = $ontable;
- $nn->onid = $onid;
- foreach($people as $p) {
- if (!$p) { // no people??? bugs in watch table
+ foreach($w->fetchAll() as $w) {
+ if (!$w->person_id) { // no people??? bugs in watch table
continue;
}
continue;
}
+
+ $nn = DB_DataObject::Factory('core_notify');
+ $nn->ontable = $ontable;
+ $nn->onid = $onid;
+ $nn->evtype = $w->medium;
$n = clone($nn);
$n->person_id = $p;
$nf = clone($n);
$n = clone($nn);
$n->person_id = $p;
$nf = clone($n);
@@
-104,11
+105,12
@@
class Pman_Core_DataObjects_Core_watch extends DB_DataObject
// we have a item in the queue for that waiting to be sent..
continue;
}
// we have a item in the queue for that waiting to be sent..
continue;
}
- $n->act_start( date("Y-m-d H:i:s", $when !== false ? strtotime($when) : time()) );
- $n->insert();
-
-
- }
+ $n->act_start( date("Y-m-d H:i:s", $when !== false ? strtotime($when) : time()) );
+ $n->evtype = $
+ $n->insert();
+
+
+ }
}
// static really...
}
// static really...