* the given title.
*/
function view() {
- global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgLang, $wgContLang;
- global $wgLinkCache, $IP, $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol;
- global $wgEnotif, $wgParser, $wgParserCache, $wgUseTrackbacks;
+ global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgContLang;
+ global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
+ global $wgParserCache, $wgUseTrackbacks;
$sk = $wgUser->getSkin();
$fname = 'Article::view';
* @private
*/
function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC=false, $comment=false ) {
- global $wgOut, $wgUser;
- global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer;
+ global $wgOut, $wgUser, $wgUseSquid;
$fname = 'Article::insertNewArticle';
wfProfileIn( $fname );
* first set $wgUser, and clean up $wgDeferredUpdates after each edit.
*/
function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) {
- global $wgOut, $wgUser;
- global $wgDBtransactions, $wgMwRedir;
- global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList, $wgUseFileCache;
+ global $wgOut, $wgUser, $wgDBtransactions, $wgMwRedir, $wgUseSquid;
+ global $wgPostCommitUpdateList, $wgUseFileCache;
$fname = 'Article::updateArticle';
wfProfileIn( $fname );
* UI entry point for page deletion
*/
function delete() {
- global $wgUser, $wgOut, $wgMessageCache, $wgRequest;
+ global $wgUser, $wgOut, $wgRequest;
$fname = 'Article::delete';
$confirm = $wgRequest->wasPosted() &&
$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
* Returns success
*/
function doDeleteArticle( $reason ) {
- global $wgUser;
- global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer, $wgPostCommitUpdateList;
- global $wgUseTrackbacks;
+ global $wgUser, $wgUseSquid, $wgDeferredUpdateList;
+ global $wgPostCommitUpdateList, $wgUseTrackbacks;
$fname = 'Article::doDeleteArticle';
wfDebug( $fname."\n" );
* @param string $text
*/
function editUpdates( $text, $summary, $minoredit, $timestamp_of_pagechange) {
- global $wgDeferredUpdateList, $wgDBname, $wgMemc;
- global $wgMessageCache, $wgUser, $wgUseEnotif;
+ global $wgDeferredUpdateList, $wgMessageCache, $wgUser, $wgUseEnotif;
if ( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
wfSeedRandom();
}
function fileCacheName() {
- global $wgFileCacheDirectory, $wgContLang;
+ global $wgFileCacheDirectory;
if( !$this->mFileCache ) {
$key = $this->mTitle->getPrefixedDbkey();
$hash = md5( $key );
* Format a line using the old system (aka without any javascript).
*/
function recentChangesLine( &$rc, $watched = false ) {
- global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol,
- $wgOnlySysopsCanPatrol, $wgSysopUserBans;
+ global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
+ global $wgOnlySysopsCanPatrol, $wgSysopUserBans;
$fname = 'ChangesList::recentChangesLineOld';
wfProfileIn( $fname );
* Format a line for enhanced recentchange (aka with javascript and block of lines).
*/
function recentChangesLine( &$baseRC, $watched = false ) {
- global $wgTitle, $wgLang, $wgContLang, $wgUser,
- $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans;
+ global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
+ global $wgOnlySysopsCanPatrol, $wgSysopUserBans;
# Create a specialised object
$rc = RCCacheEntry::newFromParent( $baseRC ) ;
return true;
}
- function startTimer( $timeout )
- {
- global $IP;
+ /** @todo FIXME */
+ function startTimer( $timeout ) {
wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
/*$tid = mysql_thread_id( $this->mConn );
exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
}
+ /** */
function tableName($name, $forddl = false) {
# First run any transformations from the parent object
$name = parent::tableName( $name );
return $retVal;
}
- function startTimer( $timeout )
- {
- global $IP;
+ /** @todo FIXME */
+ function startTimer( $timeout ) {
wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
/*$tid = mysql_thread_id( $this->mConn );
exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
* @todo document
*/
function DateFormatter() {
- global $wgContLang, $wgInputEncoding;
+ global $wgContLang;
$this->monthNames = $this->getMonthRegex();
for ( $i=1; $i<=12; $i++ ) {
* @todo document
*/
function getPreviewText() {
- global $wgOut, $wgUser, $wgTitle, $wgParser, $wgAllowDiffPreview, $wgEnableDiffPreviewPreference;
+ global $wgOut, $wgUser, $wgTitle, $wgParser;
$fname = 'EditPage::getPreviewText';
wfProfileIn( $fname );
* The necessary JavaScript code can be found in style/wikibits.js.
*/
function getEditToolbar() {
- global $wgStylePath, $wgLang, $wgMimeType, $wgJsMimeType;
+ global $wgStylePath, $wgLang, $wgJsMimeType;
/**
* toolarray an array of arrays which each include the filename of
}
function edit() {
- global $wgUser, $wgOut, $wgScript, $wgScriptPath, $wgServer,
- $wgLang;
+ global $wgOut, $wgScript, $wgScriptPath, $wgServer, $wgLang;
$wgOut->disable();
$name=$this->mTitle->getText();
$pos=strrpos($name,".")+1;
*/
function logProfilingData() {
global $wgRequestTime, $wgDebugLogFile, $wgDebugRawPage, $wgRequest;
- global $wgProfiling, $wgProfileStack, $wgProfileLimit, $wgUser;
+ global $wgProfiling, $wgUser;
$now = wfTime();
list( $usec, $sec ) = explode( ' ', $wgRequestTime );
* @access private
*/
function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) {
- global $wgParser, $wgMsgParserOptions;
- global $wgContLang, $wgLanguageCode;
- global $wgMessageCache, $wgLang;
+ global $wgParser, $wgMsgParserOptions, $wgContLang, $wgMessageCache, $wgLang;
if ( is_object( $wgMessageCache ) )
$transstat = $wgMessageCache->getTransform();
* if $timeout is 'default', $wgHTTPTimeout is used
*/
function wfGetHTTP( $url, $timeout = 'default' ) {
- global $wgServer, $wgHTTPTimeout, $wgHTTPProxy;
-
+ global $wgHTTPTimeout, $wgHTTPProxy;
# Use curl if available
if ( function_exists( 'curl_init' ) ) {
*/
function getFullPath( $fromSharedRepository = false ) {
global $wgUploadDirectory, $wgSharedUploadDirectory;
- global $wgHashedUploadDirectory, $wgHashedSharedUploadDirectory;
$dir = $fromSharedRepository ? $wgSharedUploadDirectory :
$wgUploadDirectory;
* Record an image upload in the upload log and the image table
*/
function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', $watch = false ) {
- global $wgUser, $wgLang, $wgTitle, $wgDeferredUpdateList;
- global $wgUseCopyrightUpload, $wgUseSquid, $wgPostCommitUpdateList;
+ global $wgUser, $wgUseCopyrightUpload, $wgUseSquid, $wgPostCommitUpdateList;
$fname = 'Image::recordUpload';
$dbw =& wfGetDB( DB_MASTER );
*
*/
function toHTML() {
- global $wgLang, $wgContLang, $wgUser;
+ global $wgLang, $wgUser;
$sk = $wgUser->getSkin();
}
function view() {
- global $wgUseExternalEditor, $wgOut, $wgShowEXIF;
+ global $wgOut, $wgShowEXIF;
$this->img = new Image( $this->mTitle );
return Article::getContent( $noredir );
}
- function openShowImage()
- {
- global $wgOut, $wgUser, $wgImageLimits, $wgRequest,
- $wgUseImageResize, $wgRepositoryBaseUrl,
- $wgUseExternalEditor, $wgServer, $wgFetchCommonsDescriptions;
+ function openShowImage() {
+ global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize;
+
$full_url = $this->img->getURL();
$anchoropen = '';
$anchorclose = '';
return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
}
- function doDelete()
- {
- global $wgOut, $wgUser, $wgContLang, $wgRequest;
- global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList;
+ function doDelete() {
+ global $wgOut, $wgUser, $wgRequest, $wgUseSquid, $wgInternalServer;
+ global $wgPostCommitUpdateList;
+
$fname = 'ImagePage::doDelete';
$reason = $wgRequest->getVal( 'wpReason' );
}
}
- function revert()
- {
- global $wgOut, $wgRequest, $wgUser;
- global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList;
+ function revert() {
+ global $wgOut, $wgRequest, $wgUser, $wgUseSquid, $wgInternalServer;
$oldimage = $wgRequest->getText( 'oldimage' );
if ( strlen( $oldimage ) < 16 ) {
}
function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
- global $wgUser, $wgLang, $wgContLang, $wgTitle;
+ global $wgUser, $wgLang, $wgTitle;
$datetime = $wgLang->timeanddate( $timestamp, true );
$del = wfMsg( 'deleteimg' );
* @return the a-element
*/
function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '' ) {
- global $wgTitle;
$fname = 'Linker::makeKnownLinkObj';
wfProfileIn( $fname );
/** @todo document */
function editSectionLinkForOther( $title, $section ) {
- global $wgRequest;
global $wgContLang;
$title = Title::newFromText($title);
*/
function doUpdate() {
- global $wgUseDumbLinkUpdate, $wgLinkCache, $wgDBtransactions;
- global $wgUseCategoryMagic;
+ global $wgUseDumbLinkUpdate, $wgLinkCache, $wgUseCategoryMagic;
if ( $wgUseDumbLinkUpdate ) {
$this->doDumbUpdate();
* Also useful where link table corruption needs to be repaired, e.g. in refreshLinks.php
*/
function doDumbUpdate() {
- global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic;
+ global $wgLinkCache, $wgUseCategoryMagic;
$fname = 'LinksUpdate::doDumbUpdate';
wfProfileIn( $fname );
*
* Side effect: opens connections to databases
*/
- function getReaderIndex()
- {
- global $wgMaxLag, $wgReadOnly, $wgDBClusterTimeout;
+ function getReaderIndex() {
+ global $wgReadOnly, $wgDBClusterTimeout;
$fname = 'LoadBalancer::getReaderIndex';
wfProfileIn( $fname );
*
* @package MediaWiki
*/
-class MessageCache
-{
+class MessageCache {
var $mCache, $mUseCache, $mDisable, $mExpiry;
var $mMemcKey, $mKeys, $mParserOptions, $mParser;
var $mExtensionMessages = array();
var $mDeferred = true;
function initialise( &$memCached, $useDB, $expiry, $memcPrefix) {
- global $wgLocalMessageCache;
$fname = 'MessageCache::initialise';
wfProfileIn( $fname );
* Returns false for a reportable error, true otherwise
*/
function load() {
- global $wgAllMessagesEn, $wgLocalMessageCache;
+ global $wgLocalMessageCache;
if ( $this->mDisable ) {
static $shownDisabled = false;
* @private
*/
function rdfSetup() {
- global $wgOut, $wgRdfMimeType, $_SERVER;
+ global $wgOut, $_SERVER;
$rdftype = wfNegotiateType(wfAcceptToPrefs($_SERVER['HTTP_ACCEPT']), wfAcceptToPrefs(RDF_TYPE_PREFS));
* returns true iff cache-ok headers was sent.
*/
function checkLastModified ( $timestamp ) {
- global $wgLang, $wgCachePages, $wgUser;
+ global $wgCachePages, $wgUser;
if ( !$timestamp || $timestamp == '19700101000000' ) {
wfDebug( "CACHE DISABLED, NO TIMESTAMP\n" );
return;
}
function addWikiTextTitle($text, &$title, $linestart) {
- global $wgParser, $wgUseTidy;
+ global $wgParser;
$parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions,
$linestart, true, $this->mRevisionId );
$this->mLanguageLinks += $parserOutput->getLanguageLinks();
* Saves the text into the parser cache if possible
*/
function addPrimaryWikiText( $text, $cacheArticle ) {
- global $wgParser, $wgParserCache, $wgUser, $wgUseTidy;
+ global $wgParser, $wgParserCache, $wgUser;
$parserOutput = $wgParser->parse( $text, $cacheArticle->mTitle,
$this->mParserOptions, true, true, $this->mRevisionId );
* the object, let's actually output it:
*/
function output() {
- global $wgUser, $wgLang, $wgDebugComments, $wgCookieExpiration;
- global $wgInputEncoding, $wgOutputEncoding, $wgContLanguageCode;
- global $wgDebugRedirects, $wgMimeType, $wgProfiler;
+ global $wgUser, $wgCookieExpiration, $wgOutputEncoding;
+ global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType, $wgProfiler;
if( $this->mDoNothing ){
return;
* @returns nothing
*/
function history() {
- global $wgUser, $wgOut, $wgLang, $wgShowUpdatedMarker, $wgRequest,
- $wgTitle, $wgUseValidation;
+ global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgUseValidation;
/*
* Allow client caching.
/** @todo document */
function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, $latest = false, $firstInList = false ) {
- global $wgLang, $wgContLang;
if ( 0 == $row->rev_user ) {
$contribsPage =& Title::makeTitle( NS_SPECIAL, 'Contributions' );
* @access private
*/
function formatHeadings( $text, $isMain=true ) {
- global $wgMaxTocLevel, $wgContLang, $wgLinkHolders, $wgInterwikiLinkHolders;
+ global $wgMaxTocLevel, $wgContLang;
$doNumberHeadings = $this->mOptions->getNumberHeadings();
$doShowToc = true;
* Parse image options text and use it to make an image
*/
function makeImage( &$nt, $options ) {
- global $wgContLang, $wgUseImageResize;
- global $wgUser, $wgThumbLimits;
+ global $wgContLang, $wgUseImageResize, $wgUser;
$align = '';
$memory = memory_get_usage();
$time = $this->getTime();
- global $wgDebugProfiling, $wgDebugFunctionEntry;
+ global $wgDebugFunctionEntry;
if ($wgDebugFunctionEntry && function_exists('wfDebug')) {
wfDebug(str_repeat(' ', count($this->mWorkStack) - 1).'Exiting '.$functionname."\n");
* @param $shownavigation show navigation like "next 200"?
*/
function doQuery( $offset, $limit, $shownavigation=true ) {
- global $wgUser, $wgOut, $wgLang, $wgRequest, $wgContLang;
+ global $wgUser, $wgOut, $wgContLang;
$sname = $this->getName();
$fname = get_class($this) . '::doQuery';
}
function doUpdate() {
- global $wgDBminWordLen, $wgContLang, $wgDisableSearchUpdate;
+ global $wgContLang, $wgDisableSearchUpdate;
if( $wgDisableSearchUpdate || !$this->mId ) {
return false;
}
function doUpdate() {
- global $wgDBname;
$fname = 'SiteStatsUpdate::doUpdate';
$dbw =& wfGetDB( DB_MASTER );
}
function addMetadataLinks( &$out ) {
- global $wgTitle, $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, $wgRdfMimeType, $action;
- global $wgRightsPage, $wgRightsUrl, $wgUseTrackbacks;
+ global $wgTitle, $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf;
+ global $wgRightsPage, $wgRightsUrl;
if( $out->isArticleRelated() ) {
# note: buggy CC software only reads first "meta" link
}
function getHeadScripts() {
- global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs, $wgJsMimeType;
+ global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType;
$r = "<script type=\"{$wgJsMimeType}\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n";
if( $wgAllowUserJs && $wgUser->isLoggedIn() ) {
$userpage = $wgUser->getUserPage();
* Return html code that include User stylesheets
*/
function getUserStyles() {
- global $wgOut, $wgStylePath, $wgLang;
+ global $wgOut, $wgStylePath;
$s = "<style type='text/css'>\n";
$s .= "/*/*/ /*<![CDATA[*/\n"; # <-- Hide the styles from Netscape 4 without hiding them from IE/Mac
$s .= $this->getUserStylesheet();
}
function getBodyOptions() {
- global $wgUser, $wgTitle, $wgNamespaceBackgrounds, $wgOut, $wgRequest;
+ global $wgUser, $wgTitle, $wgOut, $wgRequest;
extract( $wgRequest->getValues( 'oldid', 'redirect', 'diff' ) );
function getCategoryLinks () {
- global $wgOut, $wgTitle, $wgParser;
- global $wgUseCategoryMagic, $wgUseCategoryBrowser, $wgContLang;
+ global $wgOut, $wgTitle, $wgUseCategoryMagic, $wgUseCategoryBrowser;
+ global $wgContLang;
if( !$wgUseCategoryMagic ) return '' ;
if( count( $wgOut->mCategoryLinks ) == 0 ) return '';
*/
function outputPage( &$out ) {
global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
- global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
- global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
+ global $wgScript, $wgStylePath, $wgContLanguageCode;
+ global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest;
global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
* @access private
*/
function msgWiki( $str ) {
- global $wgParser, $wgTitle, $wgOut, $wgUseTidy;
+ global $wgParser, $wgTitle, $wgOut;
$text = $this->translator->translate( $str );
$parserOutput = $wgParser->parse( $text, $wgTitle,
*/
function wfSpecialAllmessages() {
global $wgOut, $wgAllMessagesEn, $wgRequest, $wgMessageCache, $wgTitle;
- global $wgLanguageCode, $wgContLanguageCode, $wgContLang;
global $wgUseDatabaseMessages;
if(!$wgUseDatabaseMessages) {
*
*/
function makeHTMLText( $messages ) {
- global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode, $wgContLang;
+ global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode;
$fname = "makeHTMLText";
wfProfileIn( $fname );
* @param integer $namespace (Default NS_MAIN)
*/
function showline( $inpoint, $outpoint, $namespace = NS_MAIN ) {
- global $wgOut, $wgLang, $wgUser;
+ global $wgOut, $wgUser;
$sk = $wgUser->getSkin();
$dbr =& wfGetDB( DB_SLAVE );
}
function showForm( $err ) {
- global $wgOut, $wgUser, $wgLang;
- global $wgRequest, $wgSysopUserBans;
+ global $wgOut, $wgUser, $wgRequest, $wgSysopUserBans;
$wgOut->setPagetitle( wfMsg( 'blockip' ) );
$wgOut->addWikiText( wfMsg( 'blockiptext' ) );
}
function doSubmit() {
- global $wgOut, $wgUser, $wgLang;
- global $wgSysopUserBans, $wgSysopRangeBans;
+ global $wgOut, $wgUser, $wgSysopUserBans, $wgSysopRangeBans;
$userId = 0;
$this->BlockAddress = trim( $this->BlockAddress );
}
function showList() {
- global $wgOut, $wgUser, $wgContLang;
+ global $wgOut, $wgContLang;
$fname = "BookSourceList::showList()";
# First, see if we have a custom list setup in
}
function askForm() {
- global $wgOut, $wgLang, $wgTitle;
+ global $wgOut, $wgTitle;
$fname = "BookSourceList::askForm()";
$action = $wgTitle->escapeLocalUrl();
}
function formatResult( $skin, $result ) {
- global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->title );
$plink = $skin->makeLinkObj( $title, $title->getText() );
$nlinks = wfMsg( 'nlinks', $result->count );
}
function formatResult( $skin, $result ) {
- global $wgContLang ;
$title = Title::newFromId( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
}
function showForm() {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( "emailpage" ) );
$wgOut->addWikiText( wfMsg( "emailpagetext" ) );
}
function doSubmit() {
- global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
+ global $wgOut, $wgUser;
$from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
$subject = wfQuotedPrintable( $this->subject );
*
*/
function wfSpecialExport( $page = '' ) {
- global $wgOut, $wgLang, $wgRequest;
+ global $wgOut, $wgRequest;
if( $wgRequest->getVal( 'action' ) == 'submit') {
$page = $wgRequest->getText( 'pages' );
*
*/
function wfSpecialImagelist() {
- global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode;
+ global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode;
$sort = $wgRequest->getVal( 'sort' );
$wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
* Constructor
*/
function wfSpecialImport( $page = '' ) {
- global $wgUser, $wgOut, $wgLang, $wgRequest, $wgTitle;
- global $wgImportSources;
+ global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgImportSources;
###
# $wgOut->addWikiText( "Special:Import is not ready for this beta release, sorry." );
$this->reason = $reason;
}
- function showForm( $err )
- {
- global $wgOut, $wgUser, $wgLang, $wgSysopUserBans;
+ function showForm( $err ) {
+ global $wgOut, $wgUser, $wgSysopUserBans;
$wgOut->setPagetitle( wfMsg( 'unblockip' ) );
$wgOut->addWikiText( wfMsg( 'unblockiptext' ) );
}
function doSubmit() {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser;
$block = new Block();
$this->ip = trim( $this->ip );
* Callback function to output a block
*/
function addRow( $block, $tag ) {
- global $wgOut, $wgUser, $wgLang, $wgContLang;
+ global $wgOut, $wgUser, $wgLang;
if( $this->ip != '' ) {
if( $block->mAuto ) {
}
function formatResult( $skin, $result ) {
- global $wgContLang;
$userPage = Title::makeTitle( $result->namespace, $result->title );
$name = $skin->makeLinkObj( $userPage, htmlspecialchars( $userPage->getText() ) );
$this->reason = $wgRequest->getText( 'wpLockReason' );
}
- function showForm( $err )
- {
- global $wgOut, $wgUser, $wgLang;
+ function showForm( $err ) {
+ global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( 'lockdb' ) );
$wgOut->addWikiText( wfMsg( 'lockdbtext' ) );
* Entry point
*/
function wfSpecialMaintenance( $par=NULL ) {
- global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest, $wgContLanguageCode;
+ global $wgUser, $wgOut, $wgContLang, $wgRequest, $wgContLanguageCode;
global $wgMiserMode;
# This pages is expensive ressource wise
* Generate a maintenance page link
*/
function getMPL ( $x ) {
- global $wgUser , $wgLang;
+ global $wgUser;
$sk = $wgUser->getSkin() ;
return $sk->makeKnownLink( sns().":Maintenance" , wfMsg($x), 'subfunction='.$x ) ;
}
* @deprecated
*/
function wfSpecialSelfLinks() {
- global $wgUser, $wgOut, $wgLang, $wgTitle;
+ global $wgUser, $wgOut;
$fname = 'wfSpecialSelfLinks';
list( $limit, $offset ) = wfCheckLimits();
*
*/
function wfSpecialMispeelings () {
- global $wgUser, $wgOut, $wgContLang, $wgTitle;
+ global $wgUser, $wgOut, $wgContLang;
$sk = $wgUser->getSkin();
$fname = 'wfSpecialMispeelings';
*
*/
function wfSpecialMissingLanguageLinks() {
- global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
+ global $wgUser, $wgOut, $wgContLang, $wgRequest;
$fname = 'wfSpecialMissingLanguageLinks';
$thelang = $wgRequest->getText( 'thelang' );
}
function showForm( $err ) {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( 'movepage' ) );
}
function doSubmit() {
- global $wgOut, $wgUser, $wgLang;
- global $wgDeferredUpdateList, $wgMessageCache;
- global $wgUseSquid, $wgRequest;
+ global $wgOut, $wgUser, $wgRequest;
$fname = "MovePageForm::doSubmit";
if ( $wgUser->pingLimiter( 'move' ) ) {
* used as e.g. Special:Randompage/Category
*/
function wfSpecialRandompage( $par = NS_MAIN ) {
- global $wgOut, $wgTitle, $wgArticle, $wgExtraRandompageSQL, $wgContLang;
+ global $wgOut, $wgExtraRandompageSQL, $wgContLang;
$fname = 'wfSpecialRandompage';
# Determine the namespace to get a random page from.
* Constructor
*/
function wfSpecialRecentchanges( $par, $specialPage ) {
- global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgMemc, $wgDBname;
- global $wgRequest, $wgSitename, $wgLanguageCode, $wgContLanguageCode;
- global $wgFeedClasses, $wgUseRCPatrol;
+ global $wgUser, $wgOut, $wgRequest, $wgUseRCPatrol;
global $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
global $wgLinkCache;
$fname = 'wfSpecialRecentchanges';
* @param string $par parent page we will look at
*/
function wfSpecialRecentchangeslinked( $par = NULL ) {
- global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgRequest;
+ global $wgUser, $wgOut, $wgContLang, $wgRequest;
$fname = 'wfSpecialRecentchangeslinked';
$days = $wgRequest->getInt( 'days' );
*
*/
function wfSpecialSpecialpages() {
- global $wgLang, $wgOut, $wgUser, $wgAvailableRights;
+ global $wgOut, $wgUser, $wgAvailableRights;
$wgOut->setRobotpolicy( 'index,nofollow' );
$sk = $wgUser->getSkin();
* @param $sk skin object ???
*/
function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
- global $wgLang, $wgOut, $wgSortSpecialPages;
+ global $wgOut, $wgSortSpecialPages;
if( count( $pages ) == 0 ) {
# Yeah, that was pointless. Thanks for coming.
* constructor
*/
function wfSpecialStatistics() {
- global $wgUser, $wgOut, $wgLang, $wgRequest;
+ global $wgOut, $wgLang, $wgRequest;
$fname = 'wfSpecialStatistics';
$action = $wgRequest->getVal( 'action' );
* @return bool
*/
function undelete( $timestamps ) {
- global $wgUser, $wgOut, $wgLang, $wgDeferredUpdateList;
- global $wgUseSquid, $wgInternalServer, $wgLinkCache;
- global $wgDBtype;
+ global $wgDeferredUpdateList, $wgLinkCache, $wgDBtype;
$fname = "doUndeleteArticle";
$restoreAll = empty( $timestamps );
}
function execute() {
- global $wgOut;
if( is_null( $this->mTargetObj ) ) {
return $this->showList();
}
- if( $this->mTimestamp !== "" ) {
+ if( $this->mTimestamp !== '' ) {
return $this->showRevision( $this->mTimestamp );
}
if( $this->mRestore && $this->mAction == "submit" ) {
class DBUnlockForm {
function showForm( $err )
{
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
}
function doSubmit() {
- global $wgOut, $wgUser, $wgLang;
- global $wgRequest, $wgReadOnlyFile;
+ global $wgOut, $wgUser, $wgRequest, $wgReadOnlyFile;
$wpLockConfirm = $wgRequest->getCheck( 'wpLockConfirm' );
if ( ! $wpLockConfirm ) {
}
function formatResult( $skin, $result ) {
- global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->title );
return $skin->makeLinkObj( $title, $title->getText() );
}
* @access private
*/
function processUpload() {
- global $wgUser, $wgOut, $wgLang, $wgContLang;
- global $wgUploadDirectory;
- global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
+ global $wgUser, $wgOut, $wgUploadDirectory;
/* Check for PHP error if any, requires php 4.2 or newer */
if ( $this->mUploadError == 1/*UPLOAD_ERR_INI_SIZE*/ ) {
* @access private
*/
function uploadWarning( $warning ) {
- global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+ global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
global $wgUseCopyrightUpload;
$this->mSessionKey = $this->stashSession();
* @access private
*/
function mainUploadForm( $msg='' ) {
- global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+ global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
global $wgUseCopyrightUpload;
$cols = intval($wgUser->getOption( 'cols' ));
* @param bool $useRename Not used in this implementation
*/
function saveUploadedFile( $saveName, $tempName, $useRename = false ) {
- global $wgUploadDirectory, $wgOut;
+ global $wgOut;
$mfs = MogileFS::NewMogileFS();
$this->mSavedFile = "image!{$saveName}";
*/
function addNewAccountInternal() {
global $wgUser, $wgOut;
- global $wgUseLatin1, $wgEnableSorbs, $wgProxyWhitelist;
+ global $wgEnableSorbs, $wgProxyWhitelist;
global $wgMemc, $wgAccountCreationThrottle, $wgDBname;
global $wgAuth, $wgMinimalPasswordLength;
* @access private
*/
function mailPassword() {
- global $wgUser, $wgDeferredUpdateList, $wgOutputEncoding;
- global $wgCookiePath, $wgCookieDomain, $wgDBname;
+ global $wgUser, $wgDBname;
if ( '' == $this->mName ) {
$this->mainLoginForm( wfMsg( 'noname' ) );
* @access private
*/
function mailPasswordInternal( $u ) {
- global $wgPasswordSender, $wgDBname;
- global $wgCookiePath, $wgCookieDomain;
+ global $wgDBname, $wgCookiePath, $wgCookieDomain;
if ( '' == $u->getEmail() ) {
return wfMsg( 'noemail', $u->getName() );
* constructor
*/
function wfSpecialUserlogout() {
- global $wgUser, $wgOut, $returnto;
+ global $wgUser, $wgOut;
if (wfRunHooks('UserLogout', array(&$wgUser))) {
* constructor
*/
function wfSpecialValidate( $page = '' ) {
- global $wgOut, $wgRequest, $wgUseValidation, $wgUser, $wgContLang;
+ global $wgOut, $wgRequest, $wgUseValidation, $wgUser;
if( !$wgUseValidation ) {
$wgOut->errorpage( "nosuchspecialpage", "nospecialpagetext" );
return;
}
-
# Can do?
if( ! $wgUser->isBureaucrat() ) {#isAllowed('change_validation') ) {
$wgOut->sysopRequired();
return;
}
-
$mode = $wgRequest->getVal( "mode" );
$skin = $wgUser->getSkin();
-
if( $mode == "manage" ) {
$v = new Validation();
$html = $v->manageTopics();
* constructor
*/
function wfSpecialWatchlist( $par ) {
- global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest, $wgContLang;
+ global $wgUser, $wgOut, $wgLang, $wgMemc, $wgRequest, $wgContLang;
global $wgUseWatchlistCache, $wgWLCacheTimeout, $wgDBname;
global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
global $wgEnotifWatchlist, $wgFilterRobotsWL;
/** */
function wfStreamFile( $fname ) {
- global $wgSquidMaxage;
$stat = @stat( $fname );
if ( !$stat ) {
header( 'HTTP/1.0 404 Not Found' );
* @access public
*/
function newFromURL( $url ) {
- global $wgLang, $wgServer;
$t = new Title();
# For compatibility with old buggy URLs. "+" is not valid in titles,
* search index
*/
/* static */ function indexTitle( $ns, $title ) {
- global $wgDBminWordLen, $wgContLang;
+ global $wgContLang;
require_once( 'SearchEngine.php' );
$lc = SearchEngine::legalSearchChars() . '&#;';
* @access public
*/
function touchArray( $titles, $timestamp = '' ) {
- global $wgUseFileCache;
if ( count( $titles ) == 0 ) {
return;
* Load a user from the database
*/
function loadFromDatabase() {
- global $wgCommandLineMode;
$fname = "User::loadFromDatabase";
# Counter-intuitive, breaks various things, use User::setLoaded() if you want to suppress
* @param string $replyto optional reply-to email (default : false)
*/
function userMailer( $to, $from, $subject, $body, $replyto=false ) {
- global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString, $wgEmergencyContact;
+ global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString;
if (is_array( $wgSMTP )) {
require_once( 'Mail.php' );
function notifyOnPageChange(&$title, $timestamp, $summary, $minorEdit, $oldid=false) {
# we use $wgEmergencyContact as sender's address
- global $wgUser, $wgLang, $wgEmergencyContact;
- global $wgEnotifWatchlist, $wgEnotifMinorEdits;
- global $wgEnotifUserTalk;
- global $wgEnotifRevealEditorAddress;
- global $wgEnotifFromEditor;
- global $wgEmailAuthentication;
- global $wgShowUpdatedMarker;
+ global $wgUser, $wgEnotifWatchlist;
+ global $wgEnotifMinorEdits, $wgEnotifUserTalk, $wgShowUpdatedMarker;
$fname = 'UserMailer::notifyOnPageChange';
wfProfileIn( $fname );
* @access private
*/
function composeCommonMailtext() {
- global $wgLang, $wgUser, $wgEmergencyContact;
- global $wgEnotifRevealEditorAddress;
- global $wgEnotifFromEditor;
- global $wgNoReplyAddress;
+ global $wgUser, $wgEmergencyContact, $wgNoReplyAddress;
+ global $wgEnotifFromEditor, $wgEnotifRevealEditorAddress;
$summary = ($this->summary == '') ? ' - ' : $this->summary;
$medit = ($this->minorEdit) ? wfMsg( 'minoredit' ) : '';
* @param $timestamp
*/
function UserTalkUpdate( $action, $ns, $title, $summary, $minoredit, $timestamp) {
- global $wgUser, $wgLang, $wgMemc, $wgDBname;
+ global $wgUser, $wgMemc, $wgDBname;
$fname = 'UserTalkUpdate::UserTalkUpdate';
$this->mAction = $action;
*/
function getGPCVal( &$arr, $name, $default ) {
if( isset( $arr[$name] ) ) {
- global $wgServer, $wgContLang;
+ global $wgContLang;
$data = $arr[$name];
if( isset( $_GET[$name] ) && !is_array( $data ) ) {
# Check for alternate/legacy character encoding.