Code Duplication    Length = 7-7 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 1099-1105 (lines=7) @@
1096
        $where = "pub_date <= {$timeNow} AND pub_date!=0 AND published=0";
1097
        $result_pub = $this->db->select( 'id', '[+prefix+]site_content',  $where);
1098
        $this->db->update($field, '[+prefix+]site_content', $where);
1099
        if ($this->db->getRecordCount($result_pub) >= 1) { //Event unPublished doc
1100
            while ($row_pub = $this->db->getRow($result_pub)) {
1101
                $this->invokeEvent("OnDocUnPublished", array(
1102
                    "docid" => $row_pub['id']
1103
                ));
1104
            }
1105
        }
1106
1107
        // now, check for documents that need un-publishing
1108
        $field = array('published' => 0, 'publishedon' => 0);
@@ 1112-1118 (lines=7) @@
1109
        $where = "unpub_date <= {$timeNow} AND unpub_date!=0 AND published=1";
1110
        $result_unpub = $this->db->select( 'id', '[+prefix+]site_content',  $where);
1111
        $this->db->update($field, '[+prefix+]site_content', $where);
1112
        if ($this->db->getRecordCount($result_unpub) >= 1) { //Event unPublished doc
1113
            while ($row_unpub = $this->db->getRow($result_unpub)) {
1114
                $this->invokeEvent("OnDocUnPublished", array(
1115
                    "docid" => $row_unpub['id']
1116
                ));
1117
            }
1118
        }
1119
1120
        $this->recentUpdate = $timeNow;
1121