Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4619
13262.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:02 PM
2014-11-21 22:02:04 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
13262.diff
View Options
Index: inputbox.php
===================================================================
--- inputbox.php (revision 32931)
+++ inputbox.php (working copy)
@@ -60,6 +60,8 @@
case 'create':
case 'comment':
return $this->getCreateForm();
+ case 'preloadtitle':
+ return $this->getCreateForm2();
case 'search':
return $this->getSearchForm();
case 'search2':
@@ -197,6 +199,7 @@
$editintro = htmlspecialchars( $this->editintro );
$defaulttext = htmlspecialchars( $this->defaulttext );
$buttonlabel = htmlspecialchars( $this->buttonlabel );
+ $preloadtitle = htmlspecialchars( $this->preloadtitle );
$type = $this->hidden ? 'hidden' : 'text';
$createform=<<<ENDFORM
@@ -207,6 +210,7 @@
<input type='hidden' name="action" value="edit" />
<input type="hidden" name="preload" value="{$preload}" />
<input type="hidden" name="editintro" value="{$editintro}" />
+ <input type="hidden" name="preloadtitle" value="{$preloadtitle}" />
{$comment}
<input class="createboxInput" name="title" type="{$type}"
value="{$defaulttext}" size="{$this->width}" />{$this->br}
@@ -220,6 +224,45 @@
return $createform;
}
+ function getCreateForm2() {
+ global $wgScript;
+
+ $action = htmlspecialchars( $wgScript );
+ $comment='<input type="hidden" name="section" value="new" />';
+ if(!$this->buttonlabel) {
+ $this->buttonlabel = wfMsgHtml( "postcomment" );
+ } else {
+ $buttonlabel = htmlspecialchars( $this->buttonlabel );
+ }
+ $bgcolor = htmlspecialchars( $this->bgcolor );
+ $preload = htmlspecialchars( $this->preload );
+ $editintro = htmlspecialchars( $this->editintro );
+ $defaulttext = htmlspecialchars( $this->defaulttext );
+ $page = htmlspecialchars( $this->page );
+ $preloadtitle = htmlspecialchars( $this->preloadtitle );
+ $type = $this->hidden ? 'hidden' : 'text';
+ $createform2=<<<ENDFORM
+ <table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td align="center" bgcolor="{$bgcolor}">
+ <form name="createbox" action="$action" method="get" class="createbox">
+ <input type='hidden' name="action" value="edit" />
+ <input type="hidden" name="preload" value="{$preload}" />
+ <input type="hidden" name="editintro" value="{$editintro}" />
+ <input type="hidden" name="title" value="{$page}" />
+ {$comment}
+ <input class="createboxInput" name="preloadtitle" type="{$type}"
+ value="{$preloadtitle}" size="{$this->width}" />{$this->br}
+ <input type='submit' name="create" class="createboxButton"
+ value="{$buttonlabel}" />
+ </form>
+ </td>
+ </tr>
+ </table>
+ENDFORM;
+ return $createform2;
+ }
+
function lineBreak() {
# Should we be inserting a <br /> tag?
$cond = ( strtolower( $this->br ) == "no" );
@@ -267,6 +310,8 @@
'labeltext' => 'labeltext',
'break' => 'br',
'hidden' => 'hidden',
+ 'preloadtitle' => 'preloadtitle',
+ 'page' => 'page',
);
foreach( $options as $name => $var ) {
if( isset( $values[$name] ) )
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4184
Default Alt Text
13262.diff (2 KB)
Attached To
Mode
T15262: New Talk Page Option
Attached
Detach File
Event Timeline
Log In to Comment