Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4646993
boilerplate-per-namespace.diff
Cboltz (Christian Boltz)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Cboltz
Oct 23 2016, 8:12 PM
2016-10-23 20:12:30 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
boilerplate-per-namespace.diff
View Options
--- MultiBoilerplate.hooks.php_ORIG 2016-10-23 21:51:07.984196841 +0200
+++ MultiBoilerplate.hooks.php 2016-10-23 22:06:33.971681022 +0200
@@ -36,7 +36,7 @@ class MultiBoilerplateHooks {
* @return true
*/
public static function onEditPageShowEditFormInitial( EditPage $editPage, OutputPage $out ) {
- global $wgParser, $wgMultiBoilerplateOptions, $wgMultiBoilerplateOverwrite;
+ global $wgParser, $wgMultiBoilerplateOptions, $wgMultiBoilerplateOverwrite, $wgMultiBoilerplatePerNamespace;
$title = $out->getTitle();
$request = $out->getRequest();
@@ -60,7 +60,13 @@ class MultiBoilerplateHooks {
$options .= Xml::option( $name, $template, $selected );
}
} else {
- $things = wfMessage( 'Multiboilerplate' )->inContentLanguage()->text();
+ $boilerplatepage = 'Multiboilerplate';
+ if ($wgMultiBoilerplatePerNamespace) {
+ $namespace = $title->getNamespace();
+ if ($namespace <> 0) $boilerplatepage .= '-' . $namespace;
+ }
+ $things = wfMessage( $boilerplatepage )->inContentLanguage()->text();
+
$options = '';
$headingFound = 0;
$things = explode( "\n", str_replace(
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4087058
Default Alt Text
boilerplate-per-namespace.diff (1 KB)
Attached To
Mode
T24759: different boilerplates per namespace
Attached
Detach File
Event Timeline
Log In to Comment