From 4a755da2c0a0b9b9a961d47bec5b2713bea07a20 Mon Sep 17 00:00:00 2001 From: shish Date: Thu, 5 Jul 2007 21:53:52 +0000 Subject: [PATCH] it *was* in the core API :P git-svn-id: file:///home/shish/svn/shimmie2/trunk@230 7f39781d-f577-437e-ae19-be835c7a54ca --- core/util.inc.php | 6 ------ ext/tag_list/theme.php | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index 29a7c2c6..14fdbc8f 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -283,12 +283,6 @@ function array_remove($array, $to_remove) { return $a2; } -function array_add($array, $element) { - $array[] = $element; - $array = array_unique($array); - return $array; -} - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ * Event API * diff --git a/ext/tag_list/theme.php b/ext/tag_list/theme.php index 3439f16d..fd2d5226 100644 --- a/ext/tag_list/theme.php +++ b/ext/tag_list/theme.php @@ -136,7 +136,7 @@ class TagListTheme extends Themelet { } else { $tags = array_remove($tags, "-$tag"); - $tags = array_add($tags, $tag); + $tags = array_push($tags, $tag); return "A"; } } @@ -147,7 +147,7 @@ class TagListTheme extends Themelet { } else { $tags = array_remove($tags, $tag); - $tags = array_add($tags, "-$tag"); + $tags = array_push($tags, "-$tag"); return "S"; } }