From: MatmaRex Date: Wed, 17 Oct 2012 19:47:28 +0000 (+0200) Subject: (bug 40857) fix non-array sidebar links handling in CologneBlue X-Git-Tag: 1.31.0-rc.0~21927^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=d8798a8a41487c3b4e5664996f1e5d4944e1c2af;p=lhc%2Fweb%2Fwiklou.git (bug 40857) fix non-array sidebar links handling in CologneBlue Thanks to Daniel Friesen for explanation on why a non-array can appear there. Change-Id: Ib51c640b9cb10a8acc8fe4033f71463e36770dbe --- diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 473ee2b441..a8e308add3 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -590,7 +590,7 @@ class CologneBlueTemplate extends BaseTemplate { // Personal tools ("My pages") $bar['qbmyoptions'] = $this->getPersonalTools(); foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) { - $bar['qbmyoptions'][$key] = false; + $bar['qbmyoptions'][$key] = null; } $additions_done = true; @@ -614,8 +614,8 @@ class CologneBlueTemplate extends BaseTemplate { $s .= $this->searchForm( 'sidebar' ); } elseif ( $heading == 'LANGUAGES' ) { // discard these; we display languages below page content - } else { - if ( $links ) { + } elseif ( $links ) { + if ( is_array( $links ) ) { // Use the navigation heading from standard sidebar as the "browse" section if ( $heading == 'navigation' ) { $heading = 'qbbrowse'; @@ -639,6 +639,9 @@ class CologneBlueTemplate extends BaseTemplate { if ( $any_link ) { $s .= $t; } + } else { + // $links can be a HTML string + $s .= $links; } } }