function wfSpecialAllpages( $par=NULL )
{
- global $from, $indexMaxperpage;
+ global $indexMaxperpage, $wgRequest;
$indexMaxperpage = 480;
+ $from = $wgRequest->getVal( 'from' );
if( $par ) {
indexShowChunk( $par );
- } elseif( isset( $from ) ) {
+ } elseif( !is_null( $from ) ) {
indexShowChunk( $from );
} else {
indexShowToplevel();
function wfSpecialCategories()
{
- global $wgUser, $wgOut , $wgLang ;
- global $article , $category ;
+ global $wgUser, $wgOut , $wgLang;
+
$sk = $wgUser->getSkin() ;
$sc = "Special:Categories" ;
$r = "" ;
*/
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="";
$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 ) ."]";
function ucCountLink( $lim, $d )
{
- global $wgUser, $wgLang, $target;
+ global $wgUser, $wgLang, $wgRequest;
+ $target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$lim}", "target={$target}&days={$d}&limit={$lim}" );
function ucDaysLink( $lim, $d )
{
- global $wgUser, $wgLang, $target;
+ global $wgUser, $wgLang, $wgRequest;
+ $target = $wgRequest->getText( 'target' );
$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
"{$d}", "target={$target}&days={$d}&limit={$lim}" );
$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;
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpSubject, $wpText;
$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();
$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" );
</tr><tr>
<td align=right>{$emr}:</td>
<td align=left>
-<input type=text name=\"wpSubject\" value=\"{$wpSubject}\">
+<input type=text name=\"wpSubject\" value=\"{$encSubject}\">
</td>
</tr><tr>
<td align=right>{$emm}:</td>
<td align=left>
<textarea name=\"wpText\" rows=10 cols=60 wrap=virtual>
-{$wpText}
+{$this->text}
</textarea>
</td></tr><tr>
<td> </td><td align=left>
function doSubmit()
{
global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
- global $wpSubject, $wpText, $this->target;
$from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
- $mailResult = userMailer( $this->mAddress, $from, wfQuotedPrintable( $wpSubject ), $wpText );
+ $mailResult = userMailer( $this->mAddress, $from, wfQuotedPrintable( $this->subject ), $this->text );
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);
function wfSpecialIpblocklist()
{
- global $wgUser, $wgOut, $wgRequest, $action;
+ global $wgUser, $wgOut, $wgRequest;
$ip = $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) );
$reason = $wgRequest->getText( 'wpUnblockReason' );
+ $action = $wgRequest->getText( 'action' );
$ipu = new IPUnblockForm( $ip, $reason );
function wfSpecialLockdb()
{
- global $wgUser, $wgOut, $wgRequest, $action;
+ global $wgUser, $wgOut, $wgRequest;
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
-
+ $action = $wgRequest->getText( 'action' );
$f = new DBLockForm();
if ( "success" == $action ) { $f->showSuccess(); }
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpLockConfirm;
$wgOut->setPagetitle( wfMsg( "lockdb" ) );
$wgOut->addWikiText( wfMsg( "lockdbtext" ) );
function wfSpecialRandompage()
{
- global $wgOut, $wgTitle, $wgArticle, $force;
+ global $wgOut, $wgTitle, $wgArticle;
$fname = "wfSpecialRandompage";
wfSeedRandom();
function wfSpecialRecentchangeslinked( $par = NULL )
{
- global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $days, $target, $hideminor; # From query string
+ global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
$fname = "wfSpecialRecentchangeslinked";
+ $days = $wgRequest->getInt( 'days' );
+ $target = $wgRequest->getText( 'target' );
+ $hideminor = $wgRequest->getBool( 'hideminor' ) ? 1 : 0;
+
$wgOut->setPagetitle( wfMsg( "recentchanges" ) );
$sk = $wgUser->getSkin();
function wfSpecialUnlockdb()
{
- global $wgUser, $wgOut, $action;
+ global $wgUser, $wgOut, $wgRequest;
if ( ! $wgUser->isDeveloper() ) {
$wgOut->developerRequired();
return;
}
+ $action = $wgRequest->getText( 'action' );
$f = new DBUnlockForm();
if ( "success" == $action ) { $f->showSuccess(); }
}
class DBUnlockForm {
-
function showForm( $err )
{
global $wgOut, $wgUser, $wgLang;
- global $wpLockConfirm;
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
function doSubmit()
{
global $wgOut, $wgUser, $wgLang;
- global $wpLockConfirm, $wgReadOnlyFile;
+ global $wgRequest, $wgReadOnlyFile;
+ $wpLockConfirm = $wgRequest->getCheck( 'wpLockConfirm' );
if ( ! $wpLockConfirm ) {
$this->showForm( wfMsg( "locknoconfirm" ) );
return;
function wfSpecialUnusedimages()
{
global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $limit, $offset; # From query string
$fname = "wfSpecialUnusedimages";
list( $limit, $offset ) = wfCheckLimits();