|
@@ 1090-1096 (lines=7) @@
|
| 1087 |
|
$where = "pub_date <= {$timeNow} AND pub_date!=0 AND published=0"; |
| 1088 |
|
$result_pub = $this->db->select( 'id', '[+prefix+]site_content', $where); |
| 1089 |
|
$this->db->update($field, '[+prefix+]site_content', $where); |
| 1090 |
|
if( $this->db->getRecordCount( $result_pub ) >= 1 ) { //Event Published doc |
| 1091 |
|
while ($row_unpub = $this->db->getRow($result_pub)) { |
| 1092 |
|
$this->invokeEvent("OnDocPublished", array ( |
| 1093 |
|
"docid" => $row_unpub['id'] |
| 1094 |
|
)); |
| 1095 |
|
} |
| 1096 |
|
} |
| 1097 |
|
|
| 1098 |
|
// now, check for documents that need un-publishing |
| 1099 |
|
$field = array('published' => 0, 'publishedon' => 0); |
|
@@ 1103-1109 (lines=7) @@
|
| 1100 |
|
$where = "unpub_date <= {$timeNow} AND unpub_date!=0 AND published=1"; |
| 1101 |
|
$result_unpub = $this->db->select( 'id', '[+prefix+]site_content', $where); |
| 1102 |
|
$this->db->update($field, '[+prefix+]site_content', $where); |
| 1103 |
|
if( $this->db->getRecordCount( $result_unpub ) >= 1 ) { //Event unPublished doc |
| 1104 |
|
while ($row_unpub = $this->db->getRow($result_unpub)) { |
| 1105 |
|
$this->invokeEvent("OnDocUnPublished", array ( |
| 1106 |
|
"docid" => $row_unpub['id'] |
| 1107 |
|
)); |
| 1108 |
|
} |
| 1109 |
|
} |
| 1110 |
|
|
| 1111 |
|
$this->recentUpdate = $timeNow; |
| 1112 |
|
|