http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88417
Revision: 88417
Author: raylton.sousa
Date: 2011-05-19 18:18:45 +0000 (Thu, 19 May 2011)
Log Message:
-----------
Fix a bug
Modified Paths:
--------------
trunk/extensions/BookManager/BookManager.body.php
Modified: trunk/extensions/BookManager/BookManager.body.php
===================================================================
--- trunk/extensions/BookManager/BookManager.body.php 2011-05-19 17:51:16 UTC
(rev 88416)
+++ trunk/extensions/BookManager/BookManager.body.php 2011-05-19 18:18:45 UTC
(rev 88417)
@@ -354,23 +354,21 @@
}
//known BUG: The category appears more than once when action is not
'view'
static function CatByPrefix( &$parser, &$text ) {
- global $wgOut;
- if ( !BookManagerNavBar::camDisplayNavBar( $wgOut ) &&
$wgCategorizationByPrefix == false ) {
- return true;
+ global $wgOut, $wgCategorizationByPrefix ;
+ if ( $wgCategorizationByPrefix &&
BookManagerNavBar::camDisplayNavBar( $wgOut ) ) {
+ $catTitle = Title::newFromText( self::bookparts(
$parser, $text, 0 ));
+ $parserOutput = $parser->getOutput();
+ $parserOutput->addCategory( $catTitle->getDBkey() ,
$catTitle->getText() );
}
- $catTitle = Title::newFromText( self::bookparts( $parser,
$text, 0 ));
- $parserOutput = $parser->getOutput();
- $parserOutput->addCategory( $catTitle->getDBkey() ,
$catTitle->getText() );
-
return true;
}
static function bookToolboxSection( &$sk, &$toolbox ) {
- global $wgTitle, $wgParser;
+ global $wgTitle, $wgParser, $wgBookSidebarSection ;
$currenttitletext = $wgTitle->getText();
$randchapter = self::pageText( $wgParser, $currenttitletext,
'rand' );
# Add book tools section and all your items
- if ( $randchapter ){
+ if ( $wgBookSidebarSection && $randchapter ){
?><div class="portal" id='p-tb'><?php
?><h5><?php $sk->msg(
'bm-booktools-section' ); ?></h5><?php
?><div class="body"><?php
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs