summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-08-25 15:01:15 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-08-25 15:01:15 +0300
commit47e84e7a9713558efde9ea83063d3e0830651622 (patch)
tree8416e23249ee823249a98c8a0fbf88cfe26b80d7 /inc/html.php
parent80525638759a0bfe0ca5d83d9b06430f0d94c2ac (diff)
parent1c5f7481f4e685ad3ffe9ba48ed47ed75196e64a (diff)
downloadrpg-47e84e7a9713558efde9ea83063d3e0830651622.tar.gz
rpg-47e84e7a9713558efde9ea83063d3e0830651622.tar.bz2
merging
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/html.php b/inc/html.php
index 51afe24f4..1c48d6059 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -904,16 +904,17 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){
return '';
}
- $level = $data[0]['level'];
- $opens = 0;
+ $start_level = $data[0]['level'];
$ret = '';
- if ($level < 2) {
+ if ($start_level < 2) {
// Trigger building a wrapper ul if the first level is
// 0 (we have a root object) or 1 (just the root content)
- --$level;
+ --$start_level;
}
+ $level = $start_level;
+
foreach ($data as $item){
if( $item['level'] > $level ){
@@ -946,7 +947,7 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){
}
//close remaining items and lists
- for ($i=0; $i < $level; $i++){
+ while(--$level >= $start_level) {
$ret .= "</li></ul>\n";
}
@@ -1380,7 +1381,7 @@ function html_edit(){
$form->addElement(form_makeOpenTag('div', array('class'=>'license')));
$out = $lang['licenseok'];
$out .= ' <a href="'.$license[$conf['license']]['url'].'" rel="license" class="urlextern"';
- if(isset($conf['target']['extern'])) $out .= ' target="'.$conf['target']['extern'].'"';
+ if($conf['target']['extern']) $out .= ' target="'.$conf['target']['extern'].'"';
$out .= '>'.$license[$conf['license']]['name'].'</a>';
$form->addElement($out);
$form->addElement(form_makeCloseTag('div'));