]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
replace some strange foreach constructs with the proper variant
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 20 Feb 2010 11:04:51 +0000 (11:04 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 20 Feb 2010 11:04:51 +0000 (11:04 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@660 b3834d28-1941-0410-a4f8-b48e95affb8f

data/templates/bookmarks.tpl.php

index 0e9ac95470b7d047195cfaf51f0259b03df6fb2d..0050ec879a26abe2700179e1a63bb1264b636258 100644 (file)
@@ -217,8 +217,7 @@ if($currenttag!= '') {
        id="bookmarks">
 
        <?php
-       foreach(array_keys($bookmarks) as $key) {
-               $row =& $bookmarks[$key];
+       foreach ($bookmarks as $key => &$row) {
                switch ($row['bStatus']) {
                        case 0:
                                $access = '';
@@ -234,9 +233,7 @@ if($currenttag!= '') {
                $cats = '';
                $tagsForCopy = '';
                $tags = $row['tags'];
-               foreach(array_keys($tags) as $key) {
-
-                       $tag =& $tags[$key];
+               foreach ($tags as $tkey => &$tag) {
                        $cats .= '<a href="'. sprintf($cat_url, filter($row['username'], 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
                        $tagsForCopy.= $tag.',';
                }