dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Special:AllPages: Overriding the title for form submission
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialAllPages.php
diff --git
a/includes/specials/SpecialAllPages.php
b/includes/specials/SpecialAllPages.php
index
17f6cca
..
ef05dd1
100644
(file)
--- a/
includes/specials/SpecialAllPages.php
+++ b/
includes/specials/SpecialAllPages.php
@@
-44,8
+44,6
@@
class SpecialAllPages extends IncludableSpecialPage {
protected $nsfromMsg = 'allpagesfrom';
/**
protected $nsfromMsg = 'allpagesfrom';
/**
- * Constructor
- *
* @param string $name Name of the special page, as seen in links and URLs (default: 'Allpages')
*/
function __construct( $name = 'Allpages' ) {
* @param string $name Name of the special page, as seen in links and URLs (default: 'Allpages')
*/
function __construct( $name = 'Allpages' ) {
@@
-128,7
+126,7
@@
class SpecialAllPages extends IncludableSpecialPage {
'id' => 'namespace',
'label-message' => 'namespace',
'all' => null,
'id' => 'namespace',
'label-message' => 'namespace',
'all' => null,
- '
value
' => $namespace,
+ '
default
' => $namespace,
],
'hideredirects' => [
'type' => 'check',
],
'hideredirects' => [
'type' => 'check',
@@
-143,7
+141,9
@@
class SpecialAllPages extends IncludableSpecialPage {
unset( $fields['hideredirects'] );
}
unset( $fields['hideredirects'] );
}
- $form = HTMLForm::factory( 'table', $fields, $this->getContext() );
+ $context = new DerivativeContext( $this->getContext() );
+ $context->setTitle( $this->getPageTitle() ); // Remove subpage
+ $form = HTMLForm::factory( 'table', $fields, $context );
$form->setMethod( 'get' )
->setWrapperLegendMsg( 'allpages' )
->setSubmitTextMsg( 'allpagessubmit' )
$form->setMethod( 'get' )
->setWrapperLegendMsg( 'allpages' )
->setSubmitTextMsg( 'allpagessubmit' )
@@
-343,7
+343,7
@@
class SpecialAllPages extends IncludableSpecialPage {
/**
* @param int $ns The namespace of the article
* @param string $text The name of the article
/**
* @param int $ns The namespace of the article
* @param string $text The name of the article
- * @return array
( int namespace, string dbkey, string pagename )
or null on error
+ * @return array
|null [ int namespace, string dbkey, string pagename ]
or null on error
*/
protected function getNamespaceKeyAndText( $ns, $text ) {
if ( $text == '' ) {
*/
protected function getNamespaceKeyAndText( $ns, $text ) {
if ( $text == '' ) {