Skip to content

Commit

Permalink
[+] array version of modxcms#1 and modxcms#2 - in_array() used
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSwed committed Nov 18, 2014
1 parent 187ba68 commit d9aacba
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions assets/snippets/ditto/classes/filter.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,20 @@ function basicFilter ($value) {
if (trim($ii) == trim($iii))
$check++;
}

}
}
}
$unset = $check>0 ? 1 : 0;
unset($val,$check);
break;
break;
// Cases 21-22 created by Sergey Davydov <webmaster@collection.com.ua> 08.11.2011
case 21 : // array version of #1 - exlude records that do not in miltiple values such a "65||115" and have output delimeted list by comma
if (!isset ($value[$this->array_key]) || !in_array($this->filterValue,explode(',',$value[$this->array_key])))
$unset = 0;
break;
case 22 : // array version of #2 - exlude records that in miltiple values such a "65||115" and have output delimeted list by comma
if (in_array($this->filterValue,explode(',',$value[$this->array_key])))
$unset = 0;
break;
}
return $unset;
}
Expand Down

0 comments on commit d9aacba

Please sign in to comment.