Code Duplication    Length = 8-8 lines in 2 locations

htdocs/themes/xbootstrap/modules/publisher/xoops_and_module_changes/modules/publisher/class/item.php 2 locations

@@ 1205-1212 (lines=8) @@
1202
        $sql   = 'SELECT * FROM ' . $this->db->prefix('publisher_items');
1203
        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
1204
            $whereClause = $criteria->renderWhere();
1205
            if ($whereClause !== 'WHERE ()') {
1206
                $sql .= ' ' . $criteria->renderWhere();
1207
                if (!empty($notNullFields)) {
1208
                    $sql .= $this->NotNullFieldClause($notNullFields, true);
1209
                }
1210
            } elseif (!empty($notNullFields)) {
1211
                $sql .= ' WHERE ' . $this->NotNullFieldClause($notNullFields);
1212
            }
1213
            if ($criteria->getSort() != '') {
1214
                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
1215
            }
@@ 1259-1266 (lines=8) @@
1256
        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('publisher_items');
1257
        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
1258
            $whereClause = $criteria->renderWhere();
1259
            if ($whereClause !== 'WHERE ()') {
1260
                $sql .= ' ' . $criteria->renderWhere();
1261
                if (!empty($notNullFields)) {
1262
                    $sql .= $this->NotNullFieldClause($notNullFields, true);
1263
                }
1264
            } elseif (!empty($notNullFields)) {
1265
                $sql .= ' WHERE ' . $this->NotNullFieldClause($notNullFields);
1266
            }
1267
        } elseif (!empty($notNullFields)) {
1268
            $sql .= ' WHERE ' . $this->NotNullFieldClause($notNullFields);
1269
        }