|
@@ 1110-1116 (lines=7) @@
|
| 1107 |
|
$where = "pub_date <= {$timeNow} AND pub_date!=0 AND published=0"; |
| 1108 |
|
$result_pub = $this->db->select( 'id', '[+prefix+]site_content', $where); |
| 1109 |
|
$this->db->update($field, '[+prefix+]site_content', $where); |
| 1110 |
|
if ($this->db->getRecordCount($result_pub) >= 1) { //Event unPublished doc |
| 1111 |
|
while ($row_pub = $this->db->getRow($result_pub)) { |
| 1112 |
|
$this->invokeEvent("OnDocUnPublished", array( |
| 1113 |
|
"docid" => $row_pub['id'] |
| 1114 |
|
)); |
| 1115 |
|
} |
| 1116 |
|
} |
| 1117 |
|
|
| 1118 |
|
// now, check for documents that need un-publishing |
| 1119 |
|
$field = array('published' => 0, 'publishedon' => 0); |
|
@@ 1123-1129 (lines=7) @@
|
| 1120 |
|
$where = "unpub_date <= {$timeNow} AND unpub_date!=0 AND published=1"; |
| 1121 |
|
$result_unpub = $this->db->select( 'id', '[+prefix+]site_content', $where); |
| 1122 |
|
$this->db->update($field, '[+prefix+]site_content', $where); |
| 1123 |
|
if ($this->db->getRecordCount($result_unpub) >= 1) { //Event unPublished doc |
| 1124 |
|
while ($row_unpub = $this->db->getRow($result_unpub)) { |
| 1125 |
|
$this->invokeEvent("OnDocUnPublished", array( |
| 1126 |
|
"docid" => $row_unpub['id'] |
| 1127 |
|
)); |
| 1128 |
|
} |
| 1129 |
|
} |
| 1130 |
|
|
| 1131 |
|
$this->recentUpdate = $timeNow; |
| 1132 |
|
|