http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88199

Revision: 88199
Author:   raylton.sousa
Date:     2011-05-15 17:43:02 +0000 (Sun, 15 May 2011)
Log Message:
-----------
*Comment to the last and current commit: 
* Add option wgCategorizationByPrefix(thanks Dantman for help on irc).
* Solve some bugs related to data type returned by functions.
* Commenting code.

Modified Paths:
--------------
    trunk/extensions/BookManager/BookManager.body.php
    trunk/extensions/BookManager/BookManager.php

Modified: trunk/extensions/BookManager/BookManager.body.php
===================================================================
--- trunk/extensions/BookManager/BookManager.body.php   2011-05-15 17:24:10 UTC 
(rev 88198)
+++ trunk/extensions/BookManager/BookManager.body.php   2011-05-15 17:43:02 UTC 
(rev 88199)
@@ -352,10 +352,10 @@
                $out->addModules( 'ext.BookManager' );
                return true;
        }
-//known BUG: The category appears more than once when action is not 'view'
+       //known BUG: The category appears more than once when action is not 
'view'
        static function CatByPrefix( &$parser, &$text ) {
                global $wgOut;
-               if ( !BookManagerNavBar::camDisplayNavBar( $wgOut ) ) {
+               if ( !BookManagerNavBar::camDisplayNavBar( $wgOut ) && 
$wgCategorizationByPrefix == false ) {
                        return true;
                }
                $catTitle = Title::newFromText( self::bookparts( $parser, 
$text, 0 ));
@@ -369,7 +369,7 @@
                global $wgTitle, $wgParser;
                $currenttitletext = $wgTitle->getText();
                $randchapter = self::pageText( $wgParser, $currenttitletext, 
'rand' );
-               # Add book tools section and all yours itens 
+               # Add book tools section and all your items 
                if ( $randchapter ){
                        ?><div class="portal" id='p-tb'><?php
                                        ?><h5><?php $sk->msg( 
'bm-booktools-section' ); ?></h5><?php
@@ -393,7 +393,7 @@
 class PrintVersion extends BookManagerCore {
 
        function __construct() {
-               parent::__construct( 'Book render' );
+               parent::__construct( 'PrintVersion' );
        }
        function execute( $book ) {
                global $wgOut, $wgRequest;

Modified: trunk/extensions/BookManager/BookManager.php
===================================================================
--- trunk/extensions/BookManager/BookManager.php        2011-05-15 17:24:10 UTC 
(rev 88198)
+++ trunk/extensions/BookManager/BookManager.php        2011-05-15 17:43:02 UTC 
(rev 88199)
@@ -60,7 +60,7 @@
 $wgBookManagerNamespaces = array( NS_MAIN );
 $wgBookManagerVariables = true ;
 $wgBookManagerNavBar = true;
-
+$wgCategorizationByPrefix = true;
 /* Copyied from extensions/Collection/Collection.php */
 /** Namespace for "community books" */
 $wgBookManagerPrefixNamespace = NS_PROJECT;
@@ -77,7 +77,7 @@
 /**** Navbar ****/
 
 $wgHooks['BeforePageDisplay'][] = 'BookManagerNavBar::addNavBar';
-/****  Rating Toolbox Section ***/
+/**** Toolbox Section ***/
 $wgHooks['BaseTemplateToolbox'][] = 'BookManagerNavBar::bookToolboxSection';
 
 $wgHooks['ParserAfterTidy'][] = 'BookManagerNavBar::CatByPrefix';


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to