Index: trunk/admin/include/sections.php =================================================================== diff -u -r4112 -r4199 --- trunk/admin/include/sections.php (.../sections.php) (revision 4112) +++ trunk/admin/include/sections.php (.../sections.php) (revision 4199) @@ -93,16 +93,15 @@ { global $rootURL, $m_var_list_update; - if(!$this->IsJavaScriptLink()) - { - $m_var_list_update['opener']='r'; - if ( $this->IsKernel4Link() ) { + if (!$this->IsJavaScriptLink()) { + $m_var_list_update['opener'] = 'r'; + if ($this->IsKernel4Link()) { global $var_list_update; $stack_t = isset($var_list_update['t']) ? $var_list_update['t'] : null; $var_list_update['t'] = $this->Get('file'); $env = BuildEnv(); - $url = $rootURL.$this->Get("path"); - $url .= strstr($url,"?") ? '&env='.$env : '?env='.$env; + $url = $rootURL.$this->Get('path'); + $url .= (strstr($url, '?') ? '&' : '?').'env='.$env; if ($stack_t == null) { unset($var_list_update['t']); } @@ -115,16 +114,13 @@ $env = BuildEnv(); } - $url = $rootURL.$this->Get("path").$this->Get("file"); - if(strstr($url,"?")) - { - $url .= "&env=".$env; - } - else - $url .= "?env=".$env; + $url = $rootURL.$this->Get('path').$this->Get('file'); + $url .= (strstr($url, '?') ? '&' : '?').'env='.$env; } - else - $url = $this->Get("file"); + else { + // never called (tested with all modules installed) + $url = $this->Get('file'); + } return $url; } @@ -361,7 +357,7 @@ $notree = $this->sections[$child]->Get("notree"); if (($child == NULL) or ($notree==-1)) { - print "var item = insDoc($j_par, gLnk(0, \"".$caption."\", \"".$this->SectionURL($element)."\"));\n"; + print 'var item = insDoc('.$j_par.', gLnk(0, "'.$caption.'", "'.$this->SectionURL($element).'", "return checkEditMode();"));'."\n"; print "item.iconSrc = '".$this->SectionIconURL($element,0)."';\n"; if($this->sections[$element]->Get("right")!=NULL) $this->BuildTree($this->sections[$element]->Get("right"), $parent); @@ -371,7 +367,7 @@ if ($child != NULL && $notree !=-1) { //print "$j_el = insFld($j_par, gFld(\"".$sections[$element]['name']."\"));\n"; - print "var $j_el = insFld($j_par, gFld(\"".$caption."\",\"".$this->SectionURL($element)."\"));\n"; + print 'var '.$j_el.' = insFld('.$j_par.', gFld("'.$caption.'","'.$this->SectionURL($element).'", "return checkEditMode();"));'."\n"; print $j_el . ".iconSrc='".$this->SectionIconURL($element,0)."';\n"; if($this->sections[$element]->Get("right")!=NULL) $this->BuildTree($this->sections[$element]->Get("right"), $parent);