https://bugzilla.wikimedia.org/show_bug.cgi?id=19433
Niklas Laxström <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Niklas Laxström <[email protected]> 2009-07-15 08:26:53 UTC --- (In reply to comment #5) > Created an attachment (id=6336) --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6336) [details] > Make the boilerplates listing includable Why $ in messages? Variables aren't parsed in single quotes. > 'multiboilerplate-desc' => 'Allows a [[special:boilerplates|boilerplate]] > to be selected from a drop down box located above the edit form when editing > pages', > + 'description' => 'Allows a [[special:boilerplates|boilerplate]] to > be selected from a drop down box located above the edit form when editing > pages.', > + * Special:boilerplates, provides a list of MediaWiki:Multiboilerplate or > $wgMultiBoilerplateOptions. Inconsistent casing. +if( !defined( 'MEDIAWIKI' ) ) { + echo( "not a valid entry point.\n" ); + die( 1 ); +} Unnecessary with a file which only has a class definition. > + IncludableSpecialPage::SpecialPage( 'Boilerplates' ); parent:: ? Can't remember right now if it was safe to call old-style construct with __construct or new style constructor with old style class name. + $wgOut->addWikiText( wfMsg( "multiboilerplate-special-pagetext" ) ); addWikiMsg for this and other similar instances + $wgOut->addHTML( '<h2>' ); + $wgOut->addWikiText( wfMsg( "boilerplates-name" ) ); + $wgOut->addHTML( '</h2>' ); wrapWikiMsg perhaps? + if( !$this->mIncluding ) $wgOut->addWikiText( wfMsg( "multiboilerplate-special-define-on-localsettings" ) ); there is also accessor including() + if( $wgRequest->getVal( 'boilerplate' ) == $template ) $selected = true; Usually constants like $wgRequest->getVal( 'boilerplate' ) are first put into variable outside of the loop. I'd also use getText and === to be sure. + $options .= Xml::option( $name, $template, $selected ); Wtf are you doing here? Building Xml options and not using them for anything. + $things = wfMsg( 'multiboilerplate' ); Is this supposed to change with user interface language? The patch has inconsistent spacing, possible mixing spaces and tabs for indentation. + if( $options == '' ) return true; + + } Something tells me there is shortway way to write this. + global $wgOut, $wgUser, $wgLang, $wgContLang, $wgMultiBoilerplateOptions, $wgMultiBoilerplateOverwrite, $wgArticle, $wgTitle, $wgRequest; There are unused globals in this list. +$wgMultiBoilerplateDiplaySpecialPage = true; What's the purpose of this? What is the purpose of the whole patch? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
