[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    www/media/includes/classes
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2009-04-10 18:55:16
Message-ID: 1239389716.480862.17405.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 952048 by aacid:

Add appendNonDuplicatedSection to menu, i'm using it in kde-espana web site and it \
doesn't hurt noone if i add it here too


 M  +13 -0     class_menu.inc  


--- trunk/www/media/includes/classes/class_menu.inc #952047:952048
@@ -53,6 +53,19 @@
     return $section;
   }
 
+  function &appendNonDuplicatedSection ($name)
+  {
+    for($i=0; $i < count($this->items); $i++)
+    {
+      if ($this->items[$i]->name == $name)
+        return NULL;
+    }
+    $section = new MenuSection ($this->menu_root, $this->menu_baseurl, \
$this->current_relativeurl, $name); +    $this->items[] =& $section;
+
+    return $section;
+  }
+
   function show ()
   {
     print '<a name="cp-menu" />';


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic