r11677 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11676‎ | r11677 | r11678 >
Date:01:20, 8 November 2005
Author:eloquence
Status:old
Tags:
Comment:
hack support for {{PAGENAME}} (frequently requested)
Modified paths:
  • /trunk/extensions/inputbox/inputbox.php (modified) (history)

Diff [purge]

Index: trunk/extensions/inputbox/inputbox.php
@@ -41,6 +41,7 @@
4242 */
4343 function renderInputbox($input)
4444 {
 45+ global $wgTitle;
4546 $inputbox=new Inputbox();
4647 getBoxOption($inputbox->type,$input,'type');
4748 getBoxOption($inputbox->width,$input,'width',true);
@@ -54,6 +55,8 @@
5556 getBoxOption($inputbox->labeltext,$input,'labeltext');
5657
5758 $boxhtml=$inputbox->render();
 59+ # Maybe support other useful magic words here
 60+ $boxhtml=str_replace("{{PAGENAME}}",$wgTitle->getText(),$boxhtml);
5861 if($boxhtml) {
5962 return $boxhtml;
6063 } else {

Status & tagging log