includes/paths.php
changeset 843 4415e50e4e84
parent 832 7152ca0a0ce9
child 876 aed15c337b72
equal deleted inserted replaced
842:f13bb4f21890 843:4415e50e4e84
   474     $icon = addslashes($icon);
   474     $icon = addslashes($icon);
   475     $ret .= "var TREE_ITEMS = [\n  ['$icon" . $lang->get('adm_btn_home') . "', 'javascript:ajaxPage(\'".$this->nslist['Admin']."Home\');',\n    ";
   475     $ret .= "var TREE_ITEMS = [\n  ['$icon" . $lang->get('adm_btn_home') . "', 'javascript:ajaxPage(\'".$this->nslist['Admin']."Home\');',\n    ";
   476     foreach($k as $key)
   476     foreach($k as $key)
   477     {
   477     {
   478       $i++;
   478       $i++;
   479       $name = ( preg_match('/^[a-z0-9_]+$/', $key) ) ? $lang->get($key) : $key;
   479       $name = $lang->get($key);
   480       $ret .= "['".$name."', 'javascript:trees[0].toggle($i)', \n";
   480       $ret .= "['".$name."', 'javascript:trees[0].toggle($i)', \n";
   481       foreach($this->admin_tree[$key] as $c)
   481       foreach($this->admin_tree[$key] as $c)
   482       {
   482       {
   483         $i++;
   483         $i++;
   484         $name = ( preg_match('/^[a-z0-9_]+$/', $key) ) ? $lang->get($c['name']) : $c['name'];
   484         $name = $lang->get($c['name']);
   485         if ( $c['icon'] && $c['icon'] != cdnPath . '/images/spacer.gif' )
   485         if ( $c['icon'] && $c['icon'] != cdnPath . '/images/spacer.gif' )
   486         {
   486         {
   487           if ( is_array($c['icon']) )
   487           if ( is_array($c['icon']) )
   488           {
   488           {
   489             // this is a sprite reference
   489             // this is a sprite reference