Reverted r108743 per CR comment. This should at least be discussed first.
This commit is contained in:
parent
14a1627985
commit
5a6559d8b1
54 changed files with 129 additions and 21 deletions
|
|
@ -94,6 +94,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
|
|||
|
||||
/**
|
||||
* @param $text string
|
||||
* @return void
|
||||
*/
|
||||
public function setText( $text ) {
|
||||
$this->uncompress();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class Hooks {
|
|||
*
|
||||
* @param $name Mixed: name of hook
|
||||
* @param $callback Mixed: callback function to attach
|
||||
* @return void
|
||||
*/
|
||||
public static function register( $name, $callback ) {
|
||||
if( !isset( self::$handlers[$name] ) ) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ class ImagePage extends Article {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $file File
|
||||
* @param $file File:
|
||||
* @return void
|
||||
*/
|
||||
public function setFile( $file ) {
|
||||
$this->mPage->setFile( $file );
|
||||
|
|
|
|||
|
|
@ -394,6 +394,8 @@ abstract class IndexPager extends ContextSource implements Pager {
|
|||
* Called from getBody(), before getStartBody() is called and
|
||||
* after doQuery() was called. This will be called only if there
|
||||
* are rows in the result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function doBatchLookups() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ class Preferences {
|
|||
* @param $user User
|
||||
* @param $context IContextSource
|
||||
* @param $defaultPreferences
|
||||
* @return void
|
||||
*/
|
||||
static function profilePreferences( $user, IContextSource $context, &$defaultPreferences ) {
|
||||
global $wgAuth, $wgContLang, $wgParser, $wgCookieExpiration, $wgLanguageCode,
|
||||
|
|
@ -455,6 +456,7 @@ class Preferences {
|
|||
* @param $user User
|
||||
* @param $context IContextSource
|
||||
* @param $defaultPreferences
|
||||
* @return void
|
||||
*/
|
||||
static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) {
|
||||
## Skin #####################################
|
||||
|
|
@ -530,6 +532,7 @@ class Preferences {
|
|||
* @param $user User
|
||||
* @param $context IContextSource
|
||||
* @param $defaultPreferences
|
||||
* @return void
|
||||
*/
|
||||
static function datetimePreferences( $user, IContextSource $context, &$defaultPreferences ) {
|
||||
## Date and time #####################################
|
||||
|
|
|
|||
|
|
@ -340,6 +340,7 @@ class SquidPurgeClientPool {
|
|||
|
||||
/**
|
||||
* @param $client SquidPurgeClient
|
||||
* @return void
|
||||
*/
|
||||
public function addClient( $client ) {
|
||||
$this->clients[] = $client;
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ class Title {
|
|||
* If false is given, the title will be treated as non-existing.
|
||||
*
|
||||
* @param $row Object|false database row
|
||||
* @return void
|
||||
*/
|
||||
public function loadFromRow( $row ) {
|
||||
if ( $row ) { // page found
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class TitleArrayFromResult extends TitleArray {
|
|||
|
||||
/**
|
||||
* @param $row ResultWrapper
|
||||
* @return void
|
||||
*/
|
||||
protected function setCurrent( $row ) {
|
||||
if ( $row === false ) {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class UserArrayFromResult extends UserArray {
|
|||
|
||||
/**
|
||||
* @param $row
|
||||
* @return void
|
||||
*/
|
||||
protected function setCurrent( $row ) {
|
||||
if ( $row === false ) {
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@ class MediaWiki {
|
|||
* - redirect loop
|
||||
* - special pages
|
||||
* - normal pages
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function performRequest() {
|
||||
global $wgServer, $wgUsePathInfo, $wgTitle;
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ class WikiPage extends Page {
|
|||
* A DB query result object or...
|
||||
* "fromdb" to get from a slave DB or...
|
||||
* "fromdbmaster" to get from the master DB
|
||||
* @return void
|
||||
*/
|
||||
public function loadPageData( $data = 'fromdb' ) {
|
||||
if ( $data === 'fromdbmaster' ) {
|
||||
|
|
@ -621,6 +622,7 @@ class WikiPage extends Page {
|
|||
/**
|
||||
* Set the page timestamp (use only to avoid DB queries)
|
||||
* @param $ts string MW timestamp of last article revision
|
||||
* @return void
|
||||
*/
|
||||
public function setTimestamp( $ts ) {
|
||||
$this->mTimestamp = wfTimestamp( TS_MW, $ts );
|
||||
|
|
@ -703,6 +705,7 @@ class WikiPage extends Page {
|
|||
* Set the cached timestamp for the last time the page changed.
|
||||
* This is only used to help handle slave lag by comparing to page_touched.
|
||||
* @param $timestamp string
|
||||
* @return void
|
||||
*/
|
||||
public function setCachedLastEditTime( $timestamp ) {
|
||||
global $wgMemc;
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ class ApiImportReporter extends ImportReporter {
|
|||
* @param $revisionCount int
|
||||
* @param $successCount int
|
||||
* @param $pageInfo
|
||||
* @return void
|
||||
*/
|
||||
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
|
||||
// Add a result entry
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$db = $this->getDB();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function executeGenerator( $resultPageSet ) {
|
||||
if ( $resultPageSet->isResolvingRedirects() ) {
|
||||
|
|
@ -72,6 +73,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$repo = $this->mRepo;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function executeGenerator( $resultPageSet ) {
|
||||
if ( $resultPageSet->isResolvingRedirects() ) {
|
||||
|
|
@ -56,6 +57,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$db = $this->getDB();
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function prepareFirstQuery( $resultPageSet = null ) {
|
||||
/* SELECT page_id, page_title, page_namespace, page_is_redirect
|
||||
|
|
@ -160,6 +161,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function prepareSecondQuery( $resultPageSet = null ) {
|
||||
/* SELECT page_id, page_title, page_namespace, page_is_redirect, pl_title, pl_namespace
|
||||
|
|
@ -221,6 +223,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$this->params = $this->extractRequestParams( false );
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ abstract class ApiQueryBase extends ApiBase {
|
|||
* Also adds relevant block information
|
||||
*
|
||||
* @param bool $showBlockInfo
|
||||
* @return void
|
||||
*/
|
||||
public function showHiddenUsersAddBlockInfo( $showBlockInfo ) {
|
||||
$userCanViewHiddenUsers = $this->getUser()->isAllowed( 'hideuser' );
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class ApiQueryInfo extends ApiQueryBase {
|
|||
|
||||
/**
|
||||
* @param $pageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function requestExtraData( $pageSet ) {
|
||||
global $wgDisableCounters;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $randstr
|
||||
* @param $limit
|
||||
* @param $namespace
|
||||
* @param $randstr
|
||||
* @param $limit
|
||||
* @param $namespace
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @param $redirect
|
||||
* @param $redirect
|
||||
* @return void
|
||||
*/
|
||||
protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) {
|
||||
$this->resetQueryParams();
|
||||
|
|
@ -100,6 +101,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
public function run( $resultPageSet = null ) {
|
||||
$params = $this->extractRequestParams();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
global $wgContLang;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' );
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
|
|||
|
||||
/**
|
||||
* @param $resultPageSet ApiPageSet
|
||||
* @return void
|
||||
*/
|
||||
private function run( $resultPageSet = null ) {
|
||||
$this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' );
|
||||
|
|
|
|||
3
includes/cache/FileCacheBase.php
vendored
3
includes/cache/FileCacheBase.php
vendored
|
|
@ -151,6 +151,7 @@ abstract class FileCacheBase {
|
|||
|
||||
/**
|
||||
* Clear the cache for this page
|
||||
* @return void
|
||||
*/
|
||||
public function clearCache() {
|
||||
wfSuppressWarnings();
|
||||
|
|
@ -161,6 +162,7 @@ abstract class FileCacheBase {
|
|||
|
||||
/**
|
||||
* Create parent directors of $this->cachePath()
|
||||
* @return void
|
||||
*/
|
||||
protected function checkCacheDirs() {
|
||||
wfMkdirParents( dirname( $this->cachePath() ), null, __METHOD__ );
|
||||
|
|
@ -196,6 +198,7 @@ abstract class FileCacheBase {
|
|||
/**
|
||||
* Roughly increments the cache misses in the last hour by unique visitors
|
||||
* @param $request WebRequest
|
||||
* @return void
|
||||
*/
|
||||
public function incrMissesRecent( WebRequest $request ) {
|
||||
global $wgMemc;
|
||||
|
|
|
|||
1
includes/cache/HTMLFileCache.php
vendored
1
includes/cache/HTMLFileCache.php
vendored
|
|
@ -92,6 +92,7 @@ class HTMLFileCache extends FileCacheBase {
|
|||
/**
|
||||
* Read from cache to context output
|
||||
* @param $context IContextSource
|
||||
* @return void
|
||||
*/
|
||||
public function loadFromFileCache( IContextSource $context ) {
|
||||
global $wgMimeType, $wgLanguageCode;
|
||||
|
|
|
|||
1
includes/cache/SquidUpdate.php
vendored
1
includes/cache/SquidUpdate.php
vendored
|
|
@ -99,6 +99,7 @@ class SquidUpdate {
|
|||
* XXX report broken Squids per mail or log
|
||||
*
|
||||
* @param $urlArr array
|
||||
* @return void
|
||||
*/
|
||||
static function purge( $urlArr ) {
|
||||
global $wgSquidServers, $wgHTCPMulticastAddress, $wgHTCPPort;
|
||||
|
|
|
|||
|
|
@ -86,18 +86,18 @@ class CloneDatabase {
|
|||
* Clone the table structure
|
||||
*/
|
||||
public function cloneTableStructure() {
|
||||
|
||||
|
||||
foreach( $this->tablesToClone as $tbl ) {
|
||||
# Clean up from previous aborted run. So that table escaping
|
||||
# works correctly across DB engines, we need to change the pre-
|
||||
# fix back and forth so tableName() works right.
|
||||
|
||||
|
||||
self::changePrefix( $this->oldTablePrefix );
|
||||
$oldTableName = $this->db->tableName( $tbl, 'raw' );
|
||||
|
||||
|
||||
self::changePrefix( $this->newTablePrefix );
|
||||
$newTableName = $this->db->tableName( $tbl, 'raw' );
|
||||
|
||||
|
||||
if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) {
|
||||
$this->db->dropTable( $tbl, __METHOD__ );
|
||||
wfDebug( __METHOD__." dropping {$newTableName}\n", true);
|
||||
|
|
@ -107,9 +107,9 @@ class CloneDatabase {
|
|||
# Create new table
|
||||
wfDebug( __METHOD__." duplicating $oldTableName to $newTableName\n", true );
|
||||
$this->db->duplicateTableStructure( $oldTableName, $newTableName, $this->useTemporaryTables );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -129,7 +129,8 @@ class CloneDatabase {
|
|||
/**
|
||||
* Change the table prefix on all open DB connections/
|
||||
*
|
||||
* @param $prefix
|
||||
* @param $prefix
|
||||
* @return void
|
||||
*/
|
||||
public static function changePrefix( $prefix ) {
|
||||
global $wgDBprefix;
|
||||
|
|
@ -138,16 +139,18 @@ class CloneDatabase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $lb LoadBalancer
|
||||
* @param $prefix
|
||||
* @param $lb LoadBalancer
|
||||
* @param $prefix
|
||||
* @return void
|
||||
*/
|
||||
public static function changeLBPrefix( $lb, $prefix ) {
|
||||
$lb->forEachOpenConnection( array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $db DatabaseBase
|
||||
* @param $prefix
|
||||
* @param $db DatabaseBase
|
||||
* @param $prefix
|
||||
* @return void
|
||||
*/
|
||||
public static function changeDBPrefix( $db, $prefix ) {
|
||||
$db->tablePrefix( $prefix );
|
||||
|
|
|
|||
|
|
@ -3052,6 +3052,7 @@ abstract class DatabaseBase implements DatabaseType {
|
|||
* Override database's default connection timeout
|
||||
*
|
||||
* @param $timeout Integer in seconds
|
||||
* @return void
|
||||
* @deprecated since 1.19; use setSessionOptions()
|
||||
*/
|
||||
public function setTimeout( $timeout ) {
|
||||
|
|
@ -3067,6 +3068,7 @@ abstract class DatabaseBase implements DatabaseType {
|
|||
* hours or days.
|
||||
*
|
||||
* @param $options Array
|
||||
* @return void
|
||||
*/
|
||||
public function setSessionOptions( array $options ) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ class FileRepo {
|
|||
* directories, in case the user has not configured offline storage
|
||||
*
|
||||
* @param $dir string
|
||||
* @return void
|
||||
*/
|
||||
protected function initDeletedDir( $dir ) {
|
||||
$this->backend->secure( // prevent web access & dir listings
|
||||
|
|
@ -717,7 +718,8 @@ class FileRepo {
|
|||
* Each file can be a (zone, rel) pair, virtual url, storage path, or FS path.
|
||||
* It will try to delete each file, but ignores any errors that may occur.
|
||||
*
|
||||
* @param $files array List of files to delete
|
||||
* @param $pairs array List of files to delete
|
||||
* @return void
|
||||
*/
|
||||
public function cleanupBatch( $files ) {
|
||||
$operations = array();
|
||||
|
|
@ -1215,6 +1217,7 @@ class FileRepo {
|
|||
* May use either the database or the filesystem.
|
||||
*
|
||||
* @param $callback Array|string
|
||||
* @return void
|
||||
*/
|
||||
public function enumFiles( $callback ) {
|
||||
$this->enumFilesInStorage( $callback );
|
||||
|
|
@ -1225,6 +1228,7 @@ class FileRepo {
|
|||
* May use either the database or the filesystem.
|
||||
*
|
||||
* @param $callback Array|string
|
||||
* @return void
|
||||
*/
|
||||
protected function enumFilesInStorage( $callback ) {
|
||||
$publicRoot = $this->getZonePath( 'public' );
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ class LocalRepo extends FileRepo {
|
|||
* Invalidates image redirect cache related to that image
|
||||
*
|
||||
* @param $title Title of page
|
||||
* @return void
|
||||
*/
|
||||
function invalidateImageRedirect( Title $title ) {
|
||||
global $wgMemc;
|
||||
|
|
|
|||
|
|
@ -515,6 +515,7 @@ abstract class FileBackendBase {
|
|||
* If $paths is given, then only the cache for those files will be cleared.
|
||||
*
|
||||
* @param $paths Array Storage paths
|
||||
* @return void
|
||||
*/
|
||||
abstract public function clearCache( array $paths = null );
|
||||
|
||||
|
|
@ -1163,6 +1164,8 @@ abstract class FileBackend extends FileBackendBase {
|
|||
|
||||
/**
|
||||
* Prune the cache if it is too big to add an item
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function trimCache() {
|
||||
if ( count( $this->cache ) >= $this->maxCacheSize ) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ class FileBackendGroup {
|
|||
|
||||
/**
|
||||
* Destroy the singleton instance
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function destroySingleton() {
|
||||
self::$instance = null;
|
||||
|
|
@ -39,6 +41,8 @@ class FileBackendGroup {
|
|||
|
||||
/**
|
||||
* Register file backends from the global variables
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initFromGlobals() {
|
||||
global $wgLocalFileRepo, $wgForeignFileRepos, $wgFileBackends;
|
||||
|
|
@ -89,6 +93,7 @@ class FileBackendGroup {
|
|||
* Register an array of file backend configurations
|
||||
*
|
||||
* @param $configs Array
|
||||
* @return void
|
||||
* @throws MWException
|
||||
*/
|
||||
protected function register( array $configs ) {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ abstract class FileOp {
|
|||
|
||||
/**
|
||||
* Disable file backups for this operation
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
final protected function disableBackups() {
|
||||
$this->useBackups = false;
|
||||
|
|
@ -63,6 +65,8 @@ abstract class FileOp {
|
|||
* Allow stale data for file reads and existence checks.
|
||||
* If this is called, then disableBackups() should also be called
|
||||
* unless the affected files are known to have not changed recently.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
final protected function allowStaleReads() {
|
||||
$this->useLatest = false;
|
||||
|
|
@ -500,6 +504,7 @@ abstract class FileOp {
|
|||
* Log a file operation failure and preserve any temp files
|
||||
*
|
||||
* @param $fileOp FileOp
|
||||
* @return void
|
||||
*/
|
||||
final protected function logFailure( $action ) {
|
||||
$params = $this->params;
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ class DBLockManager extends LockManager {
|
|||
*
|
||||
* @param $lockDb string
|
||||
* @param $db DatabaseBase
|
||||
* @return void
|
||||
* @throws DBError
|
||||
*/
|
||||
protected function initConnection( $lockDb, DatabaseBase $db ) {}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ class LockManagerGroup {
|
|||
|
||||
/**
|
||||
* Register lock managers from the global variables
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initFromGlobals() {
|
||||
global $wgLockManagers;
|
||||
|
|
@ -38,6 +40,7 @@ class LockManagerGroup {
|
|||
* Register an array of file lock manager configurations
|
||||
*
|
||||
* @param $configs Array
|
||||
* @return void
|
||||
* @throws MWException
|
||||
*/
|
||||
protected function register( array $configs ) {
|
||||
|
|
|
|||
|
|
@ -1694,7 +1694,8 @@ abstract class File {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $from
|
||||
* @param $from
|
||||
* @return void
|
||||
*/
|
||||
function redirectedFrom( $from ) {
|
||||
$this->redirected = $from;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class TempFSFile extends FSFile {
|
|||
* Clean up the temporary file only after an object goes out of scope
|
||||
*
|
||||
* @param $object Object
|
||||
* @return void
|
||||
*/
|
||||
public function bind( $object ) {
|
||||
if ( is_object( $object ) ) {
|
||||
|
|
@ -75,6 +76,8 @@ class TempFSFile extends FSFile {
|
|||
|
||||
/**
|
||||
* Set flag to not clean up after the temporary file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function preserve() {
|
||||
$this->canDelete = false;
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ class GIFMetadataExtractor {
|
|||
/**
|
||||
* @param $fh
|
||||
* @param $bpp
|
||||
* @return void
|
||||
*/
|
||||
static function readGCT( $fh, $bpp ) {
|
||||
if ( $bpp > 0 ) {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ abstract class MediaTransformOutput {
|
|||
|
||||
/**
|
||||
* @param $storagePath string The permanent storage path
|
||||
* @return void
|
||||
*/
|
||||
public function setStoragePath( $storagePath ) {
|
||||
$this->storagePath = $storagePath;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
class CoreParserFunctions {
|
||||
/**
|
||||
* @param $parser Parser
|
||||
* @return void
|
||||
*/
|
||||
static function register( $parser ) {
|
||||
global $wgAllowDisplayTitle, $wgAllowSlowParserFunctions;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
class CoreTagHooks {
|
||||
/**
|
||||
* @param $parser Parser
|
||||
* @return void
|
||||
*/
|
||||
static function register( $parser ) {
|
||||
global $wgRawHtml;
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ class ParserOutput extends CacheTime {
|
|||
* @param $name string Title dbKey
|
||||
* @param $timestamp string MW timestamp of file creation (or false if non-existing)
|
||||
* @param $sha string base 36 SHA-1 of file (or false if non-existing)
|
||||
* @return void
|
||||
*/
|
||||
function addImage( $name, $timestamp = null, $sha1 = null ) {
|
||||
$this->mImages[$name] = 1;
|
||||
|
|
@ -299,6 +300,7 @@ class ParserOutput extends CacheTime {
|
|||
* @param $title Title
|
||||
* @param $page_id
|
||||
* @param $rev_id
|
||||
* @return void
|
||||
*/
|
||||
function addTemplate( $title, $page_id, $rev_id ) {
|
||||
$ns = $title->getNamespace();
|
||||
|
|
|
|||
|
|
@ -521,6 +521,7 @@ class ResourceLoader {
|
|||
* @param $context ResourceLoaderContext
|
||||
* @param $mtime string TS_MW timestamp to use for last-modified
|
||||
* @param $private bool True iff response contains any private modules
|
||||
* @return void
|
||||
*/
|
||||
protected function sendResponseHeaders( ResourceLoaderContext $context, $mtime, $private ) {
|
||||
global $wgResourceLoaderMaxage;
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ class ImportReporter extends ContextSource {
|
|||
* @param int $revisionCount
|
||||
* @param $successCount
|
||||
* @param $pageInfo
|
||||
* @return void
|
||||
*/
|
||||
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
|
||||
global $wgContLang;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ class SpecialMergeHistory extends SpecialPage {
|
|||
parent::__construct( 'MergeHistory', 'mergehistory' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function loadRequestParams() {
|
||||
$request = $this->getRequest();
|
||||
$this->mAction = $request->getVal( 'action' );
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class ShortPagesPage extends QueryPage {
|
|||
/**
|
||||
* @param $db DatabaseBase
|
||||
* @param $res
|
||||
* @return void
|
||||
*/
|
||||
function preprocessResults( $db, $res ) {
|
||||
# There's no point doing a batch check if we aren't caching results;
|
||||
|
|
|
|||
|
|
@ -656,6 +656,7 @@ class LoginForm extends SpecialPage {
|
|||
/**
|
||||
* Clear the login attempt throttle hit count for the (username,current IP) tuple.
|
||||
* @param $username string The user name
|
||||
* @return void
|
||||
*/
|
||||
public static function clearLoginThrottle( $username ) {
|
||||
global $wgMemc, $wgRequest;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ class BenchmarkDeleteTruncate extends Benchmarker {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $dbw DatabaseBase
|
||||
* @param $dbw DatabaseBase
|
||||
* @return void
|
||||
*/
|
||||
private function insertData( $dbw ) {
|
||||
$range = range( 0, 1024 );
|
||||
|
|
@ -56,14 +57,16 @@ class BenchmarkDeleteTruncate extends Benchmarker {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $dbw DatabaseBase
|
||||
* @param $dbw DatabaseBase
|
||||
* @return void
|
||||
*/
|
||||
private function delete( $dbw ) {
|
||||
$dbw->delete( 'text', '*', __METHOD__ );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $dbw DatabaseBase
|
||||
* @param $dbw DatabaseBase
|
||||
* @return void
|
||||
*/
|
||||
private function truncate( $dbw ) {
|
||||
$test = $dbw->tableName( 'test' );
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ class LockServerDaemon {
|
|||
: 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function setupSocket() {
|
||||
if ( !function_exists( 'socket_create' ) ) {
|
||||
throw new Exception( "PHP sockets extension missing from PHP CLI mode." );
|
||||
|
|
@ -122,6 +125,9 @@ class LockServerDaemon {
|
|||
$this->startTime = time();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function main() {
|
||||
// Setup socket and start listing
|
||||
$this->setupSocket();
|
||||
|
|
@ -348,6 +354,8 @@ class LockServerDaemon {
|
|||
|
||||
/**
|
||||
* Clear locks for sessions that have been dead for a while
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function purgeExpiredLocks() {
|
||||
$now = time();
|
||||
|
|
@ -362,6 +370,7 @@ class LockServerDaemon {
|
|||
/**
|
||||
* @param $key string
|
||||
* @param $session string
|
||||
* @return void
|
||||
*/
|
||||
protected function set_sh_lock( $key, $session ) {
|
||||
if ( !isset( $this->shLocks[$key][$session] ) ) {
|
||||
|
|
@ -374,6 +383,7 @@ class LockServerDaemon {
|
|||
/**
|
||||
* @param $key string
|
||||
* @param $session string
|
||||
* @return void
|
||||
*/
|
||||
protected function set_ex_lock( $key, $session ) {
|
||||
if ( !isset( $this->exLocks[$key][$session] ) ) {
|
||||
|
|
@ -386,6 +396,7 @@ class LockServerDaemon {
|
|||
/**
|
||||
* @param $key string
|
||||
* @param $session string
|
||||
* @return void
|
||||
*/
|
||||
protected function unset_sh_lock( $key, $session ) {
|
||||
if ( isset( $this->shLocks[$key][$session] ) ) {
|
||||
|
|
@ -404,6 +415,7 @@ class LockServerDaemon {
|
|||
/**
|
||||
* @param $key string
|
||||
* @param $session string
|
||||
* @return void
|
||||
*/
|
||||
protected function unset_ex_lock( $key, $session ) {
|
||||
if ( isset( $this->exLocks[$key] ) && $this->exLocks[$key] === $session ) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ wfLogProfilingData();
|
|||
|
||||
/**
|
||||
* Handle a thumbnail request via query parameters
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function wfThumbHandleRequest() {
|
||||
$params = get_magic_quotes_gpc()
|
||||
|
|
@ -40,6 +42,8 @@ function wfThumbHandleRequest() {
|
|||
|
||||
/**
|
||||
* Handle a thumbnail request via thumbnail file URL
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function wfThumbHandle404() {
|
||||
# lighttpd puts the original request in REQUEST_URI, while
|
||||
|
|
@ -65,6 +69,7 @@ function wfThumbHandle404() {
|
|||
* Stream a thumbnail specified by parameters
|
||||
*
|
||||
* @param $params Array
|
||||
* @return void
|
||||
*/
|
||||
function wfStreamThumb( array $params ) {
|
||||
wfProfileIn( __METHOD__ );
|
||||
|
|
@ -261,6 +266,7 @@ function wfExtractThumbParams( $uri ) {
|
|||
*
|
||||
* @param $status integer
|
||||
* @param $msg string
|
||||
* @return void
|
||||
*/
|
||||
function wfThumbError( $status, $msg ) {
|
||||
global $wgShowHostnames;
|
||||
|
|
|
|||
Loading…
Reference in a new issue