SpecialPage::getPageTitle.
==== Removed classes ====
-* TitleDependency
-* TitleListDependency
+* TitleDependency (unused)
+* TitleListDependency (unused)
+* WikiError (deprecated in 1.17)
+* WikiXmlError (deprecated in 1.17)
+* WikiErrorMsg (deprecated in 1.17)
==== Renamed classes ====
* CdbReader_DBA to CdbReaderDBA
* wikiStatsOutput to WikiStatsOutput
==== Removed methods ====
+* ApiBase::getValidNamespaces() (deprecated in 1.17)
+* ApiMain::setCachePrivate() (deprecated in 1.17)
+* ApiMain::setVaryCookie (deprecated in 1.17)
+* CategoryViewer::addSubcategory() (deprecated in 1.17)
* EditPage::spamPage() (deprecated since 1.17)
* Exif::getFormattedData() (deprecated in 1.18)
* Exif::makeFormattedData() (deprecated in 1.18)
* SpecialRecentChanges::feedSetup()
* SpecialRevisionDelete::extractBitField() (deprecated in 1.22)
* User::getPageRenderingHash() (deprecated in 1.17)
+* WebRequest::getFileSize() (deprecated in 1.17)
+* WebRequest::isPathInfoBad() (deprecated in 1.17)
* WikiPage::quickEdit() (deprecated in 1.18)
* WikiPage::useParserCache() (deprecated in 1.18)
* WikiPage::viewUpdates() (deprecated in 1.18)
'WebRequestUpload' => 'includes/WebRequest.php',
'WebResponse' => 'includes/WebResponse.php',
'WikiCategoryPage' => 'includes/WikiCategoryPage.php',
- 'WikiError' => 'includes/WikiError.php',
- 'WikiErrorMsg' => 'includes/WikiError.php',
'WikiExporter' => 'includes/Export.php',
'WikiFilePage' => 'includes/WikiFilePage.php',
'WikiImporter' => 'includes/Import.php',
'WikiRevision' => 'includes/Import.php',
'WikiMap' => 'includes/WikiMap.php',
'WikiReference' => 'includes/WikiMap.php',
- 'WikiXmlError' => 'includes/WikiError.php',
'Xml' => 'includes/Xml.php',
'XmlDumpWriter' => 'includes/Export.php',
'XmlJsCode' => 'includes/Xml.php',
$this->getSubcategorySortChar( $cat->getTitle(), $sortkey );
}
- /**
- * Add a subcategory to the internal lists, using a title object
- * @deprecated since 1.17 kept for compatibility, use addSubcategoryObject instead
- */
- function addSubcategory( Title $title, $sortkey, $pageLength ) {
- wfDeprecated( __METHOD__, '1.17' );
- $this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength );
- }
-
/**
* Get the character to be used for sorting subcategories.
* If there's a link from Category:A to Category:B, the sortkey of the resulting
* @ingroup Maintenance
*/
class ForkController {
- protected $children = array();
+ protected $children = array(), $childNumber = 0;
protected $termReceived = false;
protected $flags = 0, $procsToStart = 0;
return 'done';
}
+ /**
+ * Get the number of the child currently running. Note, this
+ * is not the pid, but rather which of the total number of children
+ * we are
+ * @return int
+ */
+ public function getChildNumber() {
+ return $this->childNumber;
+ }
+
protected function prepareEnvironment() {
global $wgMemc;
// Don't share DB, storage, or memcached connections
if ( !$pid ) {
$this->initChild();
+ $this->childNumber = $i;
return 'child';
} else {
// This is the parent process
return $file->getTempName();
}
- /**
- * Return the size of the upload, or 0.
- *
- * @deprecated since 1.17
- * @param $key String:
- * @return integer
- */
- public function getFileSize( $key ) {
- wfDeprecated( __METHOD__, '1.17' );
- $file = new WebRequestUpload( $this, $key );
- return $file->getSize();
- }
-
/**
* Return the upload error or 0
*
return true;
}
- /**
- * Returns true if the PATH_INFO ends with an extension other than a script
- * extension. This could confuse IE for scripts that send arbitrary data which
- * is not HTML but may be detected as such.
- *
- * Various past attempts to use the URL to make this check have generally
- * run up against the fact that CGI does not provide a standard method to
- * determine the URL. PATH_INFO may be mangled (e.g. if cgi.fix_pathinfo=0),
- * but only by prefixing it with the script name and maybe some other stuff,
- * the extension is not mangled. So this should be a reasonably portable
- * way to perform this security check.
- *
- * Also checks for anything that looks like a file extension at the end of
- * QUERY_STRING, since IE 6 and earlier will use this to get the file type
- * if there was no dot before the question mark (bug 28235).
- *
- * @deprecated Use checkUrlExtension().
- *
- * @param $extWhitelist array
- *
- * @return bool
- */
- public function isPathInfoBad( $extWhitelist = array() ) {
- wfDeprecated( __METHOD__, '1.17' );
- global $wgScriptExtension;
- $extWhitelist[] = ltrim( $wgScriptExtension, '.' );
- return IEUrlExtension::areServerVarsBad( $_SERVER, $extWhitelist );
- }
-
/**
* Parse the Accept-Language header sent by the client into an array
* @return array array( languageCode => q-value ) sorted by q-value in descending order then
return $this->session;
}
- /**
- * @param array $extWhitelist
- * @return bool
- */
- public function isPathInfoBad( $extWhitelist = array() ) {
- return false;
- }
-
/**
* FauxRequests shouldn't depend on raw request data (but that could be implemented here)
* @return String
+++ /dev/null
-<?php
-/**
- * MediaWiki error classes
- *
- * Copyright © 2005 Brion Vibber <brion@pobox.com>
- * http://www.mediawiki.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * Since PHP4 doesn't have exceptions, here's some error objects
- * loosely modeled on the standard PEAR_Error model...
- * @ingroup Exception
- */
-class WikiError {
- /**
- * @param $message string
- *
- * @deprecated since 1.17
- */
- function __construct( $message ) {
- wfDeprecated( __METHOD__, '1.17' );
- $this->mMessage = $message;
- }
-
- /**
- * @return string Plaintext error message to display
- */
- function getMessage() {
- return $this->mMessage;
- }
-
- /**
- * In following PEAR_Error model this could be formatted differently,
- * but so far it's not.
- * @return string
- */
- function toString() {
- return $this->getMessage();
- }
-
- /**
- * Returns true if the given object is a WikiError-descended
- * error object, false otherwise.
- *
- * @param $object mixed
- * @return bool
- *
- * @deprecated since 1.17
- */
- public static function isError( $object ) {
- wfDeprecated( __METHOD__, '1.17' );
- if ( $object instanceof WikiError ) {
- return true;
- } elseif ( $object instanceof Status ) {
- return !$object->isOK();
- } else {
- return false;
- }
- }
-}
-
-/**
- * Localized error message object
- * @ingroup Exception
- */
-class WikiErrorMsg extends WikiError {
- /**
- * @param string $message wiki message name
- * @param ... parameters to pass to wfMsg()
- *
- * @deprecated since 1.17
- */
- function __construct( $message/*, ... */ ) {
- wfDeprecated( __METHOD__, '1.17' );
- $args = func_get_args();
- array_shift( $args );
- $this->mMessage = wfMessage( $message )->rawParams( $args )->text();
- $this->mMsgKey = $message;
- $this->mMsgArgs = $args;
- }
-
- function getMessageKey() {
- return $this->mMsgKey;
- }
-
- function getMessageArgs() {
- return $this->mMsgArgs;
- }
-}
-
-/**
- * Error class designed to handle errors involved with
- * XML parsing
- * @ingroup Exception
- */
-class WikiXmlError extends WikiError {
- /**
- * @param $parser resource
- * @param $message string
- * @param $context
- * @param $offset Int
- *
- * @deprecated since 1.17
- */
- function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
- wfDeprecated( __METHOD__, '1.17' );
- $this->mXmlError = xml_get_error_code( $parser );
- $this->mColumn = xml_get_current_column_number( $parser );
- $this->mLine = xml_get_current_line_number( $parser );
- $this->mByte = xml_get_current_byte_index( $parser );
- $this->mContext = $this->_extractContext( $context, $offset );
- $this->mMessage = $message;
- xml_parser_free( $parser );
- wfDebug( "WikiXmlError: " . $this->getMessage() . "\n" );
- }
-
- /** @return string */
- function getMessage() {
- // '$1 at line $2, col $3 (byte $4): $5',
- return wfMessage( 'xml-error-string',
- $this->mMessage,
- $this->mLine,
- $this->mColumn,
- $this->mByte . $this->mContext,
- xml_error_string( $this->mXmlError ) )->escaped();
- }
-
- function _extractContext( $context, $offset ) {
- if ( is_null( $context ) ) {
- return null;
- } else {
- // Hopefully integer overflow will be handled transparently here
- $inlineOffset = $this->mByte - $offset;
- return '; "' . substr( $context, $inlineOffset, 16 ) . '"';
- }
- }
-}
return !is_null( $x ) && $x !== false;
}
- /**
- * @deprecated since 1.17 use MWNamespace::getValidNamespaces()
- *
- * @return array
- */
- public static function getValidNamespaces() {
- wfDeprecated( __METHOD__, '1.17' );
-
- return MWNamespace::getValidNamespaces();
- }
-
/**
* Return true if we're to watch the page, false if not, null if no change.
* @param string $watchlist Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
$this->mCacheMode = $mode;
}
- /**
- * @deprecated since 1.17 Private caching is now the default, so there is usually no
- * need to call this function. If there is a need, you can use
- * $this->setCacheMode('private')
- */
- public function setCachePrivate() {
- wfDeprecated( __METHOD__, '1.17' );
- $this->setCacheMode( 'private' );
- }
-
/**
* Set directives (key/value pairs) for the Cache-Control header.
* Boolean values will be formatted as such, by including or omitting
$this->mCacheControl = $directives + $this->mCacheControl;
}
- /**
- * Make sure Vary: Cookie and friends are set. Use this when the output of a request
- * may be cached for anons but may not be cached for logged-in users.
- *
- * WARNING: This function must be called CONSISTENTLY for a given URL. This means that a
- * given URL must either always or never call this function; if it sometimes does and
- * sometimes doesn't, stuff will break.
- *
- * @deprecated since 1.17 Use setCacheMode( 'anon-public-user-private' )
- */
- public function setVaryCookie() {
- wfDeprecated( __METHOD__, '1.17' );
- $this->setCacheMode( 'anon-public-user-private' );
- }
-
/**
* Create an instance of an output formatter by its name
*