dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ffc3e3
)
use of $wgRequest
author
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 1 Apr 2004 12:53:01 +0000
(12:53 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 1 Apr 2004 12:53:01 +0000
(12:53 +0000)
includes/SpecialAllpages.php
patch
|
blob
|
history
includes/SpecialCategories.php
patch
|
blob
|
history
includes/SpecialContributions.php
patch
|
blob
|
history
includes/SpecialEmailuser.php
patch
|
blob
|
history
includes/SpecialIpblocklist.php
patch
|
blob
|
history
includes/SpecialLockdb.php
patch
|
blob
|
history
includes/SpecialRandompage.php
patch
|
blob
|
history
includes/SpecialRecentchangeslinked.php
patch
|
blob
|
history
includes/SpecialUnlockdb.php
patch
|
blob
|
history
includes/SpecialUnusedimages.php
patch
|
blob
|
history
diff --git
a/includes/SpecialAllpages.php
b/includes/SpecialAllpages.php
index
54b6442
..
e418756
100644
(file)
--- a/
includes/SpecialAllpages.php
+++ b/
includes/SpecialAllpages.php
@@
-2,12
+2,13
@@
function wfSpecialAllpages( $par=NULL )
{
function wfSpecialAllpages( $par=NULL )
{
- global $
from, $indexMaxperpage
;
+ global $
indexMaxperpage, $wgRequest
;
$indexMaxperpage = 480;
$indexMaxperpage = 480;
+ $from = $wgRequest->getVal( 'from' );
if( $par ) {
indexShowChunk( $par );
if( $par ) {
indexShowChunk( $par );
- } elseif(
isset
( $from ) ) {
+ } elseif(
!is_null
( $from ) ) {
indexShowChunk( $from );
} else {
indexShowToplevel();
indexShowChunk( $from );
} else {
indexShowToplevel();
diff --git
a/includes/SpecialCategories.php
b/includes/SpecialCategories.php
index
0b145ef
..
950cf4e
100644
(file)
--- a/
includes/SpecialCategories.php
+++ b/
includes/SpecialCategories.php
@@
-2,8
+2,8
@@
function wfSpecialCategories()
{
function wfSpecialCategories()
{
- global $wgUser, $wgOut , $wgLang
;
- global $article , $category ;
+ global $wgUser, $wgOut , $wgLang;
+
$sk = $wgUser->getSkin() ;
$sc = "Special:Categories" ;
$r = "" ;
$sk = $wgUser->getSkin() ;
$sc = "Special:Categories" ;
$r = "" ;
diff --git
a/includes/SpecialContributions.php
b/includes/SpecialContributions.php
index
6c954a3
..
0bc00f6
100644
(file)
--- a/
includes/SpecialContributions.php
+++ b/
includes/SpecialContributions.php
@@
-149,7
+149,7
@@
TODO: This would probably look a lot nicer in a table.
*/
function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
{
*/
function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
{
- global $wgLang, $wgOut, $wgUser, $wgRequest
, $target
;
+ global $wgLang, $wgOut, $wgUser, $wgRequest;
$page = Title::makeName( $ns, $t );
$link = $sk->makeKnownLink( $page, "" );
$topmarktext="";
$page = Title::makeName( $ns, $t );
$link = $sk->makeKnownLink( $page, "" );
$topmarktext="";
@@
-162,6
+162,7
@@
function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
$sysop = $wgUser->isSysop();
if($sysop ) {
$extraRollback = $wgRequest->getBool( "bot" ) ? '&bot=1' : '';
$sysop = $wgUser->isSysop();
if($sysop ) {
$extraRollback = $wgRequest->getBool( "bot" ) ? '&bot=1' : '';
+ $target = $wgRequest->getText( 'target' );
$topmarktext .= " [". $sk->makeKnownLink( $page,
wfMsg( "rollbacklink" ),
"action=rollback&from=" . urlencode( $target ) . $extraRollback ) ."]";
$topmarktext .= " [". $sk->makeKnownLink( $page,
wfMsg( "rollbacklink" ),
"action=rollback&from=" . urlencode( $target ) . $extraRollback ) ."]";
@@
-188,8
+189,9
@@
function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
function ucCountLink( $lim, $d )
{
function ucCountLink( $lim, $d )
{
- global $wgUser, $wgLang, $
targe
t;
+ global $wgUser, $wgLang, $
wgReques
t;
+ $target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$lim}", "target={$target}&days={$d}&limit={$lim}" );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$lim}", "target={$target}&days={$d}&limit={$lim}" );
@@
-198,8
+200,9
@@
function ucCountLink( $lim, $d )
function ucDaysLink( $lim, $d )
{
function ucDaysLink( $lim, $d )
{
- global $wgUser, $wgLang, $
targe
t;
+ global $wgUser, $wgLang, $
wgReques
t;
+ $target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$d}", "target={$target}&days={$d}&limit={$lim}" );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$d}", "target={$target}&days={$d}&limit={$lim}" );
diff --git
a/includes/SpecialEmailuser.php
b/includes/SpecialEmailuser.php
index
c1a071f
..
2d9645d
100644
(file)
--- a/
includes/SpecialEmailuser.php
+++ b/
includes/SpecialEmailuser.php
@@
-11,8
+11,8
@@
function wfSpecialEmailuser()
$wgOut->errorpage( "mailnologin", "mailnologintext" );
return;
}
$wgOut->errorpage( "mailnologin", "mailnologintext" );
return;
}
- $action = $wgRequest->getVal(
$action
);
- $target = $wgRequest->getVal(
$target
);
+ $action = $wgRequest->getVal(
'action'
);
+ $target = $wgRequest->getVal(
'target'
);
if ( "" == $target ) {
$wgOut->errorpage( "notargettitle", "notargettext" );
return;
if ( "" == $target ) {
$wgOut->errorpage( "notargettitle", "notargettext" );
return;
@@
-59,12
+59,13
@@
class EmailUserForm {
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpSubject, $wpText;
$wgOut->setPagetitle( wfMsg( "emailpage" ) );
$wgOut->addWikiText( wfMsg( "emailpagetext" ) );
$wgOut->setPagetitle( wfMsg( "emailpage" ) );
$wgOut->addWikiText( wfMsg( "emailpagetext" ) );
- if ( ! $wpSubject ) { $wpSubject = wfMsg( "defemailsubject" ); }
+ if ( $this->subject === "" ) {
+ $this->subject = wfMsg( "defemailsubject" );
+ }
$emf = wfMsg( "emailfrom" );
$sender = $wgUser->getName();
$emf = wfMsg( "emailfrom" );
$sender = $wgUser->getName();
@@
-73,7
+74,8
@@
class EmailUserForm {
$emr = wfMsg( "emailsubject" );
$emm = wfMsg( "emailmessage" );
$ems = wfMsg( "emailsend" );
$emr = wfMsg( "emailsubject" );
$emm = wfMsg( "emailmessage" );
$ems = wfMsg( "emailsend" );
-
+ $encSubject = htmlspecialchars( $this->subject );
+
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
$action = $titleObj->escapeLocalURL( "target={$this->target}&action=submit" );
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
$action = $titleObj->escapeLocalURL( "target={$this->target}&action=submit" );
@@
-92,13
+94,13
@@
class EmailUserForm {
</tr><tr>
<td align=right>{$emr}:</td>
<td align=left>
</tr><tr>
<td align=right>{$emr}:</td>
<td align=left>
-<input type=text name=\"wpSubject\" value=\"{$
wp
Subject}\">
+<input type=text name=\"wpSubject\" value=\"{$
enc
Subject}\">
</td>
</tr><tr>
<td align=right>{$emm}:</td>
<td align=left>
<textarea name=\"wpText\" rows=10 cols=60 wrap=virtual>
</td>
</tr><tr>
<td align=right>{$emm}:</td>
<td align=left>
<textarea name=\"wpText\" rows=10 cols=60 wrap=virtual>
-{$
wpT
ext}
+{$
this->t
ext}
</textarea>
</td></tr><tr>
<td> </td><td align=left>
</textarea>
</td></tr><tr>
<td> </td><td align=left>
@@
-111,16
+113,16
@@
class EmailUserForm {
function doSubmit()
{
global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
function doSubmit()
{
global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
- global $wpSubject, $wpText, $this->target;
$from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
$from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
- $mailResult = userMailer( $this->mAddress, $from, wfQuotedPrintable( $
wpSubject ), $wpT
ext );
+ $mailResult = userMailer( $this->mAddress, $from, wfQuotedPrintable( $
this->subject ), $this->t
ext );
if (! $mailResult)
{
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
if (! $mailResult)
{
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
- $wgOut->redirect( $titleObj->getFullURL( "target={$this->target}&action=success" ) );
+ $encTarget = wfUrlencode( $this->target );
+ $wgOut->redirect( $titleObj->getFullURL( "target={$encTarget}&action=success" ) );
}
else
$wgOut->addHTML( wfMsg( "usermailererror" ) . $mailResult);
}
else
$wgOut->addHTML( wfMsg( "usermailererror" ) . $mailResult);
diff --git
a/includes/SpecialIpblocklist.php
b/includes/SpecialIpblocklist.php
index
7d16f48
..
30fd583
100644
(file)
--- a/
includes/SpecialIpblocklist.php
+++ b/
includes/SpecialIpblocklist.php
@@
-2,10
+2,11
@@
function wfSpecialIpblocklist()
{
function wfSpecialIpblocklist()
{
- global $wgUser, $wgOut, $wgRequest
, $action
;
+ global $wgUser, $wgOut, $wgRequest;
$ip = $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) );
$reason = $wgRequest->getText( 'wpUnblockReason' );
$ip = $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) );
$reason = $wgRequest->getText( 'wpUnblockReason' );
+ $action = $wgRequest->getText( 'action' );
$ipu = new IPUnblockForm( $ip, $reason );
$ipu = new IPUnblockForm( $ip, $reason );
diff --git
a/includes/SpecialLockdb.php
b/includes/SpecialLockdb.php
index
435a8dd
..
ff26cc3
100644
(file)
--- a/
includes/SpecialLockdb.php
+++ b/
includes/SpecialLockdb.php
@@
-2,13
+2,13
@@
function wfSpecialLockdb()
{
function wfSpecialLockdb()
{
- global $wgUser, $wgOut, $wgRequest
, $action
;
+ global $wgUser, $wgOut, $wgRequest;
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
-
+ $action = $wgRequest->getText( 'action' );
$f = new DBLockForm();
if ( "success" == $action ) { $f->showSuccess(); }
$f = new DBLockForm();
if ( "success" == $action ) { $f->showSuccess(); }
@@
-27,7
+27,6
@@
class DBLockForm {
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpLockConfirm;
$wgOut->setPagetitle( wfMsg( "lockdb" ) );
$wgOut->addWikiText( wfMsg( "lockdbtext" ) );
$wgOut->setPagetitle( wfMsg( "lockdb" ) );
$wgOut->addWikiText( wfMsg( "lockdbtext" ) );
diff --git
a/includes/SpecialRandompage.php
b/includes/SpecialRandompage.php
index
d55f643
..
a442623
100644
(file)
--- a/
includes/SpecialRandompage.php
+++ b/
includes/SpecialRandompage.php
@@
-2,7
+2,7
@@
function wfSpecialRandompage()
{
function wfSpecialRandompage()
{
- global $wgOut, $wgTitle, $wgArticle
, $force
;
+ global $wgOut, $wgTitle, $wgArticle;
$fname = "wfSpecialRandompage";
wfSeedRandom();
$fname = "wfSpecialRandompage";
wfSeedRandom();
diff --git
a/includes/SpecialRecentchangeslinked.php
b/includes/SpecialRecentchangeslinked.php
index
1a50588
..
afe39ce
100644
(file)
--- a/
includes/SpecialRecentchangeslinked.php
+++ b/
includes/SpecialRecentchangeslinked.php
@@
-3,10
+3,13
@@
include_once( "SpecialRecentchanges.php" );
function wfSpecialRecentchangeslinked( $par = NULL )
{
function wfSpecialRecentchangeslinked( $par = NULL )
{
- global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $days, $target, $hideminor; # From query string
+ global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
$fname = "wfSpecialRecentchangeslinked";
$fname = "wfSpecialRecentchangeslinked";
+ $days = $wgRequest->getInt( 'days' );
+ $target = $wgRequest->getText( 'target' );
+ $hideminor = $wgRequest->getBool( 'hideminor' ) ? 1 : 0;
+
$wgOut->setPagetitle( wfMsg( "recentchanges" ) );
$sk = $wgUser->getSkin();
$wgOut->setPagetitle( wfMsg( "recentchanges" ) );
$sk = $wgUser->getSkin();
diff --git
a/includes/SpecialUnlockdb.php
b/includes/SpecialUnlockdb.php
index
b7ef19b
..
589f89f
100644
(file)
--- a/
includes/SpecialUnlockdb.php
+++ b/
includes/SpecialUnlockdb.php
@@
-2,12
+2,13
@@
function wfSpecialUnlockdb()
{
function wfSpecialUnlockdb()
{
- global $wgUser, $wgOut, $
action
;
+ global $wgUser, $wgOut, $
wgRequest
;
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
+ $action = $wgRequest->getText( 'action' );
$f = new DBUnlockForm();
if ( "success" == $action ) { $f->showSuccess(); }
$f = new DBUnlockForm();
if ( "success" == $action ) { $f->showSuccess(); }
@@
-16,11
+17,9
@@
function wfSpecialUnlockdb()
}
class DBUnlockForm {
}
class DBUnlockForm {
-
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpLockConfirm;
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
@@
-52,8
+51,9
@@
class DBUnlockForm {
function doSubmit()
{
global $wgOut, $wgUser, $wgLang;
function doSubmit()
{
global $wgOut, $wgUser, $wgLang;
- global $w
pLockConfirm
, $wgReadOnlyFile;
+ global $w
gRequest
, $wgReadOnlyFile;
+ $wpLockConfirm = $wgRequest->getCheck( 'wpLockConfirm' );
if ( ! $wpLockConfirm ) {
$this->showForm( wfMsg( "locknoconfirm" ) );
return;
if ( ! $wpLockConfirm ) {
$this->showForm( wfMsg( "locknoconfirm" ) );
return;
diff --git
a/includes/SpecialUnusedimages.php
b/includes/SpecialUnusedimages.php
index
fb94bcc
..
5f05a31
100644
(file)
--- a/
includes/SpecialUnusedimages.php
+++ b/
includes/SpecialUnusedimages.php
@@
-3,7
+3,6
@@
function wfSpecialUnusedimages()
{
global $wgUser, $wgOut, $wgLang, $wgTitle;
function wfSpecialUnusedimages()
{
global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $limit, $offset; # From query string
$fname = "wfSpecialUnusedimages";
list( $limit, $offset ) = wfCheckLimits();
$fname = "wfSpecialUnusedimages";
list( $limit, $offset ) = wfCheckLimits();