Code Duplication    Length = 7-7 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

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