refine search

git-svn-id: file:///home/shish/svn/shimmie2/trunk@49 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish
2007-05-01 13:30:05 +00:00
parent ad37982680
commit ff0fcee777
2 changed files with 32 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ function get_memory_limit() {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Input sanitising *
* Misc *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function get_thumbnail_size($orig_width, $orig_height) {
@@ -197,6 +197,28 @@ function CountExecs($db, $sql, $inputarray) {
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Things which should be in the core API *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function array_remove($array, $to_remove) {
$array = array_unique($array);
$a2 = array();
foreach($array as $existing) {
if($existing != $to_remove) {
$a2[] = $existing;
}
}
return $a2;
}
function array_add($array, $element) {
$array[] = $element;
$array = array_unique($array);
return $array;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Event API *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */