Code Duplication    Length = 6-6 lines in 2 locations

kernel/mimetypes.php 2 locations

@@ 197-202 (lines=6) @@
194
195
	function getCount($criteria = null, $notNullFields='') {
196
		$sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('mimetypes');
197
		if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
198
			$whereClause = $criteria->renderWhere();
199
			if ($whereClause != 'WHERE ()') {
200
				$sql .= ' '.$criteria->renderWhere();
201
			}
202
		}
203
		$result = $this->db->query($sql);
204
		if (!$result) {
205
			return 0;
@@ 557-562 (lines=6) @@
554
		$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
555
		$this->db->prefix("modules") . ' m on p.mperm_module = m.mid';
556
557
		if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
558
			$whereClause = $criteria->renderWhere();
559
			if ($whereClause != 'WHERE ()') {
560
				$sql .= ' '.$criteria->renderWhere();
561
			}
562
		}
563
564
		$result = $this->db->query($sql);
565