@@ 1351-1357 (lines=7) @@ | ||
1348 | $where = "pub_date <= {$timeNow} AND pub_date!=0 AND published=0"; |
|
1349 | $result_pub = $this->getDatabase()->select( 'id', '[+prefix+]site_content', $where); |
|
1350 | $this->getDatabase()->update($field, '[+prefix+]site_content', $where); |
|
1351 | if ($this->getDatabase()->getRecordCount($result_pub) >= 1) { //Event unPublished doc |
|
1352 | while ($row_pub = $this->getDatabase()->getRow($result_pub)) { |
|
1353 | $this->invokeEvent("OnDocUnPublished", array( |
|
1354 | "docid" => $row_pub['id'] |
|
1355 | )); |
|
1356 | } |
|
1357 | } |
|
1358 | ||
1359 | // now, check for documents that need un-publishing |
|
1360 | $field = array('published' => 0, 'publishedon' => 0); |
|
@@ 1364-1370 (lines=7) @@ | ||
1361 | $where = "unpub_date <= {$timeNow} AND unpub_date!=0 AND published=1"; |
|
1362 | $result_unpub = $this->getDatabase()->select( 'id', '[+prefix+]site_content', $where); |
|
1363 | $this->getDatabase()->update($field, '[+prefix+]site_content', $where); |
|
1364 | if ($this->getDatabase()->getRecordCount($result_unpub) >= 1) { //Event unPublished doc |
|
1365 | while ($row_unpub = $this->getDatabase()->getRow($result_unpub)) { |
|
1366 | $this->invokeEvent("OnDocUnPublished", array( |
|
1367 | "docid" => $row_unpub['id'] |
|
1368 | )); |
|
1369 | } |
|
1370 | } |
|
1371 | ||
1372 | $this->recentUpdate = $timeNow; |
|
1373 |