for future updates. Because it's doing so heuristically, it may fail or drop
wrong constraints.
* (bug 67870) wfShellExec() cuts off stdout at multiples of 8192 bytes.
+* $wgRunJobsAsync now works with private wikis (e.g. read requires login).
=== Web API changes in 1.24 ===
* action=parse API now supports prop=modules, which provides the list of
color: #999;
width: 338px;
word-wrap: break-word;
+ // word-wrap in pre not affecting Firefox, so add white-space.
+ white-space: pre-wrap;
float: left;
margin: 0;
margin-right: 22px;
}
}
}
-}
\ No newline at end of file
+}
'JobQueueGroup' => 'includes/jobqueue/JobQueueGroup.php',
'JobQueueFederated' => 'includes/jobqueue/JobQueueFederated.php',
'JobQueueRedis' => 'includes/jobqueue/JobQueueRedis.php',
+ 'JobRunner' => 'includes/jobqueue/JobRunner.php',
'JobSpecification' => 'includes/jobqueue/JobSpecification.php',
# includes/jobqueue/jobs
/**
* autoload - take a class name and attempt to load it
*
- * @param string $className name of class we're looking for.
+ * @param string $className Name of class we're looking for.
*/
static function autoload( $className ) {
global $wgAutoloadClasses, $wgAutoloadLocalClasses,
* The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
* local-squid, ...)
* @param array $block Array of blocks
- * @return Block|null the "best" block from the list
+ * @return Block|null The "best" block from the list
*/
public static function chooseBlock( array $blocks, array $ipChain ) {
if ( !count( $blocks ) ) {
/** @var array */
protected $name2id = array();
- /** @var "AND" or "OR" */
+ /** @var string "AND" or "OR" */
protected $mode;
/** @var DatabaseBase Read-DB slave */
/**
* Iterates through the parent tree starting with the seed values,
* then checks the articles if they match the conditions
- * @return array of page_ids (those given to seed() that match the conditions)
+ * @return array Array of page_ids (those given to seed() that match the conditions)
*/
function run() {
$this->dbr = wfGetDB( DB_SLAVE );
/**
* Get a short description for a tag
*
- * @param string $tag tag
+ * @param string $tag Tag
*
* @return string Short description of the tag from "mediawiki:tag-$tag" if this message exists,
* html-escaped version of $tag otherwise
* Add tags to a change given its rc_id, rev_id and/or log_id
*
* @param string|array $tags Tags to add to the change
- * @param int|null $rc_id rc_id of the change to add the tags to
- * @param int|null $rev_id rev_id of the change to add the tags to
- * @param int|null $log_id Log_id of the change to add the tags to
- * @param string $params params to put in the ct_params field of table 'change_tag'
+ * @param int|null $rc_id The rc_id of the change to add the tags to
+ * @param int|null $rev_id The rev_id of the change to add the tags to
+ * @param int|null $log_id The log_id of the change to add the tags to
+ * @param string $params Params to put in the ct_params field of table 'change_tag'
*
* @throws MWException
- * @return bool false if no changes are made, otherwise true
+ * @return bool False if no changes are made, otherwise true
*
- * @exception MWException when $rc_id, $rev_id and $log_id are all null
+ * @exception MWException When $rc_id, $rev_id and $log_id are all null
*/
public static function addTags( $tags, $rc_id = null, $rev_id = null,
$log_id = null, $params = null
/**
* Build a text box to select a change tag
*
- * @param string $selected tag to select by default
+ * @param string $selected Tag to select by default
* @param bool $fullForm
* - if false, then it returns an array of (label, form).
* - if true, it returns an entire form around the selector.
/** @var Collator */
private $mainCollator;
- /** @var */
+ /** @var string */
private $locale;
/** @var Language */
*
* @param string $modelId The ID of the content model to test. Use CONTENT_MODEL_XXX constants.
* @return bool
- * @throws MWException if $modelId has no known handler
+ * @throws MWException If $modelId has no known handler
*/
public function isSupportedContentModel( $modelId ) {
return $this->allowNonTextContent ||
* Subclasses may override this to replace the default behavior, which is
* to check ContentHandler::supportsSections.
*
- * @return bool true if this edit page supports sections, false otherwise.
+ * @return bool True if this edit page supports sections, false otherwise.
*/
protected function isSectionEditSupported() {
$contentHandler = ContentHandler::getForTitle( $this->mTitle );
* Fetch initial editing page content.
*
* @param string|bool $def_text
- * @return string|bool string on success, $def_text for invalid sections
+ * @return string|bool String on success, $def_text for invalid sections
* @private
* @deprecated since 1.21, get WikiPage::getContent() instead.
*/
* Get the contents to be preloaded into the box, either set by
* an earlier setPreloadText() or by loading the given page.
*
- * @param string $preload representing the title to preload from.
+ * @param string $preload Representing the title to preload from.
*
* @return string
*
* If the variable were set on the server, it would be cached, which is unwanted
* since the post-edit state should only apply to the load right after the save.
*
- * @param $statusValue int The status value (to check for new article status)
+ * @param int $statusValue The status value (to check for new article status)
*/
protected function setPostEditCookie( $statusValue ) {
$revisionId = $this->mArticle->getLatest();
/**
* Attempt submission
* @throws UserBlockedError|ReadOnlyError|ThrottledError|PermissionsError
- * @return bool false if output is done, true if the rest of the form should be displayed
+ * @return bool False if output is done, true if the rest of the form should be displayed
*/
public function attemptSave() {
global $wgUser;
* @param array|bool $resultDetails
*
* @throws ErrorPageError
- * @return bool false, if output is done, true if rest of the form should be displayed
+ * @return bool False, if output is done, true if rest of the form should be displayed
*/
private function handleStatus( Status $status, $resultDetails ) {
global $wgUser, $wgOut;
* @param Content|null|bool|string $content
* @return string The editable text form of the content.
*
- * @throws MWException if $content is not an instance of TextContent and
+ * @throws MWException If $content is not an instance of TextContent and
* $this->allowNonTextContent is not true.
*/
protected function toEditText( $content ) {
* @return Content The content object created from $text. If $text was false
* or null, false resp. null will be returned instead.
*
- * @throws MWException if unserializing the text results in a Content
+ * @throws MWException If unserializing the text results in a Content
* object that is not an instance of TextContent and
* $this->allowNonTextContent is not true.
*/
* Extract the section title from current section text, if any.
*
* @param string $text
- * @return string|bool string or false
+ * @return string|bool String or false
*/
public static function extractSectionTitle( $text ) {
preg_match( "/^(=+)(.+)\\1\\s*(\n|$)/i", $text, $matches );
}
/**
- * @param bool $isSubjectPreview true if this is the section subject/title
+ * @param bool $isSubjectPreview True if this is the section subject/title
* up top, or false if this is the comment summary
* down below the textarea
* @param string $summary The text of the summary to display
}
/**
- * @param bool $isSubjectPreview true if this is the section subject/title
+ * @param bool $isSubjectPreview True if this is the section subject/title
* up top, or false if this is the comment summary
* down below the textarea
* @param string $summary The text of the summary to display
* Fallback implementation of mb_strrpos, hardcoded to UTF-8.
* @param string $haystack
* @param string $needle
- * @param string $offset optional start position
- * @param string $encoding optional encoding; ignored
+ * @param string $offset Optional start position
+ * @param string $encoding Optional encoding; ignored
* @return int
*/
public static function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
/**
* Quickie hack... strip out wikilinks to more legible form from the comment.
*
- * @param string $text wikitext
+ * @param string $text Wikitext
* @return string
*/
public static function stripComment( $text ) {
/**
* Check whether feeds can be used and that $type is a valid feed type
*
- * @param string $type feed type, as requested by the user
+ * @param string $type Feed type, as requested by the user
* @return bool
*/
public static function checkFeedOutput( $type ) {
/**
* Get the URL of the remote origin.
- * @return string|bool string if a URL is available or false otherwise.
+ * @return string|bool String if a URL is available or false otherwise.
*/
protected function getRemoteUrl() {
if ( !isset( $this->cache['remoteURL'] ) ) {
* @deprecated since 1.22; use array_replace()
*
* @param array $array1 Initial array to merge.
- * @param array [$array2,...] Variable list of arrays to merge.
+ * @param array $array2,... Variable list of arrays to merge.
* @return array
*/
function wfArrayMerge( $array1 /*...*/ ) {
* array( 'y' )
* )
*
- * @param array [$array1,...]
+ * @param array $array1,...
* @return array
*/
function wfMergeErrorArrays( /*...*/ ) {
* Send a warning either to the debug log or in a PHP error depending on
* $wgDevelopmentWarnings. To log warnings in production, use wfLogWarning() instead.
*
- * @param string $msg message to send
+ * @param string $msg Message to send
* @param int $callerOffset Number of items to go back in the backtrace to
* find the correct caller (1 = function calling wfWarn, ...)
* @param int $level PHP error level; defaults to E_USER_NOTICE;
* This function replaces all old wfMsg* functions.
*
* @param string $key Message key
- * @param mixed [$params,...] Normal message parameters
+ * @param mixed $params,... Normal message parameters
* @return Message
*
* @since 1.17
* for the first message which is non-empty. If all messages are empty then an
* instance of the first message key is returned.
*
- * @param string|string[] [$keys,...] Message keys
+ * @param string|string[] $keys,... Message keys
* @return Message
*
* @since 1.18
*
* @deprecated since 1.18
*
- * @param string $key lookup key for the message, usually
+ * @param string $key Lookup key for the message, usually
* defined in languages/Language.php
*
* Parameters to the message, which can be used to insert variable text into
* @deprecated since 1.18
*
* @param string $key
- * @param string [$args,...] Parameters
+ * @param string $args,... Parameters
* @return string
*/
function wfMsgHtml( $key ) {
* @deprecated since 1.18
*
* @param string $key
- * @param string [$args,...] Parameters
+ * @param string $args,... Parameters
* @return string
*/
function wfMsgWikiHtml( $key ) {
* factors
*
* @param string $accept
- * @param string $def default
+ * @param string $def Default
* @return float[] Associative array of string => float pairs
*/
function wfAcceptToPrefs( $accept, $def = '*/*' ) {
* Also fixes the locale problems on Linux in PHP 5.2.6+ (bug backported to
* earlier distro releases of PHP)
*
- * @param string [$args,...]
+ * @param string $args,...
* @return string
*/
function wfEscapeShellArg( /*...*/ ) {
* Execute a shell command, with time and memory limits mirrored from the PHP
* configuration if supported.
*
- * @param string|string[] $cmd if string, a properly shell-escaped command line,
+ * @param string|string[] $cmd If string, a properly shell-escaped command line,
* or an array of unescaped arguments, in which case each value will be escaped
* Example: [ 'convert', '-font', 'font name' ] would produce "'convert' '-font' 'font name'"
* @param null|mixed &$retval Optional, will receive the program's exit code.
* @param string $cmd Command line, properly escaped for shell.
* @param null|mixed &$retval Optional, will receive the program's exit code.
* (non-zero is usually failure)
- * @param array $environ optional environment variables which should be
+ * @param array $environ Optional environment variables which should be
* added to the executed command environment.
* @param array $limits Optional array with limits(filesize, memory, time, walltime)
* this overwrites the global wgMaxShell* limits.
/**
* Check if there is sufficient entropy in php's built-in session generation
*
- * @return bool true = there is sufficient entropy
+ * @return bool True = there is sufficient entropy
*/
function wfCheckEntropy() {
return (
/**
* Get a cache key
*
- * @param string [$args,...]
+ * @param string $args,...
* @return string
*/
function wfMemcKey( /*...*/ ) {
*
* @param string $db
* @param string $prefix
- * @param string [$args,...]
+ * @param string $args,...
* @return string
*/
function wfForeignMemcKey( $db, $prefix /*...*/ ) {
/**
* Get a load balancer object.
*
- * @param string|bool $wiki wiki ID, or false for the current wiki
+ * @param string|bool $wiki Wiki ID, or false for the current wiki
* @return LoadBalancer
*/
function wfGetLB( $wiki = false ) {
* Find a file.
* Shortcut for RepoGroup::singleton()->findFile()
*
- * @param string $title or Title object
+ * @param string $title String or Title object
* @param array $options Associative array of options:
* time: requested time for an archived image, or false for the
* current version. An image object will be returned which was
/**
* Get the script URL.
*
- * @return string script URL
+ * @return string Script URL
*/
function wfGetScriptUrl() {
if ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
* Also be careful when using this function to read unsigned 32 bit integer
* because php might make it negative.
*
- * @throws MWException if $data not long enough, or if unpack fails
+ * @throws MWException If $data not long enough, or if unpack fails
* @return array Associative array of the extracted data
*/
function wfUnpack( $format, $data, $length = false ) {
/** @var string */
public $mHash;
- /** @var */
+ /** @var string */
public $mRef;
/**
* the bytes backwards and initialised with 0 instead of 1. See bug 34428.
*
* @param string $s
- * @return string|bool false if the hash extension is not available
+ * @return string|bool False if the hash extension is not available
*/
function xdiffAdler32( $s ) {
if ( !function_exists( 'hash' ) ) {
* Clears hooks registered via Hooks::register(). Does not touch $wgHooks.
* This is intended for use while testing and will fail if MW_PHPUNIT_TEST is not defined.
*
- * @param string $name the name of the hook to clear.
+ * @param string $name The name of the hook to clear.
*
* @since 1.21
- * @throws MWException if not in testing mode.
+ * @throws MWException If not in testing mode.
*/
public static function clear( $name ) {
if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
* Finally, process the return value and return/throw accordingly.
*
* @param string $event Event name
- * @param array $args Array of parameters passed to hook functions
+ * @param array $args Array of parameters passed to hook functions
* @param string|null $deprecatedVersion Optionally, mark hook as deprecated with version number
* @return bool True if no handler aborted the hook
*
* shaved off the HTML output as well.
*
* @param string $element The element's name, e.g., 'a'
- * @param array $attribs Associative array of attributes, e.g., array(
+ * @param array $attribs Associative array of attributes, e.g., array(
* 'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
* further documentation.
* @param string $contents The raw HTML contents of the element: *not*
* you can omit the key, e.g., array( 'checked' ) instead of
* array( 'checked' => 'checked' ) or such.
*
- * @throws MWException if an attribute that doesn't allow lists is set to an array
+ * @throws MWException If an attribute that doesn't allow lists is set to an array
* @return string HTML fragment that goes between element name and '>'
* (starting with a space if at least one attribute is output)
*/
/**
* Removes content we've chosen to remove. The text of the removed elements can be
* extracted with the getText method.
- * @return array of removed DOMElements
+ * @return array Array of removed DOMElements
*/
public function filterContent() {
wfProfileIn( __METHOD__ );
/**
* Removes a list of elelments from DOMDocument
* @param array|DOMNodeList $elements
- * @return array of removed elements
+ * @return array Array of removed elements
*/
private function removeElements( $elements ) {
$list = $elements;
* Perform an HTTP request
*
* @param string $method HTTP method. Usually GET/POST
- * @param string $url full URL to act on. If protocol-relative, will be expanded to an http:// URL
- * @param array $options options to pass to MWHttpRequest object.
+ * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http:// URL
+ * @param array $options Options to pass to MWHttpRequest object.
* Possible keys for the array:
* - timeout Timeout length in seconds
* - connectTimeout Timeout for connection, in seconds (curl only)
/**
* Retrieves the contents of the named attribute of the current element.
- * @param string $attr the name of the attribute
- * @return string the value of the attribute or an empty string if it is not set in the current element.
+ * @param string $attr The name of the attribute
+ * @return string The value of the attribute or an empty string if it is not set in the current element.
*/
public function nodeAttribute( $attr ) {
return $this->reader->getAttribute( $attr );
public $text;
/**
- * @param string $str license name??
+ * @param string $str License name??
*/
function __construct( $str ) {
list( $text, $template ) = explode( '|', strrev( $str ), 2 );
* Returns the Url used to link to a Title
*
* @param Title $target
- * @param array $query query parameters
+ * @param array $query Query parameters
* @param array $options
* @return string
*/
*
* @since 1.22
* @param bool|string $ts Timestamp to set, or false for current time
- * @return MWTimestamp the local instance
+ * @return MWTimestamp The local instance
*/
public static function getLocalInstance( $ts = false ) {
global $wgLocaltimezone;
*
* @since 1.22
* @param bool|string $ts Timestamp to set, or false for current time
- * @return MWTimestamp the instance
+ * @return MWTimestamp The instance
*/
public static function getInstance( $ts = false ) {
return new self( $ts );
// Check user's permissions to read this page.
// We have to check here to catch special pages etc.
// We will check again in Article::view().
- $permErrors = $title->getUserPermissionsErrors( 'read', $user );
+ $permErrors = $title->isSpecial( 'RunJobs' )
+ ? array() // relies on HMAC key signature alone
+ : $title->getUserPermissionsErrors( 'read', $user );
if ( count( $permErrors ) ) {
// Bug 32276: allowing the skin to generate output with $wgTitle or
// $this->context->title set to the input title would allow anonymous users to
* @since 1.17
*
* @param string|string[] $key Message key or array of keys.
- * @param mixed [$param,...] Parameters as strings.
+ * @param mixed $param,... Parameters as strings.
*
* @return Message
*/
*
* @since 1.18
*
- * @param string|string[] [$keys,...] Message keys, or first argument as an array of all the
+ * @param string|string[] $keys,... Message keys, or first argument as an array of all the
* message keys.
*
* @return Message
*
* @since 1.17
*
- * @param mixed [$params,...] Parameters as strings, or a single argument that is
+ * @param mixed $params,... Parameters as strings, or a single argument that is
* an array of strings.
*
* @return Message $this
*
* @since 1.17
*
- * @param mixed [$params,...] Raw parameters as strings, or a single argument that is
+ * @param mixed $params,... Raw parameters as strings, or a single argument that is
* an array of raw parameters.
*
* @return Message $this
*
* @since 1.18
*
- * @param mixed [$param,...] Numeric parameters, or a single argument that is
+ * @param mixed $param,... Numeric parameters, or a single argument that is
* an array of numeric parameters.
*
* @return Message $this
*
* @since 1.22
*
- * @param int|int[] [$param,...] Duration parameters, or a single argument that is
+ * @param int|int[] $param,... Duration parameters, or a single argument that is
* an array of duration parameters.
*
* @return Message $this
*
* @since 1.22
*
- * @param string|string[] [$param,...] Expiry parameters, or a single argument that is
+ * @param string|string[] $param,... Expiry parameters, or a single argument that is
* an array of expiry parameters.
*
* @return Message $this
*
* @since 1.22
*
- * @param int|int[] [$param,...] Time period parameters, or a single argument that is
+ * @param int|int[] $param,... Time period parameters, or a single argument that is
* an array of time period parameters.
*
* @return Message $this
*
* @since 1.22
*
- * @param int|int[] [$param,...] Size parameters, or a single argument that is
+ * @param int|int[] $param,... Size parameters, or a single argument that is
* an array of size parameters.
*
* @return Message $this
*
* @since 1.22
*
- * @param int|int[] [$param,...] Bit rate parameters, or a single argument that is
+ * @param int|int[] $param,... Bit rate parameters, or a single argument that is
* an array of bit rate parameters.
*
* @return Message $this
protected $mStatusCode;
/**
- * @ var string mLastModified and mEtag are used for sending cache control.
+ * @var string Variable mLastModified and mEtag are used for sending cache control.
* The whole caching system should probably be moved into its own class.
*/
protected $mLastModified = '';
* Add a new "<meta>" tag
* To add an http-equiv meta tag, precede the name with "http:"
*
- * @param string $name tag name
- * @param string $val tag value
+ * @param string $name Tag name
+ * @param string $val Tag value
*/
function addMeta( $name, $val ) {
array_push( $this->mMetatags, array( $name, $val ) );
*
* Note: use setCanonicalUrl() for rel=canonical.
*
- * @param array $linkarr associative array of attributes.
+ * @param array $linkarr Associative array of attributes.
*/
function addLink( $linkarr ) {
array_push( $this->mLinktags, $linkarr );
/**
* Add a new \<link\> with "rel" attribute set to "meta"
*
- * @param array $linkarr associative array mapping attribute names to their
+ * @param array $linkarr Associative array mapping attribute names to their
* values, both keys and values will be escaped, and the
* "rel" attribute will be automatically added
*/
/**
* Add raw HTML to the list of scripts (including \<script\> tag, etc.)
*
- * @param string $script raw HTML
+ * @param string $script Raw HTML
*/
function addScript( $script ) {
$this->mScripts .= $script . "\n";
/**
* Register and add a stylesheet from an extension directory.
*
- * @param string $url path to sheet. Provide either a full url (beginning
+ * @param string $url Path to sheet. Provide either a full url (beginning
* with 'http', etc) or a relative path from the document root
* (beginning with '/'). Otherwise it behaves identically to
* addStyle() and draws from the /skins folder.
/**
* Add a JavaScript file out of skins/common, or a given relative path.
*
- * @param string $file filename in skins/common or complete on-server path
+ * @param string $file Filename in skins/common or complete on-server path
* (/foo/bar.js)
- * @param string $version style version of the file. Defaults to $wgStyleVersion
+ * @param string $version Style version of the file. Defaults to $wgStyleVersion
*/
public function addScriptFile( $file, $version = null ) {
global $wgStylePath, $wgStyleVersion;
* Filter an array of modules to remove insufficiently trustworthy members, and modules
* which are no longer registered (eg a page is cached before an extension is disabled)
* @param array $modules
- * @param string|null $position if not null, only return modules with this position
+ * @param string|null $position If not null, only return modules with this position
* @param string $type
* @return array
*/
/**
* Add or replace an header item to the output
*
- * @param string $name item name
- * @param string $value raw HTML
+ * @param string $name Item name
+ * @param string $value Raw HTML
*/
public function addHeadItem( $name, $value ) {
$this->mHeadItems[$name] = $value;
/**
* Set the value of the ETag HTTP header, only used if $wgUseETag is true
*
- * @param string $tag value of "ETag" header
+ * @param string $tag Value of "ETag" header
*/
function setETag( $tag ) {
$this->mETag = $tag;
/**
* Override the last modified timestamp
*
- * @param string $timestamp new timestamp, in a format readable by
+ * @param string $timestamp New timestamp, in a format readable by
* wfTimestamp()
*/
public function setLastModified( $timestamp ) {
/**
* Set the robot policy for the page: <http://www.robotstxt.org/meta.html>
*
- * @param string $policy the literal string to output as the contents of
+ * @param string $policy The literal string to output as the contents of
* the meta tag. Will be parsed according to the spec and output in
* standardized form.
* @return null
* Set the follow policy for the page, but leave the index policy un-
* touched.
*
- * @param string $policy either 'follow' or 'nofollow'.
+ * @param string $policy Either 'follow' or 'nofollow'.
* @return null
*/
public function setFollowPolicy( $policy ) {
* Set the new value of the "action text", this will be added to the
* "HTML title", separated from it with " - ".
*
- * @param string $text new value of the "action text"
+ * @param string $text New value of the "action text"
*/
public function setPageTitleActionText( $text ) {
$this->mPageTitleActionText = $text;
/**
* Replace the subtitle with $str
*
- * @param string|Message $str new value of the subtitle. String should be safe HTML.
+ * @param string|Message $str New value of the subtitle. String should be safe HTML.
*/
public function setSubtitle( $str ) {
$this->clearSubtitle();
* Add $str to the subtitle
*
* @deprecated since 1.19; use addSubtitle() instead
- * @param string|Message $str to add to the subtitle
+ * @param string|Message $str String or Message to add to the subtitle
*/
public function appendSubtitle( $str ) {
$this->addSubtitle( $str );
/**
* Add $str to the subtitle
*
- * @param string|Message $str to add to the subtitle. String should be safe HTML.
+ * @param string|Message $str String or Message to add to the subtitle. String should be safe HTML.
*/
public function addSubtitle( $str ) {
if ( $str instanceof Message ) {
* for the new version
* @see addFeedLink()
*
- * @param bool $show true: add default feeds, false: remove all feeds
+ * @param bool $show True: add default feeds, false: remove all feeds
*/
public function setSyndicated( $show = true ) {
if ( $show ) {
* for the new version
* @see addFeedLink()
*
- * @param string $val query to append to feed links or false to output
+ * @param string $val Query to append to feed links or false to output
* default links
*/
public function setFeedAppendQuery( $val ) {
/**
* Add a feed link to the page header
*
- * @param string $format feed type, should be a key of $wgFeedClasses
+ * @param string $format Feed type, should be a key of $wgFeedClasses
* @param string $href URL
*/
public function addFeedLink( $format, $href ) {
/**
* Return URLs for each supported syndication format for this page.
- * @return array associating format keys with URLs
+ * @return array Associating format keys with URLs
*/
public function getSyndicationLinks() {
return $this->mFeedLinks;
/**
* Add an array of categories, with names in the keys
*
- * @param array $categories mapping category name => sort key
+ * @param array $categories Mapping category name => sort key
*/
public function addCategoryLinks( $categories ) {
global $wgContLang;
/**
* Reset the category links (but not the category list) and add $categories
*
- * @param array $categories mapping category name => sort key
+ * @param array $categories Mapping category name => sort key
*/
public function setCategoryLinks( $categories ) {
$this->mCategoryLinks = array();
/**
* Add an HTTP header that will influence on the cache
*
- * @param string $header header name
+ * @param string $header Header name
* @param array|null $option
* @todo FIXME: Document the $option parameter; it appears to be for
* X-Vary-Options but what format is acceptable?
/**
* Actually output something with print.
*
- * @param string $ins the string to output
+ * @param string $ins The string to output
* @deprecated since 1.22 Use echo yourself.
*/
public function out( $ins ) {
* indexing, clear the current text and redirect, set the page's title
* and optionally an custom HTML title (content of the "<title>" tag).
*
- * @param string|Message $pageTitle will be passed directly to setPageTitle()
- * @param string|Message $htmlTitle will be passed directly to setHTMLTitle();
+ * @param string|Message $pageTitle Will be passed directly to setPageTitle()
+ * @param string|Message $htmlTitle Will be passed directly to setHTMLTitle();
* optional, if not passed the "<title>" attribute will be
* based on $pageTitle
*/
/**
* Output a standard permission error page
*
- * @param array $errors error message keys
- * @param string $action action that was denied or null if unknown
+ * @param array $errors Error message keys
+ * @param string $action Action that was denied or null if unknown
*/
public function showPermissionsErrorPage( $errors, $action = null ) {
// For some action (read, edit, create and upload), display a "login to do this action"
/**
* Display an error page noting that a given permission bit is required.
* @deprecated since 1.18, just throw the exception directly
- * @param string $permission key required
+ * @param string $permission Key required
* @throws PermissionsError
*/
public function permissionRequired( $permission ) {
}
/**
- * @return array in format "link name or number => 'link html'".
+ * @return array Array in format "link name or number => 'link html'".
*/
public function getHeadLinksArray() {
global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI,
* Meant primarily for internal use...
*
* @param string $style URL to the file
- * @param string $media to specify a media type, 'screen', 'printable', 'handheld' or any.
- * @param string $condition for IE conditional comments, specifying an IE version
- * @param string $dir set to 'rtl' or 'ltr' for direction-specific sheets
+ * @param string $media To specify a media type, 'screen', 'printable', 'handheld' or any.
+ * @param string $condition For IE conditional comments, specifying an IE version
+ * @param string $dir Set to 'rtl' or 'ltr' for direction-specific sheets
*/
public function addStyle( $style, $media = '', $condition = '', $dir = '' ) {
$options = array();
* @throws MWException
* @param User $user
* @param IContextSource $context
- * @param array defaultPreferences to load values for
+ * @param array $defaultPreferences Array to load values for
* @return array|null
*/
static function loadPreferenceValues( $user, $context, &$defaultPreferences ) {
}
/**
- * @param int $field one of DELETED_* bitfield constants
+ * @param int $field One of DELETED_* bitfield constants
*
* @return bool
*/
* - Invalid id attributes are re-encoded
*
* @param array $attribs
- * @param array $whitelist list of allowed attribute names
+ * @param array $whitelist List of allowed attribute names
* @return array
*
* @todo Check for legal values where the DTD limits things.
* @see http://www.whatwg.org/html/elements.html#the-id-attribute
* HTML5 definition of id attribute
*
- * @param string $id id to escape
+ * @param string $id Id to escape
* @param string|array $options String or array of strings (default is array()):
* 'noninitial': This is a non-initial fragment of an id, not a full id,
* so don't pay attention if the first character isn't valid at the
* attribs regex matches.
*
* @param array $set
- * @throws MWException when tag conditions are not met.
+ * @throws MWException When tag conditions are not met.
* @return string
*/
private static function getTagAttributeCallback( $set ) {
/**
* Find the number of users in a given user group.
- * @param string $group name of group
+ * @param string $group Name of group
* @return int
*/
static function numberingroup( $group ) {
* @param DatabaseBase|bool $database
* - Boolean: whether to use the master DB
* - DatabaseBase: database connection to use
- * @param array $options of options, may contain the following values
+ * @param array $options Array of options, may contain the following values
* - views Boolean: when true, do not update the number of page views (default: true)
* - activeUsers Boolean: whether to update the number of active users (default: false)
*/
/**
* Returns an HTML link for use in the footer
- * @param string $desc i18n message key for the link text
- * @param string $page i18n message key for the page to link to
+ * @param string $desc The i18n message key for the link text
+ * @param string $page The i18n message key for the page to link to
* @return string HTML anchor
*/
public function footerLink( $desc, $page ) {
/**
* Builds an array with tab definition
*
- * @param Title $title page Where the tab links to
+ * @param Title $title Page Where the tab links to
* @param string|array $message Message key or an array of message keys (will fall back)
* @param bool $selected Display the tab as selected
* @param string $query Query string attached to tab URL
/**
* an array of edit links by default used for the tabs
- * @param $content_navigation
+ * @param array $content_navigation
* @return array
*/
private function buildContentActionUrls( $content_navigation ) {
* Makes a link, usually used by makeListItem to generate a link for an item
* in a list used in navigation lists, portlets, portals, sidebars, etc...
*
- * @param string $key usually a key from the list you are generating this
+ * @param string $key Usually a key from the list you are generating this
* link from.
- * @param array $item contains some of a specific set of keys.
+ * @param array $item Contains some of a specific set of keys.
*
* The text of the link will be generated either from the contents of the
* "text" key in the $item array, if a "msg" key is present a message by
*
* If you don't want an accesskey, set $item['tooltiponly'] = true;
*
- * @param array $options can be used to affect the output of a link.
+ * @param array $options Can be used to affect the output of a link.
* Possible options are:
* - 'text-wrapper' key to specify a list of elements to wrap the text of
* a link in. This should be an array of arrays containing a 'tag' and
/**
* @param string $line
- * @return
*/
protected function processStatusLine( $line ) {
if ( !preg_match( '!^HTTP/(\d+)\.(\d+) (\d{3}) (.*)$!', $line, $m ) ) {
}
class SquidPurgeClientPool {
- /** @var array of SquidPurgeClient */
+ /** @var array Array of SquidPurgeClient */
protected $clients = array();
/** @var int */
/**
* Factory function for fatal errors
*
- * @param string|Message $message message name or object
+ * @param string|Message $message Message name or object
* @return Status
*/
static function newFatal( $message /*, parameters...*/ ) {
* @param string $name Name of the method called in this object.
* @param int $level Level to go in the stack trace to get the function
* who called this function.
- * @return The unstubbed version of itself
+ * @return object The unstubbed version of itself
* @throws MWException
*/
function _unstub( $name = '_unstub', $level = 2 ) {
/** @var array Array of groups allowed to edit this article */
public $mRestrictions = array();
- /** @var bool */
+ /** @var bool */
protected $mOldRestrictions = false;
/** @var bool Cascade restrictions on this page to included templates and images? */
/**
* Returns true if the title is inside one of the specified namespaces.
*
- * @param ...$namespaces The namespaces to check for
+ * @param int $namespaces,... The namespaces to check for
* @return bool
* @since 1.19
*/
* @see self::getFullURL to always get an absolute URL.
* @see self::newFromText to produce a Title object.
*
- * @param string|array $query an optional query string,
+ * @param string|array $query An optional query string,
* not used for interwiki links. Can be specified as an associative array as well,
* e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
* Some query patterns will trigger various shorturl path replacements.
*
* @todo FIXME: This *does not* check throttles (User::pingLimiter()).
*
- * @param string $action action that permission needs to be checked for
+ * @param string $action Action that permission needs to be checked for
* @param User $user User to check
* @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary
* queries by skipping checks for cascading protections and user blocks.
- * @param array $ignoreErrors of Strings Set this to a list of message keys
+ * @param array $ignoreErrors Array of Strings Set this to a list of message keys
* whose corresponding errors may be ignored.
* @return array Array of arguments to wfMessage to explain permissions problems.
*/
/**
* Permissions checks that fail most often, and which are easiest to test.
*
- * @param string $action the action to check
+ * @param string $action The action to check
* @param User $user User to check
* @param array $errors List of current errors
* @param bool $doExpensiveQueries Whether or not to perform expensive queries
/**
* Does the title correspond to a protected article?
*
- * @param string $action the action the page is protected from,
+ * @param string $action The action the page is protected from,
* by default checks all actions.
* @return bool
*/
/**
* Load user table data, given mId has already been set.
- * @return bool false if the ID does not exist, true otherwise
+ * @return bool False if the ID does not exist, true otherwise
*/
public function loadFromId() {
global $wgMemc;
* Given unvalidated password input, return error message on failure.
*
* @param string $password Desired password
- * @return bool|string|array true on success, string or array of error message on failure
+ * @return bool|string|array True on success, string or array of error message on failure
*/
public function getPasswordValidity( $password ) {
$result = $this->checkPasswordValidity( $password );
* Load user and user_group data from the database.
* $this->mId must be set, this is how the user is identified.
*
- * @param integer $flags Supports User::READ_LOCKING
+ * @param int $flags Supports User::READ_LOCKING
* @return bool True if the user exists, false if the user is anonymous
*/
public function loadFromDatabase( $flags = 0 ) {
* @see getNewtalk()
* @param string $field 'user_ip' for anonymous users, 'user_id' otherwise
* @param string|int $id User's IP address for anonymous users, User ID otherwise
- * @param bool $fromMaster true to fetch from the master, false for a slave
+ * @param bool $fromMaster True to fetch from the master, false for a slave
* @return bool True if the user has new messages
*/
protected function checkNewtalk( $field, $id, $fromMaster = false ) {
* a new password is set, for instance via e-mail.
*
* @param string $str New password to set
- * @throws PasswordError on failure
+ * @throws PasswordError On failure
*
* @return bool
*/
* @param IContextSource $context
* @param array $options Assoc. array with options keys to check as keys.
* Defaults to $this->mOptions.
- * @return array the key => kind mapping data
+ * @return array The key => kind mapping data
*/
public function getOptionKinds( IContextSource $context, $options = null ) {
$this->loadOptions();
/**
* Get the user's edit count.
- * @return int|null null for anonymous users
+ * @return int|null Null for anonymous users
*/
public function getEditCount() {
if ( !$this->getId() ) {
/**
* Check to see if the given clear-text password is one of the accepted passwords
- * @param string $password user password.
- * @return bool True if the given password is correct, otherwise False.
+ * @param string $password User password
+ * @return bool True if the given password is correct, otherwise False
*/
public function checkPassword( $password ) {
global $wgAuth, $wgLegacyEncoding;
* Alias for getEditToken.
* @deprecated since 1.19, use getEditToken instead.
*
- * @param string|array $salt of Strings Optional function-specific data for hashing
+ * @param string|array $salt Array of Strings Optional function-specific data for hashing
* @param WebRequest|null $request WebRequest object to use or null to use $wgRequest
* @return string The new edit token
*/
*
* @since 1.19
*
- * @param string|array $salt of Strings Optional function-specific data for hashing
+ * @param string|array $salt Array of Strings Optional function-specific data for hashing
* @param WebRequest|null $request WebRequest object to use or null to use $wgRequest
* @return string The new edit token
*/
*
* @param string $val Input value to compare
* @param string $salt Optional function-specific data for hashing
- * @param WebRequest|null $request object to use or null to use $wgRequest
+ * @param WebRequest|null $request Object to use or null to use $wgRequest
* @return bool Whether the token matches
*/
public function matchEditTokenNoSuffix( $val, $salt = '', $request = null ) {
* Returns an array of the groups that a particular group can add/remove.
*
* @param string $group The group to check for whether it can add/remove
- * @return array array( 'add' => array( addablegroups ),
+ * @return array Array( 'add' => array( addablegroups ),
* 'remove' => array( removablegroups ),
* 'add-self' => array( addablegroups to self),
* 'remove-self' => array( removable groups from self) )
/**
* Returns an array of groups that this user can add and remove
- * @return array array( 'add' => array( addablegroups ),
+ * @return array Array( 'add' => array( addablegroups ),
* 'remove' => array( removablegroups ),
* 'add-self' => array( addablegroups to self),
* 'remove-self' => array( removable groups from self) )
/** @var int */
public $key;
- /** @var */
+ /** @var bool|stdClass */
public $current;
/**
/**
* Take an arbitrary query and rewrite the present URL to include it
- * @param string $query query string fragment; do not include initial '?'
+ * @param string $query Query string fragment; do not include initial '?'
*
* @return string
*/
* Return the path to the temporary file where PHP has stored the upload.
*
* @param string $key
- * @return string|null string or null if no such file.
+ * @return string|null String or null if no such file.
*/
public function getFileTempname( $key ) {
$file = new WebRequestUpload( $this, $key );
* Other than this the name is not verified for being a safe filename.
*
* @param string $key
- * @return string|null string or null if no such file.
+ * @return string|null String or null if no such file.
*/
public function getFileName( $key ) {
$file = new WebRequestUpload( $this, $key );
/**
* Get a request header, or false if it isn't set
- * @param string $name case-insensitive header name
+ * @param string $name Case-insensitive header name
*
* @return string|bool False on failure
*/
/**
* Parse the Accept-Language header sent by the client into an array
*
- * @return array array( languageCode => q-value ) sorted by q-value in
+ * @return array Array( languageCode => q-value ) sorted by q-value in
* descending order then appearing time in the header in ascending order.
* May contain the "language" '*', which applies to languages other than those explicitly listed.
* This is aligned with rfc2616 section 14.4
private $session = array();
/**
- * @param array $data of *non*-urlencoded key => value pairs, the
+ * @param array $data Array of *non*-urlencoded key => value pairs, the
* fake GET/POST values
* @param bool $wasPosted Whether to treat the data as POST
* @param array|null $session Session array or null
/**
* Output a HTTP header, wrapper for PHP's header()
- * @param string $string header to output
- * @param bool $replace replace current similar header
+ * @param string $string Header to output
+ * @param bool $replace Replace current similar header
* @param null|int $http_response_code Forces the HTTP response code to the specified value.
*/
public function header( $string, $replace = true, $http_response_code = null ) {
/**
* Set the browser cookie
- * @param string $name name of cookie
- * @param string $value value to give cookie
+ * @param string $name Name of cookie
+ * @param string $value Value to give cookie
* @param int|null $expire Unix timestamp (in seconds) when the cookie should expire.
* 0 (the default) causes it to expire $wgCookieExpiration seconds from now.
* null causes it to be a session cookie.
/**
* Stores a HTTP header
- * @param string $string header to output
- * @param bool $replace replace current similar header
+ * @param string $string Header to output
+ * @param bool $replace Replace current similar header
* @param null|int $http_response_code Forces the HTTP response code to the specified value.
*/
public function header( $string, $replace = true, $http_response_code = null ) {
/**
* @todo document. It just ignore optional parameters.
*
- * @param string $name name of cookie
- * @param string $value value to give cookie
- * @param int $expire number of seconds til cookie expires (Default: 0)
- * @param array $options ignored
+ * @param string $name Name of cookie
+ * @param string $value Value to give cookie
+ * @param int $expire Number of seconds til cookie expires (Default: 0)
+ * @param array $options Ignored
*/
public function setcookie( $name, $value, $expire = 0, $options = null ) {
$this->cookies[$name] = $value;
* @param string $inLanguage The ISO code of the language to display the select list in (optional)
* @param array $overrideAttrs Override the attributes of the select tag (since 1.20)
* @param Message|null $msg Label message key (since 1.20)
- * @return array containing 2 items: label HTML and select list HTML
+ * @return array Array containing 2 items: label HTML and select list HTML
*/
public static function languageSelector( $selected, $customisedOnly = true,
$inLanguage = null, $overrideAttrs = array(), Message $msg = null
*
* @param int $cnt Maximum list of contributors to show
* @param bool $showIfMax Whether to contributors if there more than $cnt
- * @return string html
+ * @return string Html
*/
public function getCredits( $cnt, $showIfMax = true ) {
wfProfileIn( __METHOD__ );
* Get a list of contributors of $article
* @param int $cnt Maximum list of contributors to show
* @param bool $showIfMax Whether to contributors if there more than $cnt
- * @return string html
+ * @return string Html
*/
protected function getContributors( $cnt, $showIfMax ) {
global $wgHiddenPrefs;
/**
* Output a subscription feed listing recent edits to this page.
*
- * @param string $type feed type
+ * @param string $type Feed type
*/
function feed( $type ) {
global $wgFeedClasses, $wgFeedLimit;
* Borrows Recent Changes' feed generation functions for formatting;
* includes a diff to the previous revision (if any).
*
- * @param stdClass|array $row database row
+ * @param stdClass|array $row Database row
* @return FeedItem
*/
function feedItem( $row ) {
*
* @param Page|WikiPage $page Page or WikiPage object to work on
* @param User $user User doing the action
- * @param string $token delete token (same as edit token)
- * @param string|null $reason reason for the deletion. Autogenerated if null
+ * @param string $token Delete token (same as edit token)
+ * @param string|null $reason Reason for the deletion. Autogenerated if null
* @return Status|array
*/
public static function delete( Page $page, User $user, $token, &$reason = null ) {
* Call this method to initialize output data. See execute()
* @param ApiResult $result
* @param object $feed An instance of one of the $wgFeedClasses classes
- * @param array $feedItems of FeedItem objects
+ * @param array $feedItems Array of FeedItem objects
*/
public static function setResult( $result, $feed, $feedItems ) {
// Store output in the Result data.
/**
* Add all items from $values into the result
- * @param array $result output
- * @param array $values values to add
- * @param string $flag the name of the boolean flag to mark this element
- * @param string $name if given, name of the value
+ * @param array $result Output
+ * @param array $values Values to add
+ * @param string $flag The name of the boolean flag to mark this element
+ * @param string $name If given, name of the value
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
/**
* Check POST for external response and setup result printer
* @param ApiBase $module An Api module
- * @param array $params an array with the request parameters
+ * @param array $params An array with the request parameters
*/
protected function setupExternalResponse( $module, $params ) {
if ( !$this->getRequest()->wasPosted() && $module->mustBePosted() ) {
/**
* Get the array mapping module names to class names
* @deprecated since 1.21, use getModuleManager()'s methods instead
- * @return array array(modulename => classname)
+ * @return array Array(modulename => classname)
*/
public function getModules() {
wfDeprecated( __METHOD__, '1.21' );
/**
* Get the generators array mapping module names to class names
* @deprecated since 1.21, list of generators is maintained by ApiPageSet
- * @return array array(modulename => classname)
+ * @return array Array(modulename => classname)
*/
public function getGenerators() {
wfDeprecated( __METHOD__, '1.21' );
*
* If this is >= TRANSFORM_LIMIT, you should probably stop processing images.
*
- * @return int count
+ * @return int Count
*/
static function getTransformCount() {
return self::$transformCount;
* Get an array mapping token names to their handler functions.
* The prototype for a token function is func($pageid, $title, $rc)
* it should return a token or false (permission denied)
- * @return array array(tokenname => function)
+ * @return array Array(tokenname => function)
*/
protected function getTokenFunctions() {
// Don't call the hooks twice
/**
* Sets internal state to include the desired properties in the output.
- * @param array $prop associative array of properties, only keys are used here
+ * @param array $prop Associative array of properties, only keys are used here
*/
public function initProperties( $prop ) {
$this->fld_comment = isset( $prop['comment'] );
/**
* Create a file dependency
*
- * @param string $filename the name of the file, preferably fully qualified
+ * @param string $filename The name of the file, preferably fully qualified
* @param null|bool|int $timestamp The unix last modified timestamp, or false if the
* file does not exist. If omitted, the timestamp will be loaded from
* the file.
/**
* Read a JSON file containing localisation messages.
* @param string $fileName Name of file to read
- * @throws MWException if there is a syntax error in the JSON file
+ * @throws MWException If there is a syntax error in the JSON file
* @return array Array with a 'messages' key, or empty array if the file doesn't exist
*/
public function readJSONFile( $fileName ) {
/** @var DatabaseBase */
private $dbw;
- /** @var Array */
+ /** @var array */
private $batch = array();
private $readOnly = false;
* - If boolean and false, create object from the current users language
* - If boolean and true, create object from the wikis content language
* - If language object, use it as given
- * @param bool $isFullKey specifies whether $key is a two part key "msg/lang".
+ * @param bool $isFullKey Specifies whether $key is a two part key "msg/lang".
*
- * @throws MWException when given an invalid key
+ * @throws MWException When given an invalid key
* @return string|bool False if the message doesn't exist, otherwise the
* message (which can be empty)
*/
/**
* Obtain the recent change with a given rc_id value
*
- * @param int $rcid rc_id value to retrieve
+ * @param int $rcid The rc_id value to retrieve
* @return RecentChange
*/
public static function newFromId( $rcid ) {
* Adjust or reset the connection handle read timeout value
*
* @param Redis $conn
- * @param integer $timeout Optional
+ * @param int $timeout Optional
*/
public function resetTimeout( Redis $conn, $timeout = null ) {
$conn->setOption( Redis::OPT_READ_TIMEOUT, $timeout ?: $this->readTimeout );
* Register a new config factory function
* Will override if it's already registered
* @param string $name
- * @param callable $callback that takes this ConfigFactory as an argument
- * @throws InvalidArgumentException if an invalid callback is provided
+ * @param callable $callback That takes this ConfigFactory as an argument
+ * @throws InvalidArgumentException If an invalid callback is provided
*/
public function register( $name, $callback ) {
if ( !is_callable( $callback ) ) {
/**
* Create a given Config using the registered callback for $name.
* If an object was already created, the same Config object is returned.
- * @param string $name of the extension/component you want a Config object for
+ * @param string $name Name of the extension/component you want a Config object for
* 'main' is used for core
- * @throws ConfigException if a factory function isn't registered for $name
- * @throws UnexpectedValueException if the factory function returns a non-Config object
+ * @throws ConfigException If a factory function isn't registered for $name
+ * @throws UnexpectedValueException If the factory function returns a non-Config object
* @return Config
*/
public function makeConfig( $name ) {
*
* @param string $prefix Prefix to use on the variable
* @param string $name Variable name without prefix
- * @param mixed $value value to set
+ * @param mixed $value Value to set
*/
protected function setWithPrefix( $prefix, $name, $value ) {
$GLOBALS[$prefix . $name] = $value;
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageViewLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageViewLanguage()
*/
}
/**
- * @return Content. A copy of this object
+ * @return Content A copy of this object
*
* @see Content::copy
*/
* @param int $revId Revision to pass to the parser (default: null)
* @param ParserOptions $options (default: null)
* @param bool $generateHtml (default: true)
- * @param &$output ParserOutput representing the HTML form of the text,
+ * @param ParserOutput &$output ParserOutput representing the HTML form of the text,
* may be manipulated or replaced.
*/
protected function fillParserOutput( Title $title, $revId,
* it would set only the original context, and not take
* into account any changes.
*
- * @param String Message name
- * @param Variable number of message arguments
+ * @param mixed $args,... Arguments to wfMessage
* @return Message
*/
public function msg() {
* DatabaseBase::tableName().
* @param array $a Array of rows to insert
* @param string $fname Calling function name (use __METHOD__) for logs/profiling
- * @param array $options of options
+ * @param array $options Array of options
*
* @return bool
*/
* Build a partial where clause from a 2-d array such as used for LinkBatch.
* The keys on each level may be either integers or strings.
*
- * @param array $data organized as 2-d
+ * @param array $data Organized as 2-d
* array(baseKeyVal => array(subKeyVal => [ignored], ...), ...)
* @param string $baseKey Field name to match the base-level keys to (eg 'pl_namespace')
* @param string $subKey Field name to match the sub-level keys to (eg 'pl_title')
- * @return string|bool string SQL fragment, or false if no items in array.
+ * @return string|bool SQL fragment, or false if no items in array
*/
public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
$conds = array();
/**
* Gets an array of aliased table names
*
- * @param array $tables array( [alias] => table )
+ * @param array $tables Array( [alias] => table )
* @return string[] See tableNameWithAlias()
*/
public function tableNamesWithAlias( $tables ) {
/**
* Gets an array of aliased field names
*
- * @param array $fields array( [alias] => field )
+ * @param array $fields Array( [alias] => field )
* @return string[] See fieldNameWithAlias()
*/
public function fieldNamesWithAlias( $fields ) {
* DELETE query wrapper.
*
* @param array $table Table name
- * @param string|array $conds of conditions. See $conds in DatabaseBase::select()
+ * @param string|array $conds Array of conditions. See $conds in DatabaseBase::select()
* for the format. Use $conds == "*" to delete all rows
- * @param string $fname name of the calling function
+ * @param string $fname Name of the calling function
* @throws DBUnexpectedError
* @return bool|ResultWrapper
*/
/**
* Encode an expiry time into the DBMS dependent format
*
- * @param string $expiry timestamp for expiry, or the 'infinity' string
+ * @param string $expiry Timestamp for expiry, or the 'infinity' string
* @return string
*/
public function encodeExpiry( $expiry ) {
/**
* UPDATE wrapper. Takes a condition array and a SET array.
*
- * @param string $table name of the table to UPDATE. This will be passed through
+ * @param string $table Name of the table to UPDATE. This will be passed through
* DatabaseBase::tableName().
*
* @param array $values An array of values to SET. For each array element,
/**
* Makes an encoded list of strings from an array
- * @param array $a containing the data
+ * @param array $a Containing the data
* @param int $mode Constant
* - LIST_COMMA: comma separated, no field names
* - LIST_AND: ANDed WHERE clause (without the WHERE). See
}
/**
- * @param array $options an associative array of options to be turned into
+ * @param array $options An associative array of options to be turned into
* an SQL query, valid keys are listed in the function.
* @return array
*/
/**
* Check to see if a named lock is available. This is non-blocking.
*
- * @param string $lockName name of lock to poll
- * @param string $method name of method calling us
+ * @param string $lockName Name of lock to poll
+ * @param string $method Name of method calling us
* @return bool
* @since 1.20
*/
/**
* @param bool $value
- * @return mixed null|bool|ResultWrapper
+ * @return null|bool|ResultWrapper
*/
public function setBigSelects( $value = true ) {
if ( $value === 'default' ) {
/** @var string */
public $file;
- /** @var int timestamp */
+ /** @var int Timestamp */
public $pos;
function __construct( $file, $pos ) {
}
/**
- * @return string wikitext of a link to the server software's web site
+ * @return string Wikitext of a link to the server software's web site
*/
public function getSoftwareLink() {
return '[{{int:version-db-oracle-url}} Oracle]';
* @see getSearchPath()
* @see setSearchPath()
* @since 1.19
- * @return array list of actual schemas for the current sesson
+ * @return array List of actual schemas for the current sesson
*/
function getSchemas() {
$res = $this->query( "SELECT current_schemas(false)", __METHOD__ );
* Return schema name fore core MediaWiki tables
*
* @since 1.19
- * @return string core schema name
+ * @return string Core schema name
*/
function getCoreSchema() {
return $this->mCoreSchema;
/**
* Various select options
*
- * @param array $options an associative array of options to be turned into
+ * @param array $options An associative array of options to be turned into
* an SQL query, valid keys are listed in the function.
* @return array
*/
}
/**
- * @return string wikitext of a link to the server software's web site
+ * @return string Wikitext of a link to the server software's web site
*/
public function getSoftwareLink() {
return "[{{int:version-db-sqlite-url}} SQLite]";
/** @var int */
protected $pos = 0;
- /** @var */
+ /** @var object|null */
protected $currentRow = null;
/**
* @param string|null $functionName
*
* @return ORMResult The result set
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode)
*/
public function select( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param array $options
* @param string|null $functionName
*
- * @return array of self
+ * @return array Array of self
*/
public function selectObjects( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param null|string $functionName
*
* @return ResultWrapper
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode)
*/
public function rawSelect( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param bool $collapse Set to false to always return each result row as associative array.
* @param string|null $functionName
*
- * @return array of array
+ * @return array Array of array
*/
public function selectFields( $fields = null, array $conditions = array(),
array $options = array(), $collapse = true, $functionName = null );
* Returns the LBFactory class to use and the load balancer configuration.
*
* @param array $config (e.g. $wgLBFactoryConf)
- * @return string class name
+ * @return string Class name
*/
public static function getLBFactoryClass( array $config ) {
// For configuration backward compatibility after removing
/**
* Get a cached (tracked) load balancer for external storage
*
- * @param string $cluster external storage cluster, or false for core
+ * @param string $cluster External storage cluster, or false for core
* @param bool|string $wiki Wiki ID, or false for the current wiki
* @return LoadBalancer
*/
}
/**
- * @param string $cluster external storage cluster, or false for core
+ * @param string $cluster External storage cluster, or false for core
* @param bool|string $wiki Wiki ID, or false for the current wiki
* @return LoadBalancer
*/
private $mLoadMonitorClass, $mLoadMonitor;
/**
- * @param array $params with keys:
+ * @param array $params Array with keys:
* servers Required. Array of server info structures.
* loadMonitor Name of a class used to fetch server lag and load.
* @throws MWException
* @param array $options
* @param string|null $functionName
*
- * @return array of row objects
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode).
+ * @return array Array of row objects
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode).
*/
public function selectObjects( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null
* @param array $options
* @param null|string $functionName
* @return ResultWrapper
- * @throws DBQueryError if the query failed (even if the database was in
+ * @throws DBQueryError If the query failed (even if the database was in
* ignoreErrors mode).
*/
public function rawSelect( $fields = null, array $conditions = array(),
* @param bool $collapse Set to false to always return each result row as associative array.
* @param string|null $functionName
*
- * @return array of array
+ * @return array Array of array
*/
public function selectFields( $fields = null, array $conditions = array(),
array $options = array(), $collapse = true, $functionName = null
*
* @see LoadBalancer::reuseConnection
*
- * @param DatabaseBase $db the database
+ * @param DatabaseBase $db
*
* @since 1.20
*/
* This allows for limited transactional logic across multiple backends for storing
* secondary data.
*
- * @param array $updates a list of DataUpdate instances
+ * @param array $updates A list of DataUpdate instances
* @throws Exception|null
*/
public static function runUpdates( $updates ) {
/**
* Do any deferred updates and clear the list
*
- * @param string $commit set to 'commit' to commit after every update to
+ * @param string $commit Set to 'commit' to commit after every update to
* prevent lock contention
*/
public static function doUpdates( $commit = '' ) {
/** @var int Page ID of the article linked from */
public $mId;
- /** @var Title object of the article linked from */
+ /** @var Title Title object of the article linked from */
public $mTitle;
/** @var ParserOutput */
/** @var array Map of category names to sort keys */
public $mCategories;
- /** @var array ap of language codes to titles */
+ /** @var array Map of language codes to titles */
public $mInterlangs;
/** @var array Map of arbitrary name to value */
/**
* Constructor
*
- * @param bool $withTransaction whether this update should be wrapped in a
+ * @param bool $withTransaction Whether this update should be wrapped in a
* transaction (default: true). A transaction is only started if no
* transaction is already in progress, see beginTransaction() for details.
*/
/**
* Constructor
- * @param IContextSource $context context to use, anything else will be ignored
- * @param int $old old ID we want to show and diff with.
- * @param string|int $new either revision ID or 'prev' or 'next'. Default: 0.
+ * @param IContextSource $context Context to use, anything else will be ignored
+ * @param int $old Old ID we want to show and diff with.
+ * @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0.
* @param int $rcid Deprecated, no longer used!
* @param bool $refreshCache If set, refreshes the diff cache
* @param bool $unhide If set, allow viewing deleted revs
*
* @todo move this to TextDifferenceEngine, make DifferenceEngine abstract. At some point.
*
- * @param string $otext old text, must be already segmented
- * @param string $ntext new text, must be already segmented
+ * @param string $otext Old text, must be already segmented
+ * @param string $ntext New text, must be already segmented
*
* @return bool|string
*/
class BadTitleError extends ErrorPageError {
/**
* @param string|Message $msg A message key (default: 'badtitletext')
- * @param array $params parameter to wfMessage()
+ * @param array $params Parameter to wfMessage()
*/
public function __construct( $msg = 'badtitletext', $params = array() ) {
parent::__construct( 'badtitle', $msg, $params );
*
* @param string|Message $title Message key (string) for page title, or a Message object
* @param string|Message $msg Message key (string) for error text, or a Message object
- * @param array $params with parameters to wfMessage()
+ * @param array $params Array with parameters to wfMessage()
*/
public function __construct( $title, $msg, $params = array() ) {
$this->title = $title;
* itself. It also fails-over to the next possible clusters
* as provided in the first parameter.
*
- * @param array $tryStores refer to $wgDefaultExternalStore
+ * @param array $tryStores Refer to $wgDefaultExternalStore
* @param string $data
* @param array $params Associative array of ExternalStoreMedium parameters
* @return string|bool The URL of the stored data item, or false on error
/**
* Get an associative array containing information about a file in the local filesystem.
*
- * @param string $path absolute local filesystem path
+ * @param string $path Absolute local filesystem path
* @param mixed $ext The file extension, or true to extract it from the filename.
* Set it to false to ignore the extension.
* @return array
protected $params = array();
/**
- * @param string $dir file system directory
+ * @param string $dir File system directory
* @param array $params
*/
public function __construct( $dir, array $params ) {
/**
* Return an appropriate iterator object to wrap
*
- * @param string $dir file system directory
+ * @param string $dir File system directory
* @return Iterator
*/
protected function initIterator( $dir ) {
* @param string $storagePath
* @param string|null $content File data
* @param string|null $fsPath File system path
- * @return MIME type
+ * @return string MIME type
*/
protected function getContentType( $storagePath, $content, $fsPath ) {
return call_user_func_array( $this->mimeCallback, func_get_args() );
*
* @param string $container Resolved container name
* @param string $dir Resolved path relative to container
- * @param string $after null
+ * @param string $after
* @param int $limit
* @param array $params
* @return Traversable|array
/**
* Get the position ID of the latest journal entry at some point in time
*
- * @param int|string $time timestamp
+ * @param int|string $time Timestamp
* @return int|bool
*/
final public function getPositionAtTime( $time ) {
/**
* @see FileJournal::doGetPositionAtTime()
- * @param int|string $time timestamp
+ * @param int|string $time Timestamp
* @return int|bool
*/
protected function doGetPositionAtTime( $time ) {
protected $domain; // string; domain (usually wiki ID)
- /** @var array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) */
+ /** @var array Array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) */
protected $managers = array();
/**
/** @var array (server name => bool) */
protected $serversUp = array();
- /** @var string random UUID */
+ /** @var string Random UUID */
protected $session = '';
/**
/** @var array Map server names to hostname/IP and port numbers */
protected $lockServers = array();
- /** @var string random UUID */
+ /** @var string Random UUID */
protected $session = '';
/**
* Returns a FileRepoStatus object with the file Virtual URL in the value,
* file can later be disposed using FileRepo::freeTemp().
*
- * @param string $originalName the base name of the file as specified
+ * @param string $originalName The base name of the file as specified
* by the user. The file extension will be maintained.
* @param string $srcPath The current location of the file.
* @return FileRepoStatus Object with the URL in the value.
* Get an array or iterator of file objects for files that have a given
* SHA-1 content hash.
*
- * @param string $hash a sha1 hash to look for
+ * @param string $hash A sha1 hash to look for
* @return array
*/
function findBySha1( $hash ) {
/**
* Find all instances of files with this key
*
- * @param string $hash base 36 SHA-1 hash
+ * @param string $hash Base 36 SHA-1 hash
* @return array Array of File objects
*/
function findBySha1( $hash ) {
/**
* Find all instances of files with this keys
*
- * @param array $hashes base 36 SHA-1 hashes
+ * @param array $hashes Base 36 SHA-1 hashes
* @return array Array of array of File objects
*/
function findBySha1s( array $hashes ) {
* Split a virtual URL into repo, zone and rel parts
* @param string $url
* @throws MWException
- * @return array containing repo, zone and rel
+ * @return array Containing repo, zone and rel
*/
function splitVirtualUrl( $url ) {
if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {
* @ingroup FileAbstraction
*/
class ArchivedFile {
- /** @var int filearchive row ID */
+ /** @var int Filearchive row ID */
private $id;
/** @var string File name */
/** @var int File size in bytes */
private $size;
- /** @var int size in bytes */
+ /** @var int Size in bytes */
private $bits;
/** @var int Width */
/** @var string Relative path including trailing slash */
protected $hashPath;
- /** @var string number of pages of a multipage document, or false for
+ /** @var string Number of pages of a multipage document, or false for
* documents which aren't multipage documents
*/
protected $pageCount;
*
* Currently used to add a warning to the image description page
*
- * @return bool false if the main image is both animated
+ * @return bool False if the main image is both animated
* and the thumbnail is not. In all other cases must return
* true. If image is not renderable whatsoever, should
* return true.
/**
* Returns the most appropriate source image for the thumbnail, given a target thumbnail size
* @param array $params
- * @return array source path and width/height of the source
+ * @return array Source path and width/height of the source
*/
public function getThumbnailSource( $params ) {
if ( $this->repo
*
* @param string $zone Name of requested zone
* @param bool|string $suffix If not false, the name of a file in zone
- * @return string path
+ * @return string Path
*/
function getZoneUrl( $zone, $suffix = false ) {
$this->assertRepoDefined();
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a thumbnail file
- * @return string path
+ * @return string Path
*/
function getThumbUrl( $suffix = false ) {
return $this->getZoneUrl( 'thumb', $suffix );
* Get the URL of the transcoded directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a media file
- * @return string path
+ * @return string Path
*/
function getTranscodedUrl( $suffix = false ) {
return $this->getZoneUrl( 'transcoded', $suffix );
* @param int $flags A bitwise combination of:
* File::DELETE_SOURCE Delete the source file, i.e. move rather than copy
* @param array $options Optional additional parameters
- * @return FileRepoStatus object. On success, the value member contains the
+ * @return FileRepoStatus On success, the value member contains the
* archive name, or an empty string if it was a new file.
*
* STUB
/** @var bool Does the file exist on disk? (loadFromXxx) */
protected $fileExists;
- /** @var int image width */
+ /** @var int Image width */
protected $width;
- /** @var int image height */
+ /** @var int Image height */
protected $height;
/** @var int Returned by getimagesize (loadFromXxx) */
* Create a LocalFile from a SHA-1 key
* Do not call this except from inside a repo class.
*
- * @param string $sha1 base-36 SHA-1
+ * @param string $sha1 Base-36 SHA-1
* @param LocalRepo $repo
* @param string|bool $timestamp MW_timestamp (optional)
* @return bool|LocalFile
/**
* @param DatabaseBase $dbr
* @param string $fname
- * @return array|false
+ * @return array|bool
*/
private function loadFieldsWithTimestamp( $dbr, $fname ) {
$fieldMap = false;
/**
* Get all thumbnail names previously generated for this file
* @param string|bool $archiveName Name of an archive file, default false
- * @return array first element is the base dir, then files in that base dir.
+ * @return array First element is the base dir, then files in that base dir.
*/
function getThumbnails( $archiveName = false ) {
if ( $archiveName ) {
* Start a transaction and lock the image for update
* Increments a reference counter if the lock is already held
* @throws MWException Throws an error if the lock was not acquired
- * @return bool success
+ * @return bool Success
*/
function lock() {
$dbw = $this->repo->getMasterDB();
* Create a OldLocalFile from a SHA-1 key
* Do not call this except from inside a repo class.
*
- * @param string $sha1 base-36 SHA-1
+ * @param string $sha1 Base-36 SHA-1
* @param LocalRepo $repo
* @param string|bool $timestamp MW_timestamp (optional)
*
* @param Title $title
* @param FileRepo $repo
* @param string $time Timestamp or null to load by archive name
- * @param string $archiveName archive name or null to load by timestamp
+ * @param string $archiveName Archive name or null to load by timestamp
* @throws MWException
*/
function __construct( $title, $repo, $time, $archiveName ) {
}
/**
- * @param MediaTransformOutput|bool $thumb the thumbnail, or false if no
+ * @param MediaTransformOutput|bool $thumb The thumbnail, or false if no
* thumb (which can happen)
* @return float
*/
* @param array $descriptor Input Descriptor, as described above
*
* @throws MWException
- * @return HTMLFormField subclass
+ * @return HTMLFormField Instance of a subclass of HTMLFormField
*/
public static function loadInputFromParameters( $fieldname, $descriptor ) {
$class = self::getClassFromDescriptor( $fieldname, $descriptor );
/**
* Add footer text, inside the form.
*
- * @param string $msg complete text of message to display
+ * @param string $msg Complete text of message to display
* @param string|null $section The section to add the footer text to
*
* @return HTMLForm $this for chaining calls (since 1.20)
* Only useful when the method is "post".
*
* @since 1.24
- * @param string|array Salt to use
- * @return HTMLForm $this for chaining calls
+ * @param string|array $salt Salt to use
+ * @return HTMLForm $this For chaining calls
*/
public function setTokenSalt( $salt ) {
$this->mTokenSalt = $salt;
*
* @param bool|string|array|Status $submitResult Output from HTMLForm::trySubmit()
*
- * @return Nothing, should be last call
+ * @return void Nothing, should be last call
*/
function displayForm( $submitResult ) {
$this->getOutput()->addHTML( $this->getHTML( $submitResult ) );
/**
* Format a stack of error messages into a single HTML string
*
- * @param array $errors of message keys/values
+ * @param array $errors Array of message keys/values
*
* @return string HTML, a "<ul>" list of errors
*/
/**
* Set the text for the submit button
*
- * @param string $t plaintext.
+ * @param string $t Plaintext
*
* @return HTMLForm $this for chaining calls (since 1.20)
*/
*
* @param array $data
*
- * @return
+ * @return array
*/
function filterDataForSubmit( $data ) {
return $data;
* the input object itself. It should not implement the surrounding
* table cells/rows, or labels/help messages.
*
- * @param string $value the value to set the input to; eg a default
+ * @param string $value The value to set the input to; eg a default
* text for a text input.
*
* @return string Valid HTML.
*
* @param array $alldata
* @param array $params
- * @return boolean
+ * @return bool
*/
protected function isHiddenRecurse( array $alldata, array $params ) {
$origParams = $params;
* @param string|array $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool true to cancel the submission
+ * @return bool True to cancel the submission
*/
function cancelSubmit( $value, $alldata ) {
return false;
* @param string|array $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool|string true on success, or String error to display, or
+ * @return bool|string True on success, or String error to display, or
* false to fail validation without displaying an error.
*/
function validate( $value, $alldata ) {
public function showHelpBox( $msg /*, ... */ ) {
}
- /**
- * @param Status $status
- */
public function showStatusMessage( Status $status ) {
- parent::showStatusMessage( $status );
+ $warnings = array_merge( $status->getWarningsArray(),
+ $status->getErrorsArray() );
+
+ if ( count( $warnings ) !== 0 ) {
+ foreach ( $warnings as $w ) {
+ call_user_func_array( array( $this, 'showMessage' ), $w );
+ }
+ }
+
if ( !$status->isOk() ) {
echo "\n";
exit( 1 );
abstract public function showError( $msg /*, ... */ );
/**
- * Shows messages to the user through a Status object
+ * Show a message to the installing user by using a Status object
* @param Status $status
*/
- public function showStatusMessage( Status $status ) {
- $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
- if ( $errors ) {
- foreach ( $errors as $error ) {
- call_user_func( 'showMessage', $error );
- }
- }
- }
+ abstract public function showStatusMessage( Status $status );
/**
* Constructor, always call this from child classes.
*
* Used only by environment checks.
*
- * @param string $path path to search
- * @param array $names of executable names
+ * @param string $path Path to search
+ * @param array $names Array of executable names
* @param array|bool $versionInfo False or array with two members:
* 0 => Command to run for version check, with $1 for the full executable name
* 1 => String to compare the output with
/**
* Main entry point.
*
- * @param array[] $session initial session array
+ * @param array[] $session Initial session array
*
* @return array[] New session array
*/
$this->output->addHTML( $html );
}
+ /**
+ * @param Status $status
+ */
+ public function showStatusMessage( Status $status ) {
+ $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+ foreach ( $errors as $error ) {
+ call_user_func_array( array( $this, 'showMessage' ), $error );
+ }
+ }
+
/**
* Label a control by wrapping a config-input div around it and putting a
* label before it.
/**
* Get the starting tags of a fieldset.
*
- * @param string $legend message name
+ * @param string $legend Message name
*
* @return string
*/
"config-outdated-sqlite": "'''Папярэджаньне''': усталяваны SQLite $1, у той час, калі мінімальная сумяшчальная вэрсія — $2. SQLite ня будзе даступны.",
"config-no-fts3": "'''Папярэджаньне''': SQLite створаны без модуля [//sqlite.org/fts3.html FTS3], для гэтага ўнутранага інтэрфэйсу ня будзе даступная магчымасьць пошуку.",
"config-register-globals-error": "<strong>Памылка: парамэтар PHP <code>[http://php.net/register_globals register_globals]</code> уключаны.\nЁн павінен быць адключаны, каб працягнуць усталяваньне.</strong>\nГлядзіце [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] дзеля дапамогі, як зрабіць гэта.",
+ "config-magic-quotes-gpc": "<strong>Непапраўная памылка: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] актываваны!</strong>\nГэтая функцыя псуе ўвод зьвестак непрадказальным чынам.\nВы ня можаце ўсталяваць або выкарыстоўваць MediaWiki, пакуль гэтая функцыя ня будзе адключаная.",
"config-magic-quotes-runtime": "'''Фатальная памылка: уключаная опцыя PHP [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime]!'''\nГэтая опцыя псуе ўводны паток зьвестак непрадказальным чынам.\nПрацяг усталяваньня альбо выкарыстаньне MediaWiki без адключэньня гэтай опцыі немагчымыя.",
"config-magic-quotes-sybase": "'''Фатальная памылка: рэжым [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] уключаны!'''\nГэты рэжым шкодзіць уваходныя зьвесткі непрадказальным чынам.\nПрацяг усталяваньня альбо выкарыстаньне MediaWiki немагчымыя, пакуль рэжым ня будзе выключаны.",
"config-mbstring": "'''Фатальная памылка: рэжым [http://www.php.net/manual/en/ref.info.php#mbstring.overload mbstring.func_overload] уключаны!'''\nГэты рэжым выклікае памылкі і можа шкодзіць зьвесткі непрадказальным чынам.\nПрацяг усталяваньня альбо выкарыстаньне MediaWiki немагчымыя, пакуль рэжым ня будзе выключаны.",
"config-extensions": "Пашырэньні",
"config-extensions-help": "Пашырэньні пададзеныя вышэй, былі знойдзеныя ў Вашай дырэкторыі <code>./extensions</code>.\n\nЯны могуць патрабаваць дадатковых наладаў, але іх можна ўключыць зараз",
"config-skins": "Тэмы афармленьня",
+ "config-skins-help": "Пералічаныя вышэй тэмы афармленьня знойдзеныя ў вашай тэчцы <code>./skins</code>. Вы мусіце ўключыць як мінімум адну, а таксама абраць тэму па змоўчаньні.",
"config-install-alreadydone": "'''Папярэджаньне:''' здаецца, што Вы ўжо ўсталёўвалі MediaWiki і спрабуеце зрабіць гэтай зноў.\nКалі ласка, перайдзіце на наступную старонку.",
"config-install-begin": "Пасьля націску кнопкі «{{int:config-continue}}» пачнецца ўсталяваньне MediaWiki.\nКалі Вы жадаеце што-небудзь зьмяніць, націсьніце кнопку «{{int:config-back}}».",
"config-install-step-done": "зроблена",
"config-outdated-sqlite": "'''Upozornění''': Máte SQLite $1, které je starší než minimálně vyžadovaná verze $2. SQLite nebude dostupné.",
"config-no-fts3": "'''Upozornění''': SQLite bylo přeloženo bez [//sqlite.org/fts3.html modulu FTS3], funkce pro vyhledávání zde nebudou dostupné.",
"config-register-globals-error": "<strong>Chyba: PHP nastavení <code>[http://php.net/register_globals register_globals]</code> je zapnuto. Pro pokračování v instalaci musí být vypnuto.</strong>\nRady, jak toho dosáhnout, najdete na [https://www.mediawiki.org/wiki/Register_globals https://www.mediawiki.org/wiki/register_globals].",
+ "config-magic-quotes-gpc": "<strong>Kritická chyba: Je zapnuto [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc]!</strong>\nToto nastavení nepředvídatelně poškozuje vstupní data.\nMediaWiki nelze nainstalovat ani používat, dokud není toto nastavení vypnuto.",
"config-magic-quotes-runtime": "'''Kritická chyba: Je zapnuto [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime]!'''\nToto nastavení nepředvídatelně poškozuje vstupní data.\nMediaWiki nelze nainstalovat ani používat, dokud není toto nastavení vypnuto.",
"config-magic-quotes-sybase": "'''Kritická chyba: Je zapnuto [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase]!'''\nToto nastavení nepředvídatelně poškozuje vstupní data.\nMediaWiki nelze nainstalovat ani používat, dokud není toto nastavení vypnuto.",
"config-mbstring": "'''Kritická chyba: Je zapnuto [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload]!'''\nToto nastavení způsobuje chyby a může nepředvídatelně poškozovat vstupní data.\nMediaWiki nelze nainstalovat ani používat, dokud není toto nastavení vypnuto.",
"config-outdated-sqlite": "'''Warnung:''' SQLite $1 ist installiert. Allerdings benötigt MediaWiki SQLite $2 oder höher. SQLite wird daher nicht verfügbar sein.",
"config-no-fts3": "'''Warnung:''' SQLite wurde ohne das [//sqlite.org/fts3.html FTS3-Modul] kompiliert, sodass keine Suchfunktionen für dieses Datenbanksystem zur Verfügung stehen werden.",
"config-register-globals-error": "<strong>Fehler: Die PHP-Option <code>[http://php.net/register_globals register_globals]</code> ist aktiviert.\nSie muss deaktiviert sein, um mit der Installation fortzufahren.</strong>\nSiehe [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] für Hilfe.",
+ "config-magic-quotes-gpc": "<strong>Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] ist aktiv!</strong>\nDiese Option beschädigt eingegebene Daten unvorhersehbar.\nDu kannst MediaWiki nicht installieren oder verwenden, bis diese Option deaktiviert ist.",
"config-magic-quotes-runtime": "'''Fataler Fehler: Der Parameter <code>[http://www.php.net/manual/de/function.set-magic-quotes-runtime.php set_magic_quotes_runtime]</code> von PHP ist aktiviert!'''\nDiese Einstellung führt zu unvorhersehbaren Problemen bei der Dateneingabe.\nMediaWiki kann nicht installiert werden, solange dieser Parameter nicht deaktiviert wurde.",
"config-magic-quotes-sybase": "<strong>Fataler Fehler: Der Parameter <code>[http://www.php.net/manual/de/sybase.configuration.php#ini.magic-quotes-sybase magic_quotes_sybase]</code> von PHP ist aktiviert!</strong>\nDiese Einstellung führt zu unvorhersehbaren Problemen bei der Dateneingabe.\nMediaWiki kann nicht installiert werden, solange dieser Parameter nicht deaktiviert wurde.",
"config-mbstring": "'''Fataler Fehler: Der Parameter <code>[http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload]</code> von PHP ist aktiviert!'''\nDiese Einstellung verursacht Fehler und führt zu unvorhersehbaren Problemen bei der Dateneingabe.\nMediaWiki kann nicht installiert werden, solange dieser Parameter nicht deaktiviert wurde.",
"Seb35",
"McDutchie",
"Miguel2706",
- "Macofe"
+ "Macofe",
+ "AVIADOR"
]
},
"config-desc": "El instalador de MediaWiki",
"config-memcache-badport": "Los números de puerto de Memcached deben estar entre $1 y $2.",
"config-extensions": "Extensiones",
"config-extensions-help": "Se ha detectado en tu directorio <code>./extensions</code> las extensiones listadas arriba.\n\nPuede que necesiten configuraciones adicionales, pero puedes habilitarlas ahora.",
+ "config-skins": "Apariencias",
+ "config-skins-help": "Las apariencias mencionadas anteriormente fueron detectadas en su directorio <code>./skins</code>. Debe habilitar al menos una, y elegir la opción predeterminada.",
+ "config-skins-use-as-default": "Utilizar esta apariencia como predeterminada",
+ "config-skins-missing": "No se encontró ninguna apariencia; MediaWiki utilizará una apariencia anterior hasta que usted instale unas apariencias adecuadas.",
+ "config-skins-must-enable-some": "Usted debe seleccionar al menos una apariencia para activar.",
+ "config-skins-must-enable-default": "La apariencia elegida como predeterminada debe estar habilitada.",
"config-install-alreadydone": "'''Aviso:''' Parece que ya habías instalado MediaWiki y estás intentando instalarlo nuevamente.\nPasa a la próxima página, por favor.",
"config-install-begin": "Al pulsar en «{{int:config-continue}}» comenzará el proceso de instalación de MediaWiki.\nSi quieres realizar algún cambio, pulsa en «{{int:config-back}}».",
"config-install-step-done": "hecho",
"config-outdated-sqlite": "'''Attention''': vous avez SQLite $1, qui est inférieur à la version minimale requise $2. SQLite sera indisponible.",
"config-no-fts3": "'''Attention :''' SQLite est compilé sans le module [//sqlite.org/fts3.html FTS3] ; les fonctions de recherche ne seront pas disponibles sur ce moteur.",
"config-register-globals-error": "<strong>Erreur : L’option <code>[http://php.net/register_globals register_globals]</code> de PHP est activée.\nElle doit être désactivée pour poursuivre l’installation.</strong>\nVoyez [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] pour avoir de l’aide sur la manière de faire cela.",
+ "config-magic-quotes-gpc": "<strong>Ereur critique : [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] est actif !</strong>\nCette option corrompt les entrées de donnée de façon imprévisible.\nVous ne pouvez pas installer ou utiliser MédiaWiki tant que cette option n’est pas désactivée.",
"config-magic-quotes-runtime": "'''Erreur fatale : [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] est activé !'''\nCette option corrompt les données de manière imprévisible.\nVous ne pouvez pas installer ou utiliser MediaWiki tant que cette option est activée.",
"config-magic-quotes-sybase": "'''Erreur fatale : [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybasee] est activé !'''\nCette option corrompt les données de manière imprévisible.\nVous ne pouvez pas installer ou utiliser MediaWiki tant que cette option est activée.",
"config-mbstring": "'''Erreur fatale : [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] est activé !'''\nCette option provoque des erreurs et peut corrompre les données de manière imprévisible.\nVous ne pouvez pas installer ou utiliser MediaWiki tant que cette option est activée.",
"config-outdated-sqlite": "'''אזהרה''': במערכת מתוקן SQLite $1. גרסה זו לא נתמכת ולשימוש ב־SQLite נדרשת גרסה $2 לפחות. SQLlite לא יהיה זמין.",
"config-no-fts3": "'''אזהרה''': SQLite מקומפל ללא [//sqlite.org/fts3.html מודול FTS]. יכולות חיפוש לא יהיו זמינות בהתקנה הזאת.",
"config-register-globals-error": "<strong>שגיאה: האפשרות <code>[http://php.net/register_globals register_globals]</code> של PHP מופעלת.\nצריך לכבות אותה כדי להמשיך בהתקנה.</strong>\nר' [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] להסבר איך לעשות את זה.",
+ "config-magic-quotes-gpc": "<strong>סופני: האפשרות [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] פעילה!</strong>\nהאפשרות הזאת מקלקלת נתוני קלט באופן בלתי־ניתן לחיזוי.\nלא ניתן להתקין את מדיה־ויקי אם האפשרות הזאת אינה כבויה.",
"config-magic-quotes-runtime": "<strong>שגיאה סופנית: האפשרות [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] פעילה!</strong>\nהאפשרות הזאת מעוותת את נתוני הקלט באופן בלתי־צפוי.\nלא ניתן להתקין את מדיה־ויקי אלא אם האפשרות הזאת תכובה.",
"config-magic-quotes-sybase": "'''שגיאה סופנית''': האפשרות [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] פעילה!'''\nהאפשרות הזאת מעוותת את נתוני הקלט באופן בלתי־צפוי.\nלא ניתן להתקין את מדיה־ויקי או להשתמש בה אלא אם האפשרות הזאת תכובה.",
"config-mbstring": "'''שגיאה סופנית''': האפשרות [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] פעילה!'''\nהאפשרות הזאת גורמת לשגיאות ומעוותת את נתוני הקלט באופן בלתי־צפוי.\nלא ניתן להתקין את מדיה־ויקי או להשתמש בה אלא אם האפשרות הזאת תכובה.",
"config-outdated-sqlite": "'''Предупредување''': имате SQLite $1. Најстарата допуштена верзија е $2. Затоа, SQLite ќе биде недостапен.",
"config-no-fts3": "'''Предупредување''': SQLite iе составен без модулот [//sqlite.org/fts3.html FTS3] - за оваа база нема да има можност за пребарување.",
"config-register-globals-error": "<strong>Грешка: Вклучена е можноста <code>[http://php.net/register_globals register_globals]</code> за PHP.\nМора да се исклучи за да продолжите со воспоставката.</strong>\nКако да го направите тоа можете да прочитате на [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals].",
+ "config-magic-quotes-gpc": "<strong>Кобно: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] е ективно!</strong>\nОваа можност непредвидливо го расипува вносот на податоци.\nОваа можност мора да е исклучена. Во спротивно нема да можете да го воспоставите и користите МедијаВики.",
"config-magic-quotes-runtime": "'''Кобно: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] е активно!'''\nОваа можност непредвидливо го расипува вносот на податоци.\nОваа можност мора да е исклучена. Во спротивно нема да можете да го воспоставите и користите МедијаВики.",
"config-magic-quotes-sybase": "'''Кобно: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] е активно!'''\nОваа можност непредвидливо го расипува вносот на податоци.\nОваа можност мора да е исклучена. Во спротивно нема да можете да го воспоставите и користите МедијаВики.",
"config-mbstring": "'''Кобно: [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] е активно!'''\nОваа можност предизвикува грешки и може непредвидиво да го расипува вносот на податоци.\nОваа можност мора да е исклучена. Во спротивно нема да можете да го воспоставите и користите МедијаВики.",
"config-memory-raised": "PHP <code>memory_limit</code> było ustawione na $1, zostanie zwiększone do $2.",
"config-memory-bad": "'''Uwaga:''' PHP <code>memory_limit</code> jest ustawione na $1.\nTo jest prawdopodobnie zbyt mało.\nInstalacja może się nie udać!",
"config-ctype": "''' Krytyczny ''': PHP musi być skompilowany z obsługą [http://www.php.net/manual/en/ctype.installation.php rozszerzenia Ctype].",
+ "config-iconv": "<strong>Błąd krytyczny:</strong> PHP musi być skomilowane z obsługą [http://www.php.net/manual/en/iconv.installation.php rozszerzenia iconv].",
"config-json": "'''Błąd krytyczny:''' PHP skompilowano bez obsługa JSON.\nPrzed zainstalowaniem oprogramowania MediaWiki musisz zainstalować rozszerzenie PHP JSON albo rozszerzenie [http://pecl.php.net/package/jsonc PECL jsonc].\n* Rozszerzenie PHP jest zawarte w Red Hat Enterprise Linux (CentOS) 5 i 6, jednak musi zostać włączone w <code>/etc/php.ini</code> or <code>/etc/php.d/json.ini</code>.\n* Niektóre dystrybucje Linuksa, wydane po maju 2013, nie używają rozszerzenia PHP, lecz rozszerzenie PECL, jako <code>php5-json</code> lub <code>php-pecl-jsonc</code>.",
"config-xcache": "[Http://trac.lighttpd.net/xcache/ XCache] jest zainstalowany",
"config-apc": "[Http://www.php.net/apc APC] jest zainstalowany",
"config-skins": "Skórki",
"config-skins-help": "Powyższe skórki zostały wykryte w twoim katalogi <code>./skins</code>. Należy włączyć co najmniej jedną i wybrać domyślną.",
"config-skins-use-as-default": "Użyj tej skórki jako domyślnej",
+ "config-skins-missing": "Nie znaleziono skórki; MediaWiki będzie używać rezerwowej skórki do czasu zainstalowania odpowiednich.",
+ "config-skins-must-enable-some": "Musisz wybrać co najmniej jedną skórkę, aby ją włączyć.",
"config-skins-must-enable-default": "Skórka wybrana jako domyślna musi być włączona.",
"config-install-alreadydone": "'''Uwaga''' – wydaje się, że MediaWiki jest już zainstalowane, a obecnie próbujesz zainstalować je ponownie.\nPrzejdź do następnej strony.",
"config-install-begin": "Po naciśnięciu \"{{int:config-continue}}\", rozpocznie się instalacja MediaWiki.\nJeśli nadal chcesz dokonać zmian, naciśnij \"{{int:config-back}}\".",
"config-outdated-sqlite": "'''Предупреждение''': у Вас установлен SQLite $1, версия которого ниже требуемой $2 . SQLite будет недоступен.",
"config-no-fts3": "'''Внимание''': SQLite собран без модуля [//sqlite.org/fts3.html FTS3] — поиск не будет работать для этой базы данных.",
"config-register-globals-error": "<strong>Ошибка: Параметр PHP <code>[http://php.net/register_globals register_globals]</code> включен.\nОн должен быть отключен для того, чтобы можно было продолжить установку.</strong>\nПолучить справку о том, как это сделать, можно по адресу [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals].",
+ "config-magic-quotes-gpc": "'''Проблема: включена опция PHP [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc]!'''\nЭто приводит к непредсказуемой порче вводимых данных.\nУстановка и использование MediaWiki без выключения этой опции невозможно.",
"config-magic-quotes-runtime": "'''Проблема: включена опция PHP [http://www.php.net/manual/ru/function.magic-quotes-runtime.php magic_quotes_runtime]!'''\nЭто приводит к непредсказуемой порче вводимых данных.\nУстановка и использование MediaWiki без выключения этой опции невозможно.",
"config-magic-quotes-sybase": "'''Проблема: включена опция PHP [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase]!'''\nЭто приводит к непредсказуемой порче вводимых данных.\nУстановка и использование MediaWiki без выключения этой опции невозможно.",
"config-mbstring": "'''Проблема: включена опция PHP [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload]!'''\nЭто приводит к ошибкам и непредсказуемой порче вводимых данных.\nУстановка и использование MediaWiki без выключения этой опции невозможно.",
"config-env-good": "The environment haes been checked.\nYe can install MediaWiki.",
"config-env-bad": "The environment haes been checked.\nYe canna install MediaWiki.",
"config-env-php": "PHP $1 is instâlled.",
- "config-env-php-toolow": "PHP $1 is instâlled.\nHoue'er, MediaWiki requires PHP $2 or heier.",
"config-unicode-using-utf8": "Uising Brion Vibber's utf8_normalize.so fer Unicode normalization.",
"config-unicode-using-intl": "Uising the [http://pecl.php.net/intl intl PECL extension] fer Unicode normalization.",
"config-unicode-pure-php-warning": "<strong>Warnishment:</strong> The [http://pecl.php.net/intl intl PECL extension] is no available tae haunle Unicode normalisation, fawin back tae slaw pure-PHP implementation.\nGif ye rin ae hei-traffic steid, ye shid read ae wee bit oan [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations Unicode normalization].",
"config-no-db": "Coudna fynd ae suitable database driver! Ye need tae instaw ae database driver fer PHP.\nThe follaein database types ar supported: $1.\n\nGif ye compiled PHP yersel, reconfeegure it wi ae database client enabled, fer example, uising <code>./confeegure --wi-mysqli</code>.\nGif ye installed PHP fae ae Debian or Ubuntu package, than ye need tae instaw forby, fer example, the <code>php5-mysql</code> package.",
"config-outdated-sqlite": "<strong>Warnishment:</strong> ye have SQLite $1, this is lower than minimum required version $2. SQLite will be onavailable.",
"config-no-fts3": "<strong>Warnishment:</strong> SQLite is compiled wioot the [//sqlite.org/fts3.html FTS3 module], rake features will be onavailable oan this backend.",
- "config-register-globals": "<strong>Warnishment: PHP's <code>[http://php.net/register_globals register_globals]</code> optie is enabled.\nDisable it gif ye can.</strong>\nMediaWiki will wark, but yer server is exposed til poteential securitie vulnerabeelities.",
+ "config-magic-quotes-gpc": "<strong>Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] is active!</strong>\nThis option corrupts data input unpredictably.\nYe cannae install or uise MediaWiki unless this option is disabled.",
"config-magic-quotes-runtime": "<strong>Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] is active!'</strong>\nThis optie rots data input onpredictably.\nYe canna install or uise MediaWiki onless this optie is disabled.",
"config-magic-quotes-sybase": "<strong>Fatal: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] is active!</strong>\nThis optie rots data input onpredictably.\nYe canna install or uise MediaWiki onless this optie is disabled.",
"config-mbstring": "<strong>Fatal: [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] is active!</strong>\nThis optie causes mistaks an can rot data onpredictably.\nYe canna install or uise MediaWiki onless this optie is disabled.",
"config-outdated-sqlite": "'''Увага''': у Вас встановлена версія SQLite $1, а це нижче, ніж мінімально необхідна версія $2. SQLite буде недоступним.",
"config-no-fts3": "'''Увага''': SQLite зібраний без [//sqlite.org/fts3.html модуля FTS3], функції пошуку не будуть працювати у цій системі.",
"config-register-globals-error": "<strong>Помилка: Опція PHP <code>[http://php.net/register_globals register_globals]</code> увімкнена.\nЩоб продовжити це встановлення, її треба вимкнути.</strong>\nДив. довідку, як це зробити, на [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals].",
+ "config-magic-quotes-gpc": "'''Фатальна помилка: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc] увімкнена!'''\nЦя опція призводить до непередбачуваного пошкодження даних.\nВи не можете встановити і використовувати MediaWiki, поки не буде вимкнено цю опцію.",
"config-magic-quotes-runtime": "'''Проблема: Опція PHP [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime] увімкнена!'''\nЦя опція призводить до непередбачуваного пошкодження даних.\nВи не можете встановити і використовувати MediaWiki, поки не буде вимкнено цю опцію.",
"config-magic-quotes-sybase": "'''Проблема: Опція PHP [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] увімкнена!'''\nЦя опція призводить до непередбачуваного пошкодження даних.\nВи не можете встановити і використовувати MediaWiki, поки не буде вимкнено цю опцію.",
"config-mbstring": "'''Проблема: Опція PHP [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] увімкнена!'''\nЦя опція призводить до непередбачуваного пошкодження даних.\nВи не можете встановити і використовувати MediaWiki, поки не буде вимкнено цю опцію.",
"config-memory-raised": "Обмеження пам'яті PHP (<code>memory_limit</code>) $1, піднято до $2.",
"config-memory-bad": "'''Увага:''' Розмір пам'яті PHP (<code>memory_limit</code>) становить $1.\nІмовірно, це замало.\nВстановлення може не вдатись!",
"config-ctype": "'''Помилка''': PHP має бути зібраним з підтримкою [http://www.php.net/manual/en/ctype.installation.php розширення Ctype].",
+ "config-iconv": "'''Фатальна помилка''': PHP має бути зібраним з підтримкою [http://www.php.net/manual/en/iconv.installation.php розширення iconv].",
"config-json": "'''Fatal:''' PHP був скомпільований без підтримки JSON.\nВам потрібно встановити або розширення PHP JSON або розширення[http://pecl.php.net/package/jsonc PECL jsonc] перед встановлення Медіавікі.\n* Розширення PHP включено у Red Hat Enterprise Linux (CentOS) 5 та 6, хоча має бути доступним у <code>/etc/php.ini</code> або <code>/etc/php.d/json.ini</code>.\n* Деякі дистрибутиви Лінукса, випущені після травня 2013, пропустили розширення PHP, натомість упакували розширення PECL як <code>php5-json</code> або <code>php-pecl-jsonc</code>.",
"config-xcache": "[http://xcache.lighttpd.net/ XCache] встановлено",
"config-apc": "[http://www.php.net/apc APC] встановлено",
"config-memcache-badport": "Номери портів Memcached повинні лежати в межах від $1 до $2.",
"config-extensions": "Розширення",
"config-extensions-help": "Розширення, перераховані вище, були знайдені у папці <code>./extensions</code>.\n\nВони можуть потребувати додаткових налаштувань, але Ви можете увімкнути їх зараз.",
+ "config-skins": "Оформлення",
+ "config-skins-help": "Перераховані вище теми оформлення було знайдено у Вашій папці <code>./skins</code>. Ви маєте увімкнути хоча б одну, і обрати тему за замовчуванням.",
+ "config-skins-use-as-default": "Використовувати цю тему за замовчуванням",
+ "config-skins-missing": "Не було знайдено жодних тем; MediaWiki буде використовувати резервну тему, поки Ви не встановите власні.",
+ "config-skins-must-enable-some": "Потрібно вибрати принаймні одну тему, щоб увімкнути.",
+ "config-skins-must-enable-default": "Тема, обрана за замовчуванням, повинна бути увімкнена.",
"config-install-alreadydone": "'''Увага:''' Здається, Ви вже встановлювали MediaWiki і зараз намагаєтесь встановити її знову.\nБудь ласка, перейдіть на наступну сторінку.",
"config-install-begin": "Натискаючи \"{{int:config-continue}}\", Ви розпочинаєте встановлення MediaWiki.\nЯкщо Ви все ще хочете внести зміни, натисніть \"{{int:config-back}}\".",
"config-install-step-done": "виконано",
"config-outdated-sqlite": "'''警告''':您已安装SQLite $1,但是它的版本低于最低要求版本$2。因此您无法选择SQLite。",
"config-no-fts3": "'''警告''':已编译的SQLite不包含[//sqlite.org/fts3.html FTS3模块],后台搜索功能将不可用。",
"config-register-globals-error": "<strong>错误:PHP<code>[http://php.net/register_globals register_globals]</code>选项被启用。必须禁用它才能继续安装。</strong>关于如何禁用,参见[https://www.mediawiki.org/wiki/register_globals mediawiki.org此页]。",
+ "config-magic-quotes-gpc": "<strong>致命错误:[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc magic_quotes_gpc]已启用!</strong>此选项会无法挽回的破坏输入数据。除非此选项被禁用否则您不能安装或使用MediaWiki。",
"config-magic-quotes-runtime": "'''毁灭性错误:[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_runtime]已启用!'''\n此选项会无法预测地破坏输入的数据,请将其禁用,否则您将不能安装或使用MediaWiki。",
"config-magic-quotes-sybase": "'''毁灭性错误:[http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime magic_quotes_sybase]已启用!'''\n此选项会无法预测地破坏输入的数据,请将其禁用,否则您将不能安装或使用MediaWiki。",
"config-mbstring": "'''毁灭性错误:[http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload]已启用!'''\n此选项会导致错误并不可预测地破坏数据,请将其禁用,否则您将不能安装或使用MediaWiki。",
"config-extensions": "扩展程序",
"config-extensions-help": "已在您的<code>./extensions</code>目录中发现下列扩展。\n\n您可能要对它们进行额外的配置,但您现在可以启用它们。",
"config-skins": "皮肤",
+ "config-skins-help": "在您的<code>./skins</code>目录中检测到上面列出的皮肤。您必须选择至少一个,并选择一个默认值。",
"config-skins-use-as-default": "使用此皮肤作为默认皮肤",
+ "config-skins-missing": "没有找到皮肤;MediaWiki将使用备选皮肤直到您自行安装一个后。",
+ "config-skins-must-enable-some": "您必须选择至少一个皮肤以起用。",
+ "config-skins-must-enable-default": "默认选择的皮肤必须启用。",
"config-install-alreadydone": "'''警告:'''您似乎已经安装了MediaWiki,并试图重新安装它。请前往下一个页面。",
"config-install-begin": "点击“{{int:config-continue}}”后,您将开始安装MediaWiki。如果您还想对配置作一些修改,请点击“{{int:config-back}}”。",
"config-install-step-done": "完成",
"Liuxinyu970226",
"Xiaomingyan",
"Cwlin0416",
- "S8321414"
+ "S8321414",
+ "LNDDYL"
]
},
"config-desc": "MediaWiki 安裝程式",
"config-admin-password-blank": "輸入管理員帳號密碼。",
"config-admin-password-mismatch": "兩次輸入的密碼並不相同。",
"config-admin-email": "電子郵件位址:",
- "config-admin-email-help": "在此輸入的電子郵件信箱可用來接收 Wiki 上其他使用者所發送的訊息、重設您的密碼與通知監視列表中頁面更動。您可將此欄位留空。",
+ "config-admin-email-help": "在此輸入的電子郵件信箱可用來接收 Wiki 上其他使用者所傳送的訊息、重設您的密碼與通知監視清單中頁面更動。您可將此欄位留空。",
"config-admin-error-user": "建立管理員帳號 \"<nowiki>$1</nowiki>\" 時發送內部錯誤。",
"config-admin-error-password": "設定管理員 \"<nowiki>$1</nowiki>\" 的密碼時發送內部錯誤:<pre>$2</pre>",
"config-admin-error-bademail": "您輸入了不正確的電子郵件地址。",
"config-email-user-help": "若使用者在個人偏好開啟了此功能,則可允許使用者間相互發送郵件。",
"config-email-usertalk": "開啟使用者討論頁面通知",
"config-email-usertalk-help": "若使用者在個人偏好開啟了此功能,則可收到使用者討論頁面被修改的通知。",
- "config-email-watchlist": "開啟監視列表通知",
+ "config-email-watchlist": "開啟監視清單通知",
"config-email-watchlist-help": "若使用者在個人偏好開啟了此功能,允許使用者收到與其監視列表有關的通知。",
"config-email-auth": "開啟電子郵件身份認證",
"config-email-auth-help": "若開啟此選項,使用者不論設定或者更改電子郵件地址,都必須透過收信的方式確認沒有問題。\n只有驗證過的電子郵件地址可以收到來自其他使用者或修改通知的信件。\n公開的 Wiki 會 <strong>建議</strong> 設定此選項,以防使用者濫用電子郵件功能。",
*/
protected $mWikiID;
- /** @var bool whether the wiki is in this project */
+ /** @var bool Whether the wiki is in this project */
protected $mLocal;
/** @var bool Whether interwiki transclusions are allowed */
* @note More logic is explained in DefaultSettings.
*
* @param string $prefix Interwiki prefix
- * @return Interwiki object
+ * @return Interwiki
*/
protected static function getInterwikiCached( $prefix ) {
$value = self::getInterwikiCacheEntry( $prefix );
/**
* Insert a single job into the queue.
- * @return bool true on success
+ * @return bool True on success
* @deprecated since 1.21
*/
public function insert() {
--- /dev/null
+<?php
+/**
+ * Job queue runner utility methods
+ *
+ * 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
+ * @ingroup JobQueue
+ */
+
+/**
+ * Job queue runner utility methods
+ *
+ * @ingroup JobQueue
+ * @since 1.24
+ */
+class JobRunner {
+ /** @var callable|null Debug output handler */
+ protected $debug;
+
+ /**
+ * @param callable $debug Optional debug output handler
+ */
+ public function setDebugHandler( $debug ) {
+ $this->debug = $debug;
+ }
+
+ /**
+ * Run jobs of the specified number/type for the specified time
+ *
+ * The response map has a 'job' field that lists status of each job, including:
+ * - type : the job type
+ * - status : ok/failed
+ * - error : any error message string
+ * - time : the job run time in ms
+ * The response map also has:
+ * - backoffs : the (job type => seconds) map of backoff times
+ * - elapsed : the total time spent running tasks in ms
+ * - reached : the reason the script finished, one of (none-ready, job-limit, time-limit)
+ *
+ * @param array $options
+ * @return array Summary response that can easily be JSON serialized
+ */
+ public function run( array $options ) {
+ $response = array( 'jobs' => array(), 'reached' => 'none-ready' );
+
+ $type = isset( $options['type'] ) ? $options['type'] : false;
+ $maxJobs = isset( $options['maxJobs'] ) ? $options['maxJobs'] : false;
+ $maxTime = isset( $options['maxTime'] ) ? $options['maxTime'] : false;
+ $noThrottle = isset( $options['throttle'] ) && !$options['throttle'];
+
+ $group = JobQueueGroup::singleton();
+ // Handle any required periodic queue maintenance
+ $count = $group->executeReadyPeriodicTasks();
+ if ( $count > 0 ) {
+ $this->runJobsLog( "Executed $count periodic queue task(s)." );
+ }
+
+ // Flush any pending DB writes for sanity
+ wfGetLBFactory()->commitMasterChanges();
+
+ $backoffs = $this->loadBackoffs(); // map of (type => UNIX expiry)
+ $startingBackoffs = $backoffs; // avoid unnecessary writes
+ $backoffExpireFunc = function ( $t ) {
+ return $t > time();
+ };
+
+ $jobsRun = 0; // counter
+ $timeMsTotal = 0;
+ $flags = JobQueueGroup::USE_CACHE;
+ $startTime = microtime( true ); // time since jobs started running
+ $lastTime = microtime( true ); // time since last slave check
+ do {
+ $backoffs = array_filter( $backoffs, $backoffExpireFunc );
+ $blacklist = $noThrottle ? array() : array_keys( $backoffs );
+ if ( $type === false ) {
+ $job = $group->pop( JobQueueGroup::TYPE_DEFAULT, $flags, $blacklist );
+ } elseif ( in_array( $type, $blacklist ) ) {
+ $job = false; // requested queue in backoff state
+ } else {
+ $job = $group->pop( $type ); // job from a single queue
+ }
+ if ( $job ) { // found a job
+ $jType = $job->getType();
+
+ $this->runJobsLog( $job->toString() . " STARTING" );
+
+ // Run the job...
+ wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
+ $t = microtime( true );
+ try {
+ ++$jobsRun;
+ $status = $job->run();
+ $error = $job->getLastError();
+ wfGetLBFactory()->commitMasterChanges();
+ } catch ( MWException $e ) {
+ MWExceptionHandler::rollbackMasterChangesAndLog( $e );
+ $status = false;
+ $error = get_class( $e ) . ': ' . $e->getMessage();
+ $e->report(); // write error to STDERR and the log
+ }
+ $timeMs = intval( ( microtime( true ) - $t ) * 1000 );
+ wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
+ $timeMsTotal += $timeMs;
+
+ // Mark the job as done on success or when the job cannot be retried
+ if ( $status !== false || !$job->allowRetries() ) {
+ $group->ack( $job ); // done
+ }
+
+ if ( $status === false ) {
+ $this->runJobsLog( $job->toString() . " t=$timeMs error={$error}" );
+ } else {
+ $this->runJobsLog( $job->toString() . " t=$timeMs good" );
+ }
+
+ $response['jobs'][] = array(
+ 'type' => $jType,
+ 'status' => ( $status === false ) ? 'failed' : 'ok',
+ 'error' => $error,
+ 'time' => $timeMs
+ );
+
+ // Back off of certain jobs for a while (for throttling and for errors)
+ $ttw = $this->getBackoffTimeToWait( $job );
+ if ( $status === false && mt_rand( 0, 49 ) == 0 ) {
+ $ttw = max( $ttw, 30 );
+ }
+ if ( $ttw > 0 ) {
+ $backoffs[$jType] = isset( $backoffs[$jType] ) ? $backoffs[$jType] : 0;
+ $backoffs[$jType] = max( $backoffs[$jType], time() + $ttw );
+ }
+
+ // Break out if we hit the job count or wall time limits...
+ if ( $maxJobs && $jobsRun >= $maxJobs ) {
+ $response['reached'] = 'job-limit';
+ break;
+ } elseif ( $maxTime && ( microtime( true ) - $startTime ) > $maxTime ) {
+ $response['reached'] = 'time-limit';
+ break;
+ }
+
+ // Don't let any of the main DB slaves get backed up
+ $timePassed = microtime( true ) - $lastTime;
+ if ( $timePassed >= 5 || $timePassed < 0 ) {
+ wfWaitForSlaves( $lastTime );
+ $lastTime = microtime( true );
+ }
+ // Don't let any queue slaves/backups fall behind
+ if ( $jobsRun > 0 && ( $jobsRun % 100 ) == 0 ) {
+ $group->waitForBackups();
+ }
+
+ // Bail if near-OOM instead of in a job
+ $this->assertMemoryOK();
+ }
+ } while ( $job ); // stop when there are no jobs
+
+ // Sync the persistent backoffs for the next runJobs.php pass
+ $backoffs = array_filter( $backoffs, $backoffExpireFunc );
+ if ( $backoffs !== $startingBackoffs ) {
+ $this->syncBackoffs( $backoffs );
+ }
+
+ $response['backoffs'] = $backoffs;
+ $response['elapsed'] = $timeMsTotal;
+
+ return $response;
+ }
+
+ /**
+ * @param Job $job
+ * @return int Seconds for this runner to avoid doing more jobs of this type
+ * @see $wgJobBackoffThrottling
+ */
+ private function getBackoffTimeToWait( Job $job ) {
+ global $wgJobBackoffThrottling;
+
+ if ( !isset( $wgJobBackoffThrottling[$job->getType()] ) ||
+ $job instanceof DuplicateJob // no work was done
+ ) {
+ return 0; // not throttled
+ }
+
+ $itemsPerSecond = $wgJobBackoffThrottling[$job->getType()];
+ if ( $itemsPerSecond <= 0 ) {
+ return 0; // not throttled
+ }
+
+ $seconds = 0;
+ if ( $job->workItemCount() > 0 ) {
+ $exactSeconds = $job->workItemCount() / $itemsPerSecond;
+ // use randomized rounding
+ $seconds = floor( $exactSeconds );
+ $remainder = $exactSeconds - $seconds;
+ $seconds += ( mt_rand() / mt_getrandmax() < $remainder ) ? 1 : 0;
+ }
+
+ return (int)$seconds;
+ }
+
+ /**
+ * Get the previous backoff expiries from persistent storage
+ *
+ * @return array Map of (job type => backoff expiry timestamp)
+ */
+ private function loadBackoffs() {
+ $section = new ProfileSection( __METHOD__ );
+
+ $backoffs = array();
+ $file = wfTempDir() . '/mw-runJobs-backoffs.json';
+ if ( is_file( $file ) ) {
+ $handle = fopen( $file, 'rb' );
+ flock( $handle, LOCK_SH );
+ $content = stream_get_contents( $handle );
+ flock( $handle, LOCK_UN );
+ fclose( $handle );
+ $backoffs = json_decode( $content, true ) ? : array();
+ }
+
+ return $backoffs;
+ }
+
+ /**
+ * Merge the current backoff expiries from persistent storage
+ *
+ * @param array $backoffs Map of (job type => backoff expiry timestamp)
+ */
+ private function syncBackoffs( array $backoffs ) {
+ $section = new ProfileSection( __METHOD__ );
+
+ $file = wfTempDir() . '/mw-runJobs-backoffs.json';
+ $handle = fopen( $file, 'wb+' );
+ flock( $handle, LOCK_EX );
+ $content = stream_get_contents( $handle );
+ $cBackoffs = json_decode( $content, true ) ? : array();
+ foreach ( $backoffs as $type => $timestamp ) {
+ $cBackoffs[$type] = isset( $cBackoffs[$type] ) ? $cBackoffs[$type] : 0;
+ $cBackoffs[$type] = max( $cBackoffs[$type], $backoffs[$type] );
+ }
+ ftruncate( $handle, 0 );
+ fwrite( $handle, json_encode( $backoffs ) );
+ flock( $handle, LOCK_UN );
+ fclose( $handle );
+ }
+
+ /**
+ * Make sure that this script is not too close to the memory usage limit.
+ * It is better to die in between jobs than OOM right in the middle of one.
+ * @throws MWException
+ */
+ private function assertMemoryOK() {
+ static $maxBytes = null;
+ if ( $maxBytes === null ) {
+ $m = array();
+ if ( preg_match( '!^(\d+)(k|m|g|)$!i', ini_get( 'memory_limit' ), $m ) ) {
+ list( , $num, $unit ) = $m;
+ $conv = array( 'g' => 1073741824, 'm' => 1048576, 'k' => 1024, '' => 1 );
+ $maxBytes = $num * $conv[strtolower( $unit )];
+ } else {
+ $maxBytes = 0;
+ }
+ }
+ $usedBytes = memory_get_usage();
+ if ( $maxBytes && $usedBytes >= 0.95 * $maxBytes ) {
+ throw new MWException( "Detected excessive memory usage ($usedBytes/$maxBytes)." );
+ }
+ }
+
+ /**
+ * Log the job message
+ * @param string $msg The message to log
+ */
+ private function runJobsLog( $msg ) {
+ if ( $this->debug ) {
+ call_user_func_array( $this->debug, array( wfTimestamp( TS_DB ) . " $msg\n" ) );
+ }
+ wfDebugLog( 'runJobs', $msg );
+ }
+}
* Callers should use DuplicateJob::newFromJob() instead
*
* @param Title $title
- * @param array $params job parameters
+ * @param array $params Job parameters
*/
function __construct( $title, $params ) {
parent::__construct( 'duplicate', $title, $params );
class NullJob extends Job {
/**
* @param Title $title
- * @param array $params job parameters (lives, usleep)
+ * @param array $params Job parameters (lives, usleep)
*/
function __construct( $title, $params ) {
parent::__construct( 'null', $title, $params );
* Store a result in the session data. Note that the caller is responsible
* for appropriate session_start and session_write_close calls.
*
- * @param string $result the result (Success|Warning|Failure)
- * @param string $dataKey the key of the extra data
+ * @param string $result The result (Success|Warning|Failure)
+ * @param string $dataKey The key of the extra data
* @param mixed $dataValue The extra data itself
*/
protected function storeResultInSession( $result, $dataKey, $dataValue ) {
* Set the visibility restrictions for displaying content.
* If set to public, and an item is deleted, then it will be replaced
* with a placeholder even if the context user is allowed to view it.
- * @param int $audience self::FOR_THIS_USER or self::FOR_PUBLIC
+ * @param int $audience Const self::FOR_THIS_USER or self::FOR_PUBLIC
*/
public function setAudience( $audience ) {
$this->audience = ( $audience == self::FOR_THIS_USER )
* Even uglier hack to maintain backwards compatibilty with IRC bots
* (bug 34508).
* @see getActionText()
- * @return string text
+ * @return string Text
*/
public function getIRCActionComment() {
$actionComment = $this->getIRCActionText();
* Even uglier hack to maintain backwards compatibilty with IRC bots
* (bug 34508).
* @see getActionText()
- * @return string text
+ * @return string Text
*/
public function getIRCActionText() {
$this->plaintext = true;
* * number: Format value as number
* @param string $value The parameter value that should
* be formated
- * @return string|Message::numParam|Message::rawParam
- * Formated value
+ * @return string|array Formated value
* @since 1.21
*/
protected function formatParameterValue( $type, $value ) {
}
/**
- * @return array of titles that should be preloaded with LinkBatch.
+ * @return array Array of titles that should be preloaded with LinkBatch
*/
public function getPreloadTitles() {
return array();
}
/**
- * @return int log_id of the inserted log entry
+ * @return int The log_id of the inserted log entry
*/
protected function saveContent() {
global $wgLogRestrictions;
/**
* Get the list of valid log types
*
- * @return array of strings
+ * @return array Array of strings
*/
public static function validTypes() {
global $wgLogTypes;
* Get the log header for the given log type
*
* @todo handle missing log types
- * @param string $type logtype
+ * @param string $type Logtype
* @return string Header text of this logtype
* @deprecated since 1.19, warnings in 1.21. Use getDescription()
*/
* Generate text for a log entry.
* Only LogFormatter should call this function.
*
- * @param string $type log type
- * @param string $action log action
+ * @param string $type Log type
+ * @param string $action Log action
* @param Title|null $title Title object or null
* @param Skin|null $skin Skin object or null. If null, we want to use the wiki
* content language, since that will go to the IRC feed.
- * @param array $params parameters
+ * @param array $params Parameters
* @param bool $filterWikilinks Whether to filter wiki links
* @return string HTML
*/
/**
* Add a log entry
*
- * @param string $action one of '', 'block', 'protect', 'rights', 'delete',
+ * @param string $action One of '', 'block', 'protect', 'rights', 'delete',
* 'upload', 'move', 'move_redir'
* @param Title $target Title object
- * @param string $comment description associated
- * @param array $params parameters passed later to wfMessage function
+ * @param string $comment Description associated
+ * @param array $params Parameters passed later to wfMessage function
* @param null|int|User $doer The user doing the action. null for $wgUser
*
- * @return int log_id of the inserted log entry
+ * @return int The log_id of the inserted log entry
*/
public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
global $wgContLang;
/** Add misc metadata. Warning: atm if the metadata category
* doesn't have a priority, it will be silently discarded.
*
- * @param array $metaArray array of metadata values
+ * @param array $meta Array of metadata values
* @param string $type Type. defaults to other. if two things have the same type they're merged
*/
function addMetadata( $metaArray, $type = 'other' ) {
/** Main entry point for jpeg's.
*
- * @param string $filename filename (with full path)
+ * @param string $filename Filename (with full path)
* @return array Metadata result array.
- * @throws MWException on invalid file.
+ * @throws MWException On invalid file.
*/
static function Jpeg( $filename ) {
$showXMP = function_exists( 'xml_parser_create_ns' );
* They don't really have native metadata, so just merges together
* XMP and image comment.
*
- * @param string $filename full path to file
+ * @param string $filename Full path to file
* @return array Metadata array
*/
public static function GIF( $filename ) {
// something that explicitly initializes local variables.
extract( unpack( 'a4magic/a4chunk/NchunkLength', $header ) );
/** @var string $chunk
- * @var string $chunkLength */
+ * @var string $chunkLength */
echo "$chunk $chunkLength\n";
$this->dumpForm( $file, $chunkLength, 1 );
fclose( $file );
// something that explicitly initializes local variables.
extract( unpack( 'a4chunk/NchunkLength', $chunkHeader ) );
/** @var string $chunk
- * @var string $chunkLength */
+ * @var string $chunkLength */
echo str_repeat( ' ', $indent * 4 ) . "$chunk $chunkLength\n";
if ( $chunk == 'FORM' ) {
extract( unpack( 'a4magic/a4form/NformLength/a4subtype', $header ) );
/** @var string $magic
- * @var string $subtype
- * @var string $formLength
- * @var string $formType */
+ * @var string $subtype
+ * @var string $formLength
+ * @var string $formType */
if ( $magic != 'AT&T' ) {
wfDebug( __METHOD__ . ": not a DjVu file\n" );
} elseif ( $subtype == 'DJVU' ) {
extract( unpack( 'a4chunk/Nlength', $header ) );
/** @var string $chunk
- * @var string $length */
+ * @var string $length */
return array( $chunk, $length );
}
}
# Newer files have rotation info in byte 10, but we don't use it yet.
/** @var string $width
- * @var string $height
- * @var string $major
- * @var string $minor
- * @var string $resolution
- * @var string $length
- * @var string $gamma */
+ * @var string $height
+ * @var string $major
+ * @var string $minor
+ * @var string $resolution
+ * @var string $length
+ * @var string $gamma */
return array(
'width' => $width,
'height' => $height,
* Do userComment tags and similar. See pg. 34 of exif standard.
* basically first 8 bytes is charset, rest is value.
* This has not been tested on any shift-JIS strings.
- * @param string $prop prop name.
+ * @param string $prop Prop name
*/
private function charCodeString( $prop ) {
if ( isset( $this->mFilteredExifData[$prop] ) ) {
/**
* Validates if a tag has a legal value according to the Exif spec
*
- * @param string $section section where tag is located.
- * @param string $tag the tag to check.
+ * @param string $section Section where tag is located.
+ * @param string $tag The tag to check.
* @param mixed $val The value of the tag.
* @param bool $recursive True if called recursively for array types.
* @return bool
/**
* Convenience function for debugging output
*
- * @param string $fname the name of the function calling this function
+ * @param string $fname The name of the function calling this function
* @param bool $io Specify whether we're beginning or ending
*/
private function debugFile( $fname, $io ) {
*
* This is the usual entry point for this class.
*
- * @param array $tags the Exif data to format ( as returned by
+ * @param array $tags The Exif data to format ( as returned by
* Exif::getFilteredData() or BitmapMetadataHandler )
* @param bool|IContextSource $context Context to use (optional)
* @return array
* value which most of the time are plain integers. This function
* formats Exif (and other metadata) values into human readable form.
*
- * @param array $tags the Exif data to format ( as returned by
+ * @param array $tags The Exif data to format ( as returned by
* Exif::getFilteredData() or BitmapMetadataHandler )
* @return array
* @since 1.23
/**
* Flatten an array, using the user language for any messages.
*
- * @param array $vals array of values
+ * @param array $vals Array of values
* @param string $type Type of array (either lang, ul, ol).
* lang = language assoc array with keys being the lang code
* ul = unordered list, ol = ordered list
*
* This is public on the basis it might be useful outside of this class.
*
- * @param array $vals array of values
+ * @param array $vals Array of values
* @param string $type Type of array (either lang, ul, ol).
* lang = language assoc array with keys being the lang code
* ul = unordered list, ol = ordered list
*
* @param File $file File to use
* @param array $extendedMetadata
- * @param int $maxCacheTime hook handlers might use this parameter to override cache time
+ * @param int $maxCacheTime Hook handlers might use this parameter to override cache time
*
* @return array [<property name> => ['value' => <value>]], or [] on error
* @since 1.23
* If the value is not a multilang array, it is returned unchanged.
* See mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
* @param mixed $value
- * @return mixed value in best language, null if there were no languages at all
+ * @return mixed Value in best language, null if there were no languages at all
* @since 1.23
*/
protected function resolveMultilangValue( $value ) {
*
* @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
*
- * @param string $rawData app13 block from jpeg containing iptc/iim data
+ * @param string $rawData The app13 block from jpeg containing iptc/iim data
* @return array IPTC metadata array
*/
static function parse( $rawData ) {
/**
* take the value of 1:90 tag and returns a charset
* @param string $tag 1:90 tag.
- * @return string charset name or "?"
+ * @return string Charset name or "?"
* Warning, this function does not (and is not intended to) detect
* all iso 2022 escape codes. In practise, the code for utf-8 is the
* only code that seems to have wide use. It does detect that code.
}
/** Validate and normalize quality value to be between 1 and 100 (inclusive).
- * @param int $value quality value, will be converted to integer or 0 if invalid
- * @return bool true if the value is valid
+ * @param int $value Quality value, will be converted to integer or 0 if invalid
+ * @return bool True if the value is valid
*/
private static function validateQuality( $value ) {
return $value === 'low';
* but gis doesn't support having multiple app1 segments
* and those can't extract xmp on files containing both exif and xmp data
*
- * @param string $filename name of jpeg file
- * @return array of interesting segments.
- * @throws MWException if given invalid file.
+ * @param string $filename Name of jpeg file
+ * @return array Array of interesting segments.
+ * @throws MWException If given invalid file.
*/
static function segmentSplitter( $filename ) {
$showXMP = function_exists( 'xml_parser_create_ns' );
*
* This should generally be called by BitmapMetadataHandler::doApp13()
*
- * @param string $app13 photoshop psir app13 block from jpg.
+ * @param string $app13 Photoshop psir app13 block from jpg.
* @throws MWException (It gets caught next level up though)
* @return string If the iptc hash is good or not. One of 'iptc-no-hash',
* 'iptc-good-hash', 'iptc-bad-hash'.
* first page.
*
* @param File $image The image object, or false if there isn't one
- * @param string $path the filename
+ * @param string $path The filename
* @return array Follow the format of PHP getimagesize() internal function.
* See http://www.php.net/getimagesize. MediaWiki will only ever use the
* first two array keys (the width and height), and the 'bits' associative
* @param string $ext Extension of original file
* @param string $mime MIME type of original file
* @param array $params Handler specific rendering parameters
- * @return array thumbnail extension and MIME type
+ * @return array Thumbnail extension and MIME type
*/
function getThumbType( $ext, $mime, $params = null ) {
$magic = MimeMagic::singleton();
* relevant errors.
*
* @param string $fileName The local path to the file.
- * @return Status object
+ * @return Status
*/
function verifyUpload( $fileName ) {
return Status::newGood();
/**
* Returns whether or not this handler supports the chained generation of thumbnails according
* to buckets
- * @return boolean
- * @since 1.24
+ * @return bool
+ * @since 1.24
*/
public function supportsBucketing() {
return false;
*/
public $responsiveUrls = array();
- /** @var File object */
+ /** @var File */
protected $file;
/** @var int Image width */
}
/**
- * @return File file
+ * @return File
*/
public function getFile() {
return $this->file;
/**
* We do not support making APNG thumbnails, so always false
* @param File $image
- * @return bool false
+ * @return bool False
*/
function canAnimateThumbnail( $image ) {
return false;
*
* @param resource $fh The file handle
* @param int $size Size in bytes.
- * @throws Exception if too big.
+ * @throws Exception If too big
* @return string The chunk.
*/
private static function read( $fh, $size ) {
}
/**
- * @param array $params name=>value pairs of parameters
+ * @param array $params Name=>value pairs of parameters
* @return string Filename to use
*/
function makeParamString( $params ) {
* @author Hashar
*
* @param string $filename Full path to a XCF file
- * @return bool|array metadata array just like PHP getimagesize()
+ * @return bool|array Metadata Array just like PHP getimagesize()
*/
static function getXCFMetaData( $filename ) {
# Decode master structure
*
* @param XMLParser $parser XMLParser reference to the xml parser
* @param string $data Character data
- * @throws MWException on invalid data
+ * @throws MWException On invalid data
*/
function char( $parser, $data ) {
* this should always be <rdf:Bag>
*
* @param string $elm Namespace . ' ' . tag
- * @throws MWException if we have an element that's not <rdf:Bag>
+ * @throws MWException If we have an element that's not <rdf:Bag>
*/
private function startElementModeBag( $elm ) {
if ( $elm === self::NS_RDF . ' Bag' ) {
* this should always be <rdf:Seq>
*
* @param string $elm Namespace . ' ' . tag
- * @throws MWException if we have an element that's not <rdf:Seq>
+ * @throws MWException If we have an element that's not <rdf:Seq>
*/
private function startElementModeSeq( $elm ) {
if ( $elm === self::NS_RDF . ' Seq' ) {
* we don't care about.
*
* @param string $elm Namespace . ' ' . tag
- * @throws MWException if we have an element that's not <rdf:Alt>
+ * @throws MWException If we have an element that's not <rdf:Alt>
*/
private function startElementModeLang( $elm ) {
if ( $elm === self::NS_RDF . ' Alt' ) {
*
* @param string $elm Namespace . ' ' . tagname
* @param array $attribs Attributes. (needed for BAGSTRUCTS)
- * @throws MWException if gets a tag other than <rdf:li>
+ * @throws MWException If gets a tag other than <rdf:li>
*/
private function startElementModeLi( $elm, $attribs ) {
if ( ( $elm ) !== self::NS_RDF . ' li' ) {
* Batch insertion
* @param array $data $key => $value assoc array
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
- * @return bool success
+ * @return bool Success
* @since 1.24
*/
public function setMulti( array $data, $exptime = 0 ) {
* This will create the key with value $init and TTL $ttl if not present
*
* @param string $key
- * @param integer $ttl
- * @param integer $value
- * @param integer $init
+ * @param int $ttl
+ * @param int $value
+ * @param int $init
* @return bool
* @since 1.24
*/
// We do not want to flush the TRX as that can break callers.
$db->trxLevel() ? array( 'LOCK IN SHARE MODE' ) : array()
);
+ if ( $res === false ) {
+ continue;
+ }
foreach ( $res as $row ) {
$row->serverIndex = $serverIndex;
$row->tableName = $tableName;
$conds,
__METHOD__,
array( 'LIMIT' => 100, 'ORDER BY' => 'exptime' ) );
- if ( !$rows->numRows() ) {
+ if ( $rows === false || !$rows->numRows() ) {
break;
}
$keys = array();
* Store a value in the WinCache object cache
*
* @param string $key Cache key
- * @param mixed $valueObject to store
+ * @param mixed $valueObject Value to store
* @param int $expire Expiration time
* @return bool
*/
$this->mParserOutput = $poolArticleView->getParserOutput();
$outputPage->addParserOutput( $this->mParserOutput );
if ( $content->getRedirectTarget() ) {
- $outputPage->addSubtitle( wfMessage( 'redirectpagesub' )->parse() );
+ $outputPage->addSubtitle(
+ "<span id=\"redirectsub\">" . wfMessage( 'redirectpagesub' )->parse() . "</span>"
+ );
}
# Don't cache a dirty ParserOutput object
* If the revision requested for view is deleted, check permissions.
* Send either an error message or a warning header to the output.
*
- * @return bool true if the view is allowed, false if not.
+ * @return bool True if the view is allowed, false if not.
*/
public function showDeletedRevisionHeader() {
if ( !$this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
* output to the client that is necessary for this request.
* (that is, it has sent a cached version of the page)
*
- * @return bool true if cached version send, false otherwise
+ * @return bool True if cached version send, false otherwise
*/
protected function tryFileCache() {
static $called = false;
* Override the ParserOptions used to render the primary article wikitext.
*
* @param ParserOptions $options
- * @throws MWException if the parser options where already initialized.
+ * @throws MWException If the parser options where already initialized.
*/
public function setParserOptions( ParserOptions $options ) {
if ( $this->mParserOptions ) {
* of the dimensions are bigger than the max, or if the
* image is vectorized.
*
- * @param $maxWidth integer Max width to display at
- * @param $maxHeight integer Max height to display at
- * @param $width integer Actual width of the image
- * @param $height integer Actual height of the image
+ * @param int $maxWidth Max width to display at
+ * @param int $maxHeight Max height to display at
+ * @param int $width Actual width of the image
+ * @param int $height Actual height of the image
* @throws MWException
- * @return Array (width, height)
+ * @return array Array (width, height)
*/
protected function getDisplayWidthHeight( $maxWidth, $maxHeight, $width, $height ) {
if ( !$maxWidth || !$maxHeight ) {
* Get alternative thumbnail sizes.
*
* @note This will only list several alternatives if thumbnails are rendered on 404
- * @param $origWidth Actual width of image
- * @param $origHeight Actual height of image
- * @return Array An array of [width, height] pairs.
+ * @param int $origWidth Actual width of image
+ * @param int $origHeight Actual height of image
+ * @return array An array of [width, height] pairs.
*/
protected function getThumbSizes( $origWidth, $origHeight ) {
global $wgImageLimits;
/**
* Loads page_touched and returns a value indicating if it should be used
- * @return bool true if not a redirect
+ * @return bool True if not a redirect
*/
public function checkTouched() {
if ( !$this->mDataLoaded ) {
/**
* Get the page_latest field
- * @return int rev_id of current revision
+ * @return int The rev_id of current revision
*/
public function getLatest() {
if ( !$this->mDataLoaded ) {
/**
* Get the content of the current revision. No side-effects...
*
- * @param int $audience int One of:
+ * @param int $audience One of:
* Revision::FOR_PUBLIC to be displayed to all users
* Revision::FOR_THIS_USER to be displayed to $wgUser
* Revision::RAW get the text regardless of permissions
* Revision::RAW get the text regardless of permissions
* @param User $user User object to check for, only if FOR_THIS_USER is passed
* to the $audience parameter
- * @return int user ID for the user that made the last article revision
+ * @return int User ID for the user that made the last article revision
*/
public function getUser( $audience = Revision::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
* Revision::RAW get the text regardless of permissions
* @param User $user User object to check for, only if FOR_THIS_USER is passed
* to the $audience parameter
- * @return string username of the user that made the last article revision
+ * @return string Username of the user that made the last article revision
*/
public function getUserText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
$this->loadLastEdit();
/**
* Get the Title object or URL this page redirects to
*
- * @return bool|Title|string false, Title of in-wiki target, or string with URL
+ * @return bool|Title|string False, Title of in-wiki target, or string with URL
*/
public function followRedirect() {
return $this->getRedirectURL( $this->getRedirectTarget() );
* objects for same-wiki, non-special redirects and URLs for everything
* else.
* @param Title $rt Redirect target
- * @return bool|Title|string false, Title object of local target, or string with URL
+ * @return bool|Title|string False, Title object of local target, or string with URL
*/
public function getRedirectURL( $rt ) {
if ( !$rt ) {
* Giving 0 indicates the new page flag should be set on.
* @param bool $lastRevIsRedirect If given, will optimize adding and
* removing rows in redirect table.
- * @return bool true on success, false on failure
+ * @return bool True on success, false on failure
*/
public function updateRevisionOn( $dbw, $revision, $lastRevision = null,
$lastRevIsRedirect = null
* or NULL if this is not a redirect
* @param null|bool $lastRevIsRedirect If given, will optimize adding and
* removing rows in redirect table.
- * @return bool true on success, false on failure
+ * @return bool True on success, false on failure
* @private
*/
public function updateRedirectOn( $dbw, $redirectTitle, $lastRevIsRedirect = null ) {
* must exist and must not be deleted
* @param Revision $undo
* @param Revision $undoafter Must be an earlier revision than $undo
- * @return mixed string on success, false on failure
+ * @return mixed String on success, false on failure
* @since 1.21
* Before we had the Content object, this was done in getUndoText
*/
* must exist and must not be deleted
* @param Revision $undo
* @param Revision $undoafter Must be an earlier revision than $undo
- * @return string|bool string on success, false on failure
+ * @return string|bool String on success, false on failure
* @deprecated since 1.21: use ContentHandler::getUndoContent() instead.
*/
public function getUndoText( Revision $undo, Revision $undoafter = null ) {
* or 'new' for a new section.
* @param Content $sectionContent New content of the section.
* @param string $sectionTitle New section's subject, only if $section is "new".
- * @param string $baseRevId integer|null
+ * @param int|null $baseRevId
*
* @throws MWException
* @return Content New complete article content, or null if error.
* @param User $user The user doing the edit
*
* @throws MWException
- * @return Status object. Possible errors:
+ * @return Status Possible errors:
* edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
* set the fatal flag of $status
* edit-gone-missing: In update mode, but the article didn't exist.
* database.
*
* @throws MWException
- * @return Status object. Possible errors:
+ * @return Status Possible errors:
* edit-hook-aborted: The ArticleSave hook aborted the edit but didn't
* set the fatal flag of $status.
* edit-gone-missing: In update mode, but the article didn't exist.
*
* @param Content $content Content submitted
* @param User $user The relevant user
- * @param string $comment comment submitted
+ * @param string $comment Comment submitted
* @param string $serialisation_format Format for storing the content in the database
* @param bool $minor Whereas it's a minor modification
*/
* @param bool $commit Defaults to true, triggers transaction end
* @param array &$error Array of errors to append to
* @param User $user The deleting user
- * @return bool true if successful
+ * @return bool True if successful
*/
public function doDeleteArticle(
$reason, $suppress = false, $id = 0, $commit = true, &$error = '', User $user = null
/**
* Do some database updates after deletion
*
- * @param int $id page_id value of the page being deleted
+ * @param int $id The page_id value of the page being deleted
* @param Content $content Optional page content to be used when determining
* the required updates. This may be needed because $this->getContent()
* may already return null when the page proper was deleted.
* @param string $token Rollback token.
* @param bool $bot If true, mark all reverted edits as bot.
*
- * @param array $resultDetails contains result-specific array of additional values
+ * @param array $resultDetails Array contains result-specific array of additional values
* 'alreadyrolled' : 'current' (rev)
* success : 'summary' (str), 'current' (rev), 'target' (rev)
*
* @param int &$cascade Set to false if cascading protection isn't allowed.
* @param array $expiry Per restriction type expiration
* @param User $user The user updating the restrictions
- * @return bool true on success
+ * @return bool True on success
*/
public function updateRestrictions(
$limit = array(), $reason = '', &$cascade = 0, $expiry = array(), User $user = null
*
* @param Language|string|null $lang In which language to format the date
* Defaults to the site content language
- * @return DateFormatter object
+ * @return DateFormatter
*/
public static function &getInstance( $lang = null ) {
global $wgMemc, $wgContLang;
/**
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
- * @param $text
+ * @param string $text
* @return array Array of link CSS classes, indexed by PDBK.
*/
function replace( &$text ) {
var $mLangLinkLanguages;
/**
- * @var boolean Recursive call protection.
+ * @var bool Recursive call protection.
* This variable should be treated as if it were private.
*/
public $mInParse = false;
* Convert wikitext to HTML
* Do not call this function recursively.
*
- * @param string $text text we want to parse
+ * @param string $text Text we want to parse
* @param Title $title
* @param ParserOptions $options
* @param bool $linestart
/**
* Get the ParserOptions object
*
- * @return ParserOptions object
+ * @return ParserOptions
*/
function getOptions() {
return $this->mOptions;
*
* @param string $text
*
- * @return string the altered text
+ * @return string The altered text
*/
function doAllQuotes( $text ) {
wfProfileIn( __METHOD__ );
* @todo document
*/
class ParserCache {
- /** @var MWMemcached */
+ /** @var MWMemcached */
private $mMemc;
/**
* Get an instance of this object
*/
/**
- * \brief Set options of the Parser
+ * @brief Set options of the Parser
*
* All member variables are supposed to be private in theory, although in
* practise this is not the case.
/**
* @param Title $title Title object, must be an interwiki link
- * @throws MWException if given invalid input
+ * @throws MWException If given invalid input
*/
function addInterwikiLink( $title ) {
if ( !$title->isExternal() ) {
* -- this is assumed to have been validated
* (check equal normalisation, etc.)
*
- * @param string $text desired title text
+ * @param string $text Desired title text
*/
public function setDisplayTitle( $text ) {
$this->setTitleText( $text );
/**
* @param string $name The property name to look up.
*
- * @return mixed|false The value previously set using setProperty(). False if null or no value
+ * @return mixed|bool The value previously set using setProperty(). False if null or no value
* was set for the given property name.
*
* @note You need to use getProperties() to check for boolean and null properties.
/**
* @throws MWException
- * @param string|PPNode$root
+ * @param string|PPNode $root
* @param int $flags
* @return string
*/
* Lets another one grab the lock, and returns the workers
* waiting on acquireForAnyone()
*
- * @return Status value is one of Released/NotLocked/Error
+ * @return Status Value is one of Released/NotLocked/Error
*/
abstract public function release();
* the same key can acquire a lock.
*
* @param string $key PoolCounter instance key (any string)
- * @param int $slots the number of slots (max allowed value is 65536)
+ * @param int $slots The number of slots (max allowed value is 65536)
* @return int
*/
protected function hashKeyIntoSlots( $key, $slots ) {
/**
* Begin profiling of a function
- * @param string $functionname name of the function we will profile
+ * @param string $functionname Name of the function we will profile
*/
function wfProfileIn( $functionname ) {
if ( Profiler::$__instance === null ) { // use this directly to reduce overhead
/**
* Stop profiling of a function
- * @param string $functionname name of the function we have profiled
+ * @param string $functionname Name of the function we have profiled
*/
function wfProfileOut( $functionname = 'missing' ) {
if ( Profiler::$__instance === null ) { // use this directly to reduce overhead
/**
* Called by wfProfieOut()
*
- * @param string $functionname
+ * @param string $functionname
*/
abstract public function profileOut( $functionname );
/**
* Add an entry in the debug log file
*
- * @param string $s to output
+ * @param string $s String to output
*/
protected function debug( $s ) {
if ( function_exists( 'wfDebug' ) ) {
* Add an entry in the debug log group
*
* @param string $group Group to send the message to
- * @param string $s to output
+ * @param string $s String to output
*/
protected function debugGroup( $group, $s ) {
if ( function_exists( 'wfDebugLog' ) ) {
* @since 1.24
*/
class TransactionProfiler {
- /** @var float seconds */
+ /** @var float Seconds */
protected $mDBLockThreshold = 3.0;
/** @var array DB/server name => (active trx count, time, DBs involved) */
protected $mDBTrxHoldingLocks = array();
* Update an entry with timing data.
*
* @param string $name Section name
- * @param float $elapsedCpu elapsed CPU time
- * @param float $elapsedWall elapsed wall-clock time
+ * @param float $elapsedCpu Elapsed CPU time
+ * @param float $elapsedWall Elapsed wall-clock time
*/
public function updateRunningEntry( $name, $elapsedCpu, $elapsedWall ) {
// If this is the first measurement for this entry, store plain values.
/**
* Recursive function the format the current profiling array into a tree
*
- * @param array $stack profiling array
+ * @param array $stack Profiling array
* @return array
*/
protected function remapCallTree( array $stack ) {
* @see RecentChange::cleanupForIRC
* @param array $feed The feed, as configured in an associative array
* @param string $line The text to send
- * @return bool success
+ * @return bool Success
*/
public function send( array $feed, $line );
}
*/
protected $testModuleNames = array();
- /** @var array e.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) */
+ /** @var array E.g. array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) */
protected $sources = array();
/** @var bool */
*
* @since 1.24
* @param string $source
- * @throws MWException on an invalid $source name
+ * @throws MWException On an invalid $source name
* @return string
*/
public function getLoadScript( $source ) {
* Build a load.php URL
*
* @since 1.24
- * @param string $source name of the ResourceLoader source
+ * @param string $source Name of the ResourceLoader source
* @param ResourceLoaderContext $context
* @param array $extraQuery
* @return string URL to load.php. May be protocol-relative (if $wgLoadScript is procol-relative)
/**
* Get loader script.
*
- * @return string|false JavaScript code to be added to startup module
+ * @return string|bool JavaScript code to be added to startup module
*/
public function getLoaderScript() {
if ( count( $this->loaderScripts ) === 0 ) {
* @param bool $flip
*
* @return string CSS data in script file
- * @throws MWException if the file doesn't exist
+ * @throws MWException If the file doesn't exist
*/
protected function readStyleFile( $path, $flip ) {
$localPath = $this->getLocalPath( $path );
/**
- * @param $context ResourceLoaderContext
+ * @param ResourceLoaderContext $context
* @return array
*/
protected function getData( ResourceLoaderContext $context ) {
}
/**
- * @param $context ResourceLoaderContext
+ * @param ResourceLoaderContext $context
* @return string JavaScript code
*/
public function getScript( ResourceLoaderContext $context ) {
* load the files directly. See also getScriptURLsForDebug()
*
* @param ResourceLoaderContext $context
- * @return array array( mediaType => array( URL1, URL2, ... ), ... )
+ * @return array Array( mediaType => array( URL1, URL2, ... ), ... )
*/
public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
$resourceLoader = $context->getResourceLoader();
return false;
}
- /** @var JSParser lazy-initialized; use self::javaScriptParser() */
+ /** @var JSParser Lazy-initialized; use self::javaScriptParser() */
private static $jsParser;
private static $parseCacheVersion = 1;
* This way we can reasonably reduce the amout of module registration
* data send to the client.
*
- * @param Array &$registryData Modules keyed by name with properties:
+ * @param array &$registryData Modules keyed by name with properties:
* - string 'version'
* - array 'dependencies'
* - string|null 'group'
* Checks for a change in the bitfield for a certain option and updates the
* provided array accordingly.
*
- * @param string $desc description to add to the array if the option was
+ * @param string $desc Description to add to the array if the option was
* enabled / disabled.
* @param int $field The bitmask describing the single option.
* @param int $diff The xor of the old and new bitfields.
/**
* Split text into lines and add it to extracts array
*
- * @param array $extracts index -> $line
+ * @param array $extracts Index -> $line
* @param int $count
* @param string $text
*/
}
/**
- * @return string timestamp
+ * @return string Timestamp
*/
function getTimestamp() {
if ( $this->mRevision ) {
$group = new self();
/**
- * @var \Site $site
+ * @var Site $site
*/
foreach ( $this as $site ) {
if ( $site->getGroup() === $groupName ) {
$opts = $this->getOptions();
if ( $rows === false ) {
if ( !$this->including() ) {
- $this->doHeader( $opts );
+ $this->doHeader( $opts, 0 );
+ $this->getOutput()->setStatusCode( 404 );
}
return;
public function webOutput( $rows, $opts ) {
if ( !$this->including() ) {
$this->outputFeedLinks();
- $this->doHeader( $opts );
+ $this->doHeader( $opts, $rows->numRows() );
}
$this->outputChangesList( $rows, $opts );
* Set the text to be displayed above the changes
*
* @param FormOptions $opts
+ * @param int $numRows Number of rows in the result to show after this header
*/
- public function doHeader( $opts ) {
+ public function doHeader( $opts, $numRows ) {
$this->setTopText( $opts );
// @todo Lots of stuff should be done here.
* @param string $name Name of the special page, as seen in links and URLs
* @param string $restriction User right required, e.g. "block" or "delete"
* @param bool $listed Whether the page is listed in Special:Specialpages
- * @param callable|bool $function unused
- * @param string $file unused
+ * @param callable|bool $function Unused
+ * @param string $file Unused
* @param bool $includable Whether the page can be included in normal pages
*/
public function __construct(
// @todo FIXME: Decide which syntax to use for this, and stick to it
/**
* Whether this special page is listed in Special:SpecialPages
- * @since r3583 (v1.3)
+ * @since 1.3 (r3583)
* @return bool
*/
function isListed() {
* - `prefixSearchSubpages( "" )` should return `array( foo", "bar", "baz" )`
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
/**
* Constructor
*
- * @param string $name name of the special page, as seen in links and URLs (default: 'Allpages')
+ * @param string $name Name of the special page, as seen in links and URLs (default: 'Allpages')
*/
function __construct( $name = 'Allpages' ) {
parent::__construct( $name );
/**
* Entry point : initialise variables and call subfunctions.
*
- * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default null)
+ * @param string $par Becomes "FOO" when called like Special:Allpages/FOO (default null)
*/
function execute( $par ) {
$request = $this->getRequest();
* @ingroup SpecialPage
*/
class SpecialBlock extends FormSpecialPage {
- /** @var User user to be blocked, as passed either by parameter (url?wpTarget=Foo)
+ /** @var User User to be blocked, as passed either by parameter (url?wpTarget=Foo)
* or as subpage (Special:Block/Foo) */
protected $target;
/**
* Determine the target of the block, and the type of target
* @todo Should be in Block.php?
- * @param string $par subpage parameter passed to setup, or data value from
+ * @param string $par Subpage parameter passed to setup, or data value from
* the HTMLForm
* @param WebRequest $request Optionally try and get data from a request too
* @return array( User|string|null, Block::TYPE_ constant|null )
/**
* Set a message at the top of the Change Password form
* @since 1.23
- * @param Message $msg to parse and add to the form header
+ * @param Message $msg Message to parse and add to the form header
*/
public function setChangeMessage( Message $msg ) {
$this->mPreTextMessage = $msg;
}
/**
- * @throws PasswordError when cannot set the new password because requirements not met.
+ * @throws PasswordError When cannot set the new password because requirements not met.
*/
protected function attemptReset( $oldpass, $newpass, $retype ) {
global $wgPasswordAttemptThrottle;
wfEscapeWikiText( $userObj->getName() ),
)
);
+ if ( !$this->including() ) {
+ $this->getOutput()->setStatusCode( 404 );
+ }
}
$user = htmlspecialchars( $userObj->getName() );
} else {
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
* form is open (bug 32126), but we know that invalid items will
* be harmless so we can override it here.
*
- * @param string $value the value the field was submitted with
- * @param array $alldata the data collected from the form
+ * @param string $value The value the field was submitted with
+ * @param array $alldata The data collected from the form
* @return bool|string Bool true on success, or String error to display.
*/
function validate( $value, $alldata ) {
/**
* Validate target User
*
- * @param string $target target user name
+ * @param string $target Target user name
* @return User User object on success or a string on error
*/
public static function getTarget( $target ) {
/** @var bool Whether or not to remove <nowiki> tags in the expanded wikitext */
protected $removeNowiki;
- /** @var maximum size in bytes to include. 50MB allows fixing those huge pages */
+ /** @var int Maximum size in bytes to include. 50MB allows fixing those huge pages */
const MAX_INCLUDE_SIZE = 50000000;
function __construct() {
/**
* Do the actual page exporting
*
- * @param string $page user input on what page(s) to export
+ * @param string $page User input on what page(s) to export
* @param int $history One of the WikiExporter history export constants
* @param bool $list_authors Whether to add distinct author list (when
* not returning full history)
* @param array $inputPages List of titles to look up
* @param array $pageSet Associative array indexed by titles for output
*
- * @return array associative array index by titles
+ * @return array Associative array index by titles
*/
private function getImages( $inputPages, $pageSet ) {
return $this->getLinks(
/**
* Fetch dupes from all connected file repositories.
*
- * @return array of File objects
+ * @return array Array of File objects
*/
function getDupes() {
return RepoGroup::singleton()->findBySha1( $this->hash );
/**
*
- * @param array $dupes of File objects
+ * @param array $dupes Array of File objects
*/
function showList( $dupes ) {
$html = array();
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
/**
* Create a user-readable list of permissions from the given array.
*
- * @param array $permissions of permission => bool (from $wgGroupPermissions items)
- * @param array $revoke of permission => bool (from $wgRevokePermissions items)
- * @param array $add of groups this group is allowed to add or true
- * @param array $remove of groups this group is allowed to remove or true
- * @param array $addSelf of groups this group is allowed to add to self or true
- * @param array $removeSelf of group this group is allowed to remove from self or true
+ * @param array $permissions Array of permission => bool (from $wgGroupPermissions items)
+ * @param array $revoke Array of permission => bool (from $wgRevokePermissions items)
+ * @param array $add Array of groups this group is allowed to add or true
+ * @param array $remove Array of groups this group is allowed to remove or true
+ * @param array $addSelf Array of groups this group is allowed to add to self or true
+ * @param array $removeSelf Array of group this group is allowed to remove from self or true
* @return string List of all granted permissions, separated by comma separator
*/
private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
* The user may have to "undo" the redirect manually to finish the "unmerge".
* Maybe this should delete redirects at the target page of merges?
*
- * @return boolean Success
+ * @return bool Success
*/
function merge() {
# Get the titles directly from the IDs, in case the target page params
/**
* Show the form
*
- * @param array $err error messages. Each item is an error message.
+ * @param array $err Error messages. Each item is an error message.
* It may either be a string message name or array message name and
* parameters, like the second argument to OutputPage::wrapWikiMsg().
*/
* it returns Page/fi if it exists, otherwise Page/de if it exists,
* otherwise Page.
*
- * @param $par
+ * @param string $par
* @return Title|null
*/
public function findTitle( $par ) {
*/
class SpecialPageLanguage extends FormSpecialPage {
/**
- * @var $goToUrl URL to go to if language change successful
+ * @var string URL to go to if language change successful
*/
private $goToUrl;
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
*
* @param Title $category
* @return array The lowest and highest timestamp
- * @throws MWException if category has no entries.
+ * @throws MWException If category has no entries.
*/
protected function getMinAndMaxForCat( Title $category ) {
$dbr = wfGetDB( DB_SLAVE );
$this->msg( 'recentchanges-noresult' )->parse() .
'</div>'
);
+ if ( !$this->including() ) {
+ $this->getOutput()->setStatusCode( 404 );
+ }
} else {
$this->getOutput()->addHTML( $rclistOutput );
}
* Set the text to be displayed above the changes
*
* @param FormOptions $opts
+ * @param int $numRows Number of rows in the result to show after this header
*/
- public function doHeader( $opts ) {
+ public function doHeader( $opts, $numRows ) {
global $wgScript;
$this->setTopText( $opts );
$panel = array();
$panel[] = self::makeLegend( $this->getContext() );
- $panel[] = $this->optionsPanel( $defaults, $nondefaults );
+ $panel[] = $this->optionsPanel( $defaults, $nondefaults, $numRows );
$panel[] = '<hr />';
$extraOpts = $this->getExtraOptions( $opts );
*
* @param array $defaults
* @param array $nondefaults
+ * @param int $numRows Number of rows in the result to show after this header
* @return string
*/
- function optionsPanel( $defaults, $nondefaults ) {
+ function optionsPanel( $defaults, $nondefaults, $numRows ) {
global $wgRCLinkLimits, $wgRCLinkDays;
$options = $nondefaults + $defaults;
$lang = $this->getLanguage();
$user = $this->getUser();
if ( $options['from'] ) {
- $note .= $this->msg( 'rcnotefrom' )->numParams( $options['limit'] )->params(
- $lang->userTimeAndDate( $options['from'], $user ),
- $lang->userDate( $options['from'], $user ),
- $lang->userTime( $options['from'], $user ) )->parse() . '<br />';
+ $note .= $this->msg( 'rcnotefrom' )
+ ->numParams( $options['limit'] )
+ ->params(
+ $lang->userTimeAndDate( $options['from'], $user ),
+ $lang->userDate( $options['from'], $user ),
+ $lang->userTime( $options['from'], $user )
+ )
+ ->numParams( $numRows )
+ ->parse() . '<br />';
}
# Sort data for display and make sure it's unique after we've added user data.
/**
* Handle Special:Redirect/user/xxxx (by redirecting to User:YYYY)
*
- * @return string|null url to redirect to, or null if $mValue is invalid.
+ * @return string|null Url to redirect to, or null if $mValue is invalid.
*/
function dispatchUser() {
if ( !ctype_digit( $this->mValue ) ) {
/**
* Handle Special:Redirect/file/xxxx
*
- * @return string|null url to redirect to, or null if $mValue is not found.
+ * @return string|null Url to redirect to, or null if $mValue is not found.
*/
function dispatchFile() {
$title = Title::makeTitleSafe( NS_FILE, $this->mValue );
* Handle Special:Redirect/revision/xxx
* (by redirecting to index.php?oldid=xxx)
*
- * @return string|null url to redirect to, or null if $mValue is invalid.
+ * @return string|null Url to redirect to, or null if $mValue is invalid.
*/
function dispatchRevision() {
$oldid = $this->mValue;
/**
* Handle Special:Redirect/page/xxx (by redirecting to index.php?curid=xxx)
*
- * @return string|null url to redirect to, or null if $mValue is invalid.
+ * @return string|null Url to redirect to, or null if $mValue is invalid.
*/
function dispatchPage() {
$curid = $this->mValue;
* or do nothing (if $mValue wasn't set) allowing the form to be
* displayed.
*
- * @return bool true if a redirect was successfully handled.
+ * @return bool True if a redirect was successfully handled.
*/
function dispatch() {
// the various namespaces supported by Special:Redirect
if ( !$this->typeName || count( $this->ids ) == 0 ) {
throw new ErrorPageError( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
}
+
+ # Allow the list type to adjust the passed target
+ $this->targetObj = RevisionDeleter::suggestTarget(
+ $this->typeName,
+ $this->targetObj,
+ $this->ids
+ );
+
$this->typeLabels = self::$UILabels[$this->typeName];
$list = $this->getList();
$list->reset();
$pageIsSuppressed = $bitfield & Revision::DELETED_RESTRICTED;
$this->mIsAllowed = $this->mIsAllowed && !( $canViewSuppressedOnly && $pageIsSuppressed );
- # Allow the list type to adjust the passed target
- $this->targetObj = RevisionDeleter::suggestTarget(
- $this->typeName,
- $this->targetObj,
- $this->ids
- );
-
$this->otherReason = $request->getVal( 'wpReason' );
# We need a target page!
if ( is_null( $this->targetObj ) ) {
return;
}
- $optional = array( 'maxjobs' => 0 );
+ $optional = array( 'maxjobs' => 0, 'maxtime' => 30, 'type' => false, 'async' => true );
$required = array_flip( array( 'title', 'tasks', 'signature', 'sigexpiry' ) );
$params = array_intersect_key( $this->getRequest()->getValues(), $required + $optional );
// Apply any default parameter values
$params += $optional;
- // Client will usually disconnect before checking the response,
- // but it needs to know when it is safe to disconnect. Until this
- // reaches ignore_user_abort(), it is not safe as the jobs won't run.
- ignore_user_abort( true ); // jobs may take a bit of time
- header( "HTTP/1.0 202 Accepted" );
- ob_flush();
- flush();
- // Once the client receives this response, it can disconnect
+ if ( $params['async'] ) {
+ // Client will usually disconnect before checking the response,
+ // but it needs to know when it is safe to disconnect. Until this
+ // reaches ignore_user_abort(), it is not safe as the jobs won't run.
+ ignore_user_abort( true ); // jobs may take a bit of time
+ header( "HTTP/1.0 202 Accepted" );
+ ob_flush();
+ flush();
+ // Once the client receives this response, it can disconnect
+ }
// Do all of the specified tasks...
if ( in_array( 'jobs', explode( '|', $params['tasks'] ) ) ) {
- self::executeJobs( (int)$params['maxjobs'] );
+ $runner = new JobRunner();
+ $response = $runner->run( array(
+ 'type' => $params['type'],
+ 'maxJobs' => $params['maxjobs'] ? $params['maxjobs'] : 1,
+ 'maxTime' => $params['maxtime'] ? $params['maxjobs'] : 30
+ ) );
+ if ( !$params['async'] ) {
+ print FormatJson::encode( $response, true );
+ }
}
}
ksort( $query ); // stable order
return hash_hmac( 'sha1', wfArrayToCgi( $query ), $wgSecretKey );
}
-
- /**
- * Run jobs from the job queue
- *
- * @note also called from Wiki.php
- *
- * @param int $maxJobs Maximum number of jobs to run
- * @return void
- */
- public static function executeJobs( $maxJobs ) {
- $n = $maxJobs; // number of jobs to run
- if ( $n < 1 ) {
- return;
- }
- try {
- $group = JobQueueGroup::singleton();
- $count = $group->executeReadyPeriodicTasks();
- if ( $count > 0 ) {
- wfDebugLog( 'jobqueue', "Executed $count periodic queue task(s)." );
- }
-
- do {
- $job = $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE );
- if ( $job ) {
- $output = $job->toString() . "\n";
- $t = -microtime( true );
- wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
- $success = $job->run();
- wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
- $group->ack( $job ); // done
- $t += microtime( true );
- $t = round( $t * 1000 );
- if ( $success === false ) {
- $output .= "Error: " . $job->getLastError() . ", Time: $t ms\n";
- } else {
- $output .= "Success, Time: $t ms\n";
- }
- wfDebugLog( 'jobqueue', $output );
- }
- } while ( --$n && $job );
- } catch ( MWException $e ) {
- MWExceptionHandler::rollbackMasterChangesAndLog( $e );
- // We don't want exceptions thrown during job execution to
- // be reported to the user since the output is already sent.
- // Instead we just log them.
- MWExceptionHandler::logException( $e );
- }
- }
}
* @param Title $title
* @param int $num The number of search results found
* @param null|SearchResultSet $titleMatches Results from title search
- * @param null|SearchResultSet $textMatches Results from text search
+ * @param null|SearchResultSet $textMatches Results from text search
*/
protected function showCreateLink( $title, $num, $titleMatches, $textMatches ) {
// show direct page/create link if applicable
* @param SearchResult $result
* @param string $lastInterwiki
* @param string $query
- * @param array $customCaptions iw prefix -> caption
+ * @param array $customCaptions Interwiki prefix -> caption
*
* @return string
*/
/**
* Empty function; submission is handled elsewhere.
*
- * @return bool false
+ * @return bool False
*/
function trySubmit() {
return false;
/**
* Execute page -- can output a file directly or show a listing of them.
*
- * @param string $subPage subpage, e.g. in
+ * @param string $subPage Subpage, e.g. in
* http://example.com/wiki/Special:UploadStash/foo.jpg, the "foo.jpg" part
* @return bool Success
*/
* If file available in stash, cats it out to the client as a simple HTTP response.
* n.b. Most sanity checking done in UploadStashLocalFile, so this is straightforward.
*
- * @param string $key the key of a particular requested file
+ * @param string $key The key of a particular requested file
* @throws HttpError
* @return bool
*/
* @param array $params Scaling parameters ( e.g. array( width => '50' ) );
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException
- * @return bool success
+ * @return bool Success
*/
private function outputRemoteScaledThumb( $file, $params, $flags ) {
// This global probably looks something like
/**
* Display a "successful action" page.
*
- * @param string $type condition of return to; see `executeReturnTo`
+ * @param string $type Condition of return to; see `executeReturnTo`
* @param string|Message $title Page's title
* @param string $msgname
* @param string $injected_html
/**
* Returns $this->getUser()->changeableGroups()
*
- * @return array array(
+ * @return array Array(
* 'add' => array( addablegroups ),
* 'remove' => array( removablegroups ),
* 'add-self' => array( addablegroups to self ),
}
/**
- * @return string wgVersion + a link to subversion revision of svn BASE
+ * @return string Global wgVersion + a link to subversion revision of svn BASE
*/
private static function getVersionLinkedSvn() {
global $IP;
/**
* @since 1.22 Returns the HEAD date in addition to the sha1 and link
- * @return bool|string wgVersion + HEAD sha1 stripped to the first 7 chars
+ * @return bool|string Global wgVersion + HEAD sha1 stripped to the first 7 chars
* with link and date, or false on failure
*/
private static function getVersionLinkedGit() {
* Return an array of subpages beginning with $search that this special page will accept.
*
* @param string $search Prefix to search for
- * @param integer $limit Maximum number of results to return
+ * @param int $limit Maximum number of results to return
* @return string[] Matching subpages
*/
public function prefixSearchSubpages( $search, $limit = 10 ) {
* Set the text to be displayed above the changes
*
* @param FormOptions $opts
+ * @param int $numRows Number of rows in the result to show after this header
*/
- public function doHeader( $opts ) {
+ public function doHeader( $opts, $numRows ) {
$user = $this->getUser();
$this->getOutput()->addSubtitle(
}
$errMsg = is_int( $namespace ) ? 'nolinkshere-ns' : 'nolinkshere';
$out->addWikiMsg( $errMsg, $this->target->getPrefixedText() );
+ $out->setStatusCode( 404 );
}
}
* HtmlPageLinkRenderer, we will be using them, so it seems prudent to
* already declare the dependency and inject them.
*
- * @param TitleFormatter $formatter formatter for generating the target title string
+ * @param TitleFormatter $formatter Formatter for generating the target title string
* @param string $baseUrl (currently unused, pending refactoring of Linker).
* Defaults to $wgArticlePath.
*/
* Returns the (partial) URL for the given page (including any section identifier).
*
* @param TitleValue $page The link's target
- * @param array $params any additional URL parameters.
+ * @param array $params Any additional URL parameters.
*
* @return string
*/
protected $localInterwikis;
/**
- * @param Language $language the language object to use for localizing namespace names.
- * @param GenderCache $genderCache the gender cache for generating gendered namespace names
+ * @param Language $language The language object to use for localizing namespace names.
+ * @param GenderCache $genderCache The gender cache for generating gendered namespace names
* @param string[]|string $localInterwikis
*/
public function __construct( Language $language, GenderCache $genderCache,
* @param int $namespace
* @param string $text
*
- * @throws InvalidArgumentException if the namespace is invalid
+ * @throws InvalidArgumentException If the namespace is invalid
* @return string
*/
public function getNamespaceName( $namespace, $text ) {
* Underscores will be replaced.
* @param string $fragment The fragment name (may be empty).
*
- * @throws InvalidArgumentException if the namespace is invalid
+ * @throws InvalidArgumentException If the namespace is invalid
* @return string
*/
public function formatTitle( $namespace, $text, $fragment = '' ) {
* @todo expand this to cover the functionality of Linker::linkUrl
*
* @param TitleValue $page The link's target
- * @param array $params any additional URL parameters.
+ * @param array $params Any additional URL parameters.
*
* @return string
*/
*
* @note Only minimal normalization is applied. Consider using TitleValue::getText() directly.
*
- * @param TitleValue $title the title to format
+ * @param TitleValue $title The title to format
*
* @return string
*/
/**
* Returns the title formatted for display, including the namespace name.
*
- * @param TitleValue $title the title to format
+ * @param TitleValue $title The title to format
*
* @return string
*/
/**
* Returns the title formatted for display, with namespace and fragment.
*
- * @param TitleValue $title the title to format
+ * @param TitleValue $title The title to format
*
* @return string
*/
*
* @note this only parses local page links, interwiki-prefixes etc. are not considered!
*
- * @param string $text the text to parse
- * @param int $defaultNamespace namespace to assume per default (usually NS_MAIN)
+ * @param string $text The text to parse
+ * @param int $defaultNamespace Namespace to assume per default (usually NS_MAIN)
*
* @throws MalformedTitleException If the text is not a valid representation of a page title.
* @return TitleValue
/**
* Verify whether the upload is sane.
- * @return mixed self::OK or else an array with error information
+ * @return mixed Const self::OK or else an array with error information
*/
public function verifyUpload() {
wfProfileIn( __METHOD__ );
* isAllowed() should be called as well for generic is-user-blocked or
* can-user-upload checking.
*
- * @param User $user object to verify the permissions against
+ * @param User $user User object to verify the permissions against
* @return mixed An array as returned by getUserPermissionsErrors or true
* in case the user has proper permissions.
*/
/**
* Callback to filter SVG Processing Instructions.
- * @param string $target processing instruction name
- * @param string $data processing instruction attribute and value
+ * @param string $target Processing instruction name
+ * @param string $data Processing instruction attribute and value
* @return bool (true if the filter identified something bad)
*/
public static function checkSvgPICallback( $target, $data ) {
* Calls the parent stashFile and updates the uploadsession table to handle "chunks"
*
* @param User|null $user
- * @return UploadStashFile stashed file
+ * @return UploadStashFile Stashed file
*/
public function stashFile( User $user = null ) {
// Stash file is the called on creating a new chunk session:
/**
* Add a chunk to the temporary directory
*
- * @param string $chunkPath path to temporary chunk file
- * @param int $chunkSize size of the current chunk
- * @param int $offset offset of current chunk ( mutch match database chunk offset )
+ * @param string $chunkPath Path to temporary chunk file
+ * @param int $chunkSize Size of the current chunk
+ * @param int $offset Offset of current chunk ( mutch match database chunk offset )
* @return Status
*/
public function addChunk( $chunkPath, $chunkSize, $offset ) {
/**
* Getter for file metadata.
*
- * @param string $key key under which file information is stored
+ * @param string $key Key under which file information is stored
* @return array
*/
public function getMetadata( $key ) {
/**
* Getter for fileProps
*
- * @param string $key key under which file information is stored
+ * @param string $key Key under which file information is stored
* @return array
*/
public function getFileProps( $key ) {
/**
* Helper function: Initialize the UploadStashFile for a given file.
*
- * @param string $key key under which to store the object
+ * @param string $key Key under which to store the object
* @throws UploadStashZeroLengthFileException
* @return bool
*/
* @since 1.23
*
* @param array $array1 The array to compare from
- * @param array $array2 An array to compare against
- * @param array ... More arrays to compare against
+ * @param array $array2,... More arrays to compare against
* @return array An array containing all the values from array1
* that are not present in any of the other arrays.
*/
"right-deletedhistory": "silinmiş mətnə daxil olmadan silinmiş səhifələrin tarixçələrinə baxma",
"right-browsearchive": "Silinmiş səhifələri axtar",
"right-undelete": "Silinmiş səhifələrin bərpası",
- "right-suppressrevision": "İdarəçilərdən gizlənmiş dəyişikliklərə bax və geri yüklə",
+ "right-suppressrevision": "Səhifələrin gizli versiyalarına bax, gizlə və göstər",
"right-suppressionlog": "Şəxsi qeydlərə bax",
"right-block": "Digər istifadəçilərin redaktə etməsinə qadağa qoy",
"right-blockemail": "İstifadəçinin e-poçt göndərməsinə qadağa qoy",
"revdelete-uname-unhid": "İstifadəçi adı gizli deyil",
"revdelete-restricted": "məhdudiyyətlər idarəçilərə tətbiq olunur",
"revdelete-unrestricted": "idarəçilər üçün götürülmüş məhdudiyyətlər",
+ "logentry-move-move": "$1 $3 səhifəsinin adını $4 olaraq {{GENDER:$1|dəyişdi|dəyişdi}}.",
+ "logentry-move-move_redir": "$1 $3 səhifəsinin adını yönləndirmənin əksinə dəyişərək, $4 {{GENDER:$2|adlandırdı}}",
"logentry-newusers-newusers": "$1istifadəçi hesabını yaratdı",
"logentry-newusers-create": "$1 istifadəçi hesabı yaratdı",
"logentry-newusers-create2": "$1 $3 üçün istifadəçi hesabı yaratdı",
"mostimages": "Массарел дуккха лелайо файлаш",
"mostinterwikis": "Дуккха юкъарвики хьажоргаш тӀе тоьхна йолу агӀонаш",
"mostrevisions": "Сих сиха нисйина йолу агӀонаш",
- "prefixindex": "Ð¥Ñ\8cалÑ\85а агÓ\80онаÑ\88ан Ñ\86Ó\80еÑ\80аÑ\88 Ñ\85Ó\80оÑ\82Ñ\82о йеза",
+ "prefixindex": "Ð¥Ñ\8cалÑ\85а агÓ\80онийн Ñ\86Ó\80еÑ\80аÑ\88 Ñ\85Ó\80оÑ\82Ñ\82о еза",
"prefixindex-namespace": "Хьалха агӀонашан цӀераш хӀотто еза («{{ns:$1}}»)",
"prefixindex-strip": "Хиламийн могӀам чура префикс къайлаяккха",
"shortpages": "Боца яззамаш",
"undelete-error-long": "Файл меттахӀоттош гӀалат даьлла:\n\n$1",
"undelete-show-file-submit": "Хlаъ",
"namespace": "Цlерийн ана:",
- "invert": "Хаьржинарг хилийта",
+ "invert": "Хаьржинарг къайлаяккха",
"tooltip-invert": "ХӀоттае хӀара билгало, хаьржинчу цӀерийн меттиган агӀонашан хийцамаш къайлабаха (кхин дихкина цӀерийн меттигаш, гайтина елахь)",
"namespace_association": "Йихкина меттиг",
"tooltip-namespace_association": "ХӀоттае хӀара билгало, иштта дийцарийн (я кхин) цӀерийн меттиг юкъахь хилийта",
"right-deletedtext": "Gelöschte Texte und Versionsunterschiede zwischen gelöschten Versionen ansehen",
"right-browsearchive": "Nach gelöschten Seiten suchen",
"right-undelete": "Seiten wiederherstellen",
- "right-suppressrevision": "Spezielle Seitenversionen von jedem Benutzer ansehen, verstecken und wiederherstellen",
- "right-viewsuppressed": "Versteckte Versionen von jedem Benutzer ansehen",
+ "right-suppressrevision": "Bestimmte Versionen vor jedem Benutzer verstecken, wiederherstellen und anschauen",
+ "right-viewsuppressed": "Vor jedem Benutzer versteckte Versionen ansehen",
"right-suppressionlog": "Private Logbücher ansehen",
"right-block": "Benutzer sperren (Schreibrecht)",
"right-blockemail": "Benutzer am Versenden von E-Mails hindern",
"recentchanges-legend-bot": "{{int:recentchanges-label-bot}}",
"recentchanges-legend-unpatrolled": "{{int:recentchanges-label-unpatrolled}}",
"recentchanges-legend-plusminus": "(<em>±123</em>)",
- "rcnotefrom": "Below are the changes since <strong>$2</strong> (up to <strong>$1</strong> shown).",
+ "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
"rclistfrom": "Show new changes starting from $2, $3",
"rcshowhideminor": "$1 minor edits",
"rcshowhideminor-show": "Show",
"importlogpage": "Import log",
"importlogpagetext": "Administrative imports of pages with edit history from other wikis.",
"import-logentry-upload": "imported [[$1]] by file upload",
- "import-logentry-upload-detail": "$1 {{PLURAL:$1|revision|revisions}}",
+ "import-logentry-upload-detail": "$1 {{PLURAL:$1|revision|revisions}} imported",
"import-logentry-interwiki": "transwikied $1",
- "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|revision|revisions}} from $2",
+ "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|revision|revisions}} imported from $2",
"javascripttest": "JavaScript testing",
"javascripttest-backlink": "< $1",
"javascripttest-title": "Running $1 tests",
"tooltip-preferences-save": "Salvesta eelistused",
"tooltip-summary": "Kirjuta lühike kokkuvõte",
"common.css": "/* Siin olevat CSS-i kasutavad kõik kujundused. */",
+ "group-autoconfirmed.css": "/* Siin asuv kaskaadilaadistik puudutab ainult automaatselt kinnitatud kasutajaid. */",
+ "group-user.css": "/* Siin asuv kaskaadilaadistik puudutab ainult registreeritud kasutajaid. */",
+ "group-bot.css": "/* Siin asuv kaskaadilaadistik puudutab ainult roboteid. */",
+ "group-sysop.css": "/* Siin asuv kaskaadilaadistik puudutab ainult administraatoreid. */",
+ "group-bureaucrat.css": "/* Siin asuv kaskaadilaadistik puudutab ainult bürokraate. */",
"common.js": "/* Siinne JavaScript laaditakse igale kasutajatele igal laaditud leheküljel. */",
+ "group-autoconfirmed.js": "/* Siin asuv JavaScript laaditakse ainult automaatselt kinnitatud kasutajate jaoks. */",
+ "group-user.js": "/* Siin asuv JavaScript laaditakse ainult registreeritud kasutajate jaoks. */",
+ "group-bot.js": "/* Siin asuv JavaScript laaditakse ainult robotite jaoks. */",
+ "group-sysop.js": "/* Siin asuv JavaScript laaditakse ainult administraatorite jaoks. */",
+ "group-bureaucrat.js": "/* Siin asuv JavaScript laaditakse ainult bürokraatide jaoks. */",
"anonymous": "{{GRAMMAR:genitive|{{SITENAME}}}} {{PLURAL:$1|anonüümne kasutaja|anonüümsed kasutajad}}",
"siteuser": "{{GRAMMAR:genitive|{{SITENAME}}}} kasutaja $1",
"anonuser": "{{GRAMMAR:genitive|{{SITENAME}}}} anonüümne kasutaja $1",
"revdelete-text-text": "Le versioni cancellate appariranno ancora nella cronologia della pagina, ma parte del loro contenuto sarà inaccessibile al pubblico.",
"revdelete-text-file": "Le versioni di file cancellati appariranno ancora nella cronologia del file, ma parti del loro contenuto sarà inaccessibile al pubblico.",
"logdelete-text": "Gli eventi cancellati appariranno ancora nei registri, ma parti del loro contenuto sarà inaccessibile al pubblico.",
- "revdelete-text-others": "Altri amministratori di {{SITENAME}} saranno ancora in grado di accedere ai contenuti nascosti e potranno ripristinarli nuovamente attraverso questa stessa interfaccia, se non sono state impostate restrizioni aggiuntive.",
+ "revdelete-text-others": "Altri amministratori saranno ancora in grado di accedere ai contenuti nascosti e potranno ripristinarli, se non sono state impostate restrizioni aggiuntive.",
"revdelete-confirm": "Per favore conferma che questo è quanto intendi fare, che sei consapevole delle conseguenze, e che stai facendo questo nel rispetto delle [[{{MediaWiki:Policy-url}}|linee guida]].",
"revdelete-suppress-text": "La rimozione dovrebbe essere utilizzata '''unicamente''' nei seguenti casi:\n* informazioni potenzialmente diffamatorie\n* dati personali inopportuni\n*: ''indirizzi, numeri di telefono, codici fiscali, ecc.''",
"revdelete-legend": "Imposta le seguenti limitazioni sulle versioni cancellate:",
"right-deletedtext": "Visualizza testo cancellato e modifiche fra versioni cancellate",
"right-browsearchive": "Ricerca nelle pagine cancellate",
"right-undelete": "Recupera una pagina",
- "right-suppressrevision": "Rivede e recupera versioni nascoste agli amministratori",
+ "right-suppressrevision": "Vede, nasconde e ripristina versioni specifiche delle pagine a qualsiasi utente",
+ "right-viewsuppressed": "Vede versioni nascoste a qualsiasi utente",
"right-suppressionlog": "Visualizza i registri privati",
"right-block": "Blocca le modifiche da parte di altri utenti",
"right-blockemail": "Impedisce a un utente di inviare email",
"currentrev": "최신판",
"currentrev-asof": "$1 기준 최신판",
"revisionasof": "$1 판",
- "revision-info": "{{GENDER:$6|$2}} 사용자의 $1 판$1",
+ "revision-info": "{{GENDER:$6|$2}} 사용자의 $1 판$7",
"previousrevision": "← 이전 판",
"nextrevision": "다음 판 →",
"currentrevisionlink": "최신판",
"license": "Lizenz",
"license-header": "Lizenz",
"nolicense": "Keng Lizenz ausgewielt",
+ "licenses-edit": "Lizenzoptiounen änneren",
"license-nopreview": "(Kucken ouni ofzespäichere geet net)",
"upload_source_url": " (gëlteg, ëffentlech zougänglech URL)",
"upload_source_file": " (e Fichier op Ärem Computer)",
"trackingcategories-msg": "Tracking-Kategorie",
"trackingcategories-name": "Numm vum Message",
"noindex-category-desc": "D'Säit gëtt net vu Botten indexéiert, well dat magescht Wuert <code><nowiki>__NOINDEX__</nowiki></code> dran ass a well se an engem Nummraum ass, an deem déi Markéierung erlaabt ass.",
+ "broken-file-category-desc": "Kategorie, déi derbäigesat gëtt, wann et op der Säit e futtise Link op e Fichier gëtt (e Link op en agebonnene Fichier wann et de Fichier net gëtt).",
"hidden-category-category-desc": "Dëst ass eng Kategorie an där <code><nowiki>__HIDDENCAT__</nowiki></code> drasteet, dat verhënnert datt se standardméisseg an der këscht mat de Kategorielinken op der Säit gewise gëtt.",
"trackingcategories-nodesc": "Keng Beschreiwung disponibel.",
"trackingcategories-disabled": "Kategorie ass desaktivéiert",
"movepagetalktext": "D'associéiert Diskussiounssäit, am Fall wou eng do ass, gëtt automatesch matgeréckelt, '''ausser:'''\n*D'Säit gëtt an een aneren Nummraum geréckelt.\n*Et gëtt schonn eng Diskussiounssäit mat dësem Numm, oder\n*Dir klickt d'Këschtchen ënnendrënner net un.\n\nAn deene Fäll musst Dir d'Diskussiounssäit manuell réckelen oder fusionéieren.",
"movearticle": "Säit réckelen:",
"moveuserpage-warning": "'''Opgepasst:''' Dir sidd am gaang eng Benotzersäit ze réckelen. Denkt w.e.g. dorunn datt just d'Säit geréckelt gëtt an datt de Benotzer ''net'' ëmbenannt gëtt.",
+ "movecategorypage-warning": "<strong>Opgepasst:</strong> Dir sidd am Gaang eng Kategorie-Säit ze réckelen. Denkt drun datt nëmmen déi Säit geréckelt gëtt an all Säiten an der aler Kategorie ginn <em>net</em> an déi nei ëmkategoriséiert.",
"movenologintext": "Dir musst e registréierte Benotzer an [[Special:UserLogin|ageloggt]] sinn, fir eng Säit ze réckelen.",
"movenotallowed": "Dir hutt net déi néideg Rechter fir Säiten ze réckelen.",
"movenotallowedfile": "Dir hutt net d'Recht fir Fichieren ze réckelen.",
"protectedpagewarning": "'''Advarsel: Denne siden har blitt låst slik at kun brukere med administratorrettigheter kan redigere den.'''\nDet siste loggelementet er oppgitt under som referanse:",
"semiprotectedpagewarning": "'''Merk:''' Denne siden har blitt låst slik at kun registrerte brukere kan endre den.\nDet siste loggelementet er oppgitt under som referanse:",
"cascadeprotectedwarning": "'''Advarsel:''' Denne siden har blitt låst slik at kun brukere med administratorrettigheter kan redigere den, fordi den inkluderes på følgende dypbeskyttede {{PLURAL:$1|sider}}:",
- "titleprotectedwarning": "'''Advarsel: Denne siden har blitt låst slik at [[Special:ListGroupRights|spesielle rettigheter]] kreves for å opprette den.'''\nDet siste loggelementet er oppgitt under som referanse:",
+ "titleprotectedwarning": "'''Advarsel: Denne siden har blitt låst slik at [[Special:ListGroupRights|bestemte rettigheter]] kreves for å opprette den.'''\nTil orientering vises den siste loggoppføringen under:",
"templatesused": "{{PLURAL:$1|Mal|Maler}} som brukes på denne siden:",
"templatesusedpreview": "{{PLURAL:$1|Mal|Maler}} brukt i denne forhåndsvisningen:",
"templatesusedsection": "{{PLURAL:$1|Mal|Maler}} brukt i denne seksjonen:",
"sectioneditnotsupported-text": "Seksjonsredigering støttes ikke på denne siden.",
"permissionserrors": "Rettighetsfeil",
"permissionserrorstext": "Du har ikke tillatelse til å utføre dette, av følgende {{PLURAL:$1|grunn|grunner}}:",
- "permissionserrorstext-withaction": "Du har ikke tillatelse til å $2 {{PLURAL:$1|på grunn av|av følgende grunner}}:",
+ "permissionserrorstext-withaction": "Du har ikke tillatelse til å $2 {{PLURAL:$1|fordi|av følgende grunner}}:",
"recreate-moveddeleted-warn": "Advarsel: Du er i ferd med å opprette en side som tidligere har blitt slettet.'''\n\nDu bør vurdere om det er passende å fortsette å redigere denne siden.\nSlette- og flytteloggen for denne siden gjengis her:",
"moveddeleted-notice": "Denne siden har blitt slettet.\nSlette- og flytteloggen vises nedenfor.",
"log-fulllog": "Vis hele loggen",
"right-browsearchive": "Przeszukiwanie usuniętych stron",
"right-undelete": "Odtwarzanie usuniętych stron",
"right-suppressrevision": "Podgląd i odtwarzanie wersji ukrytych przed administratorami",
+ "right-viewsuppressed": "Umożliwia zobaczenie wersji ukrytych przed każdym użytkownikiem",
"right-suppressionlog": "Podgląd rejestru ukrywania",
"right-block": "Blokowanie użytkownikom możliwości edycji",
"right-blockemail": "Blokowanie użytkownikom możliwości wysyłania wiadomości",
"filepage-nofile": "Plik o tej nazwie nie istnieje.",
"filepage-nofile-link": "Plik o tej nazwie nie istnieje, ale możesz go [$1 przesłać].",
"uploadnewversion-linktext": "Załaduj nowszą wersję tego pliku",
- "shared-repo-from": "z $1",
- "shared-repo": "współdzielone zasoby",
+ "shared-repo-from": "na $1",
+ "shared-repo": "współdzielonych zasobach",
"filepage.css": "/* Styl CSS tutaj zamieszczony jest dołączany do strony pliku, także na innych wiki */",
"upload-disallowed-here": "Nie możesz nadpisać tego pliku.",
"filerevert": "Przywracanie $1",
"recentchanges-legend-bot": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-bot}}.",
"recentchanges-legend-unpatrolled": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-unpatrolled}}.",
"recentchanges-legend-plusminus": "{{optional}}\nA plus/minus sign with a number for the legend.",
- "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}} (split into date and time).\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time\n* $3 - (Optional) a date\n* $4 - (Optional) a time",
+ "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time (Optional)\n* $3 - a date\n* $4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
"rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - (Currently not use) date and time. The date and the time adds to the rclistfrom description.\n* $2 - time. The time adds to the rclistfrom link description (with split of date and time).\n* $3 - date. The date adds to the rclistfrom link description (with split of date and time).\n\nThe corresponding message is {{msg-mw|Rcnotefrom}}.",
"rcshowhideminor": "Option text in [[Special:RecentChanges]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Minor edit}}",
"rcshowhideminor-show": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.\n\nSee also:\n* {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Show}}",
"importlogpage": "{{doc-logpage}}",
"importlogpagetext": "This text appears at the top of the [{{canonicalurl:Special:Log|type=import}} import log] special page.",
"import-logentry-upload": "This is the text of an entry in the Import log (and Recent Changes), after hour (and date, only in the Import log) and sysop name:\n* $1 is the name of the imported file",
- "import-logentry-upload-detail": "Used as success message. Parameters:\n* $1 - number of succeeded revisions\nSee also:\n* {{msg-mw|Import-logentry-interwiki-detail}}",
+ "import-logentry-upload-detail": "Used as success message and log entry. Parameters:\n* $1 - number of succeeded revisions\nSee also:\n* {{msg-mw|Import-logentry-interwiki-detail}}",
"import-logentry-interwiki": "Used as action listed in the log. Parameters:\n* $1 - page title",
- "import-logentry-interwiki-detail": "Used as success message. Parameters:\n* $1 - number of succeeded revisions\n* $2 - interwiki name\nSee also:\n* {{msg-mw|Import-logentry-upload-detail}}",
+ "import-logentry-interwiki-detail": "Used as success message and log entry. Parameters:\n* $1 - number of succeeded revisions\n* $2 - interwiki name\nSee also:\n* {{msg-mw|Import-logentry-upload-detail}}",
"javascripttest": "Title of the special page [[Special:JavaScriptTest]].\n\nSee also:\n* {{msg-mw|Javascripttest|title}}\n* {{msg-mw|Javascripttest-pagetext-noframework|summary}}\n* {{msg-mw|Javascripttest-pagetext-unknownframework|error message}}",
"javascripttest-backlink": "{{optional}}\nUsed as subtitle in [[Special:JavaScriptTest]]. Parameters:\n* $1 - page title",
"javascripttest-title": "Title of the special page when running a test suite. Parameters:\n* $1 is the name of the framework, for example QUnit.",
"print": "Prent",
"view": "See",
"edit": "Eedit",
+ "edit-local": "Eedit local description",
"create": "Ceaut",
"editthispage": "Eedit this page",
"create-this-page": "Creaut this page",
"talkpagelinktext": "Tauk",
"specialpage": "Byordinar Page",
"personaltools": "Personal tuils",
- "postcomment": "New section",
"articlepage": "Leuk at content page",
"talk": "Tauk",
"views": "Views",
"jumptonavigation": "navigation",
"jumptosearch": "rake",
"view-pool-error": "Sarrie, the servers ar owerlaided at the moment.\nOwer monie uisers ar ettlin tae see this page.\nPlease wait ae while afore ye ettle tae access this page again.\n\n$1",
+ "generic-pool-error": "Sorry, the servers are owerloadit at the moment.\nToo mony uisers are tryin tae view this resoorce.\nPlease wait a while afore you try tae access this resoorce again.",
"pool-timeout": "Timeout waitin fer the lock",
"pool-queuefull": "Pool line is ful",
"pool-errorunknown": "Onknawn mistak.",
"externaldberror": "Aither thaur wis aen external authentication database mistak, or ye'r naw permitit tae update yer external accoont.",
"login": "Log in",
"nav-login-createaccount": "Log in / cræft aen accoont",
- "loginprompt": "Ye maun hae cookies enabled tae log in tae {{SITENAME}}.",
"userlogin": "Cræft aen accoont or log in",
"userloginnocreate": "Log in.",
"logout": "Log oot",
"currentrev": "Reveesion the nou",
"currentrev-asof": "Latest reveesion aes o $1",
"revisionasof": "Reveesion aes o $1",
- "revision-info": "Reveesion aes o $1 bi $2",
+ "revision-info": "Revision as o $1 bi {{GENDER:$6|$2}}$7",
"previousrevision": "← Aulder reveesion",
"nextrevision": "Newer reveesion →",
"currentrevisionlink": "Latest reveesion",
"revdelete-text-text": "Delytit reveesions will still kith in the page histerie, bit pairts o thair content will be onaccessible til the publeec.",
"revdelete-text-file": "Delytit file versions will still kith in the file histerie, bit pairts o thair content will be onaccessible til the publeec.",
"logdelete-text": "Delytit log events will still kith in the logs, bit pairts o thair content will be onaccessible til the publeec.",
- "revdelete-text-others": "Ither admeenistraters oan {{SITENAME}} will still be able tae access the skaukt content n can ondelyte it again throoch this same interface, onless addeetional restreections ar set.",
+ "revdelete-text-others": "Ither admeenistrators will still be able tae access the hidden content an tae undelete it, unless addeetional restrictions are set.",
"revdelete-confirm": "Please confirm that ye'r ettlin tae dae this, that ye unnerstaunn the consequences, n that ye'r daein this in accordance wi [[{{MediaWiki:Policy-url}}|the policie]].",
"revdelete-suppress-text": "Suppression shid <strong>yinly</strong> be uised fer the follaein cases:\n* poteentiallie libeloos information\n* galus personal information\n*: <em>hame addresses n telephane nummers, national ideentifeecation nummers, etc.</em>",
"revdelete-legend": "Set visibeelitie restreections",
"powersearch-togglelabel": "Chec':",
"powersearch-toggleall": "Aw",
"powersearch-togglenone": "Nane",
+ "powersearch-remember": "Remember selection for futur rakes",
"search-external": "Eixternal rake",
"searchdisabled": "Rakin throu {{SITENAME}} is disabled fer performance raisons. Ye can rake bi wa o Google juist nou. Mynd that thair indexes o {{SITENAME}} content micht be oot o date.",
"search-error": "Ae mistak haes occurred while rakin: $1",
"right-deletedtext": "See delytit tex n chynges atween delytit reveesions",
"right-browsearchive": "Rake delytit pages",
"right-undelete": "Ondelyte ae page",
- "right-suppressrevision": "Luikower n restore reveesions skaukt fae admeenistraters",
+ "right-suppressrevision": "View, hide an unhide speceefic revisions o pages frae ony uiser",
"right-suppressionlog": "see preevate logs",
"right-block": "Block ither uisers fae eeditin",
"right-blockemail": "Block ae uiser fae sendin wab-mail",
"largefileserver": "This file is bigger than the server is confeeegurt tae allou.",
"emptyfile": "The file that ye uplaided seems tae be tuim.\nThis micht be cause o ae typeower in the filename.\nPlease check whether ye reallie want tae uplaid this file.",
"windows-nonascii-filename": "This wiki disna support filenames wi speecial chairacters.",
- "fileexists": "Ae file wi this name exeests aareadies, please check <strong>[[:$1]]</strong> gif ye'r no sair that ye want tae chynge it.\n[[$1|thumb]]",
+ "fileexists": "A file wi this name exists already, please check <strong>[[:$1]]</strong> if {{GENDER:|ye}} are nae sure if ye want tae chynge it.\n[[$1|thumb]]",
"filepageexists": "The descreeption page fer this file haes awreadie been cræftit at <strong>[[:$1]]</strong>, bit nae file wi this name exeests the nou.\nThe ootline that ye enter will na kith oan the descreeption page.\nTae mak yer ootline kith thaur, ye'll need tae manuallie eedit it.\n[[$1|thumb]]",
"fileexists-extension": "Ae file wi ae siclike name exeests: [[$2|thumb]]\n* Name o the uplaidin file: <strong>[[:$1]]</strong>\n* Name o the exeestin file: <strong>[[:$2]]</strong>\nWid ye lik tae chuise ae mair disteencteeve name?",
"fileexists-thumbnail-yes": "The file seems tae be aen eemage o reduced size ''(thumbnail)''.\n[[$1|thumb]]\nPlease check the file <strong>[[:$1]]</strong>.\nGif the checked file is the same eemage o oreeginal size it's no necessairie tae uplaid aen extra thumbnail.",
"license": "Licensin:",
"license-header": "Licensin",
"nolicense": "Nane selectit",
+ "licenses-edit": "Eedit license options",
"license-nopreview": "(Luikower naw available)",
"upload_source_url": "(ae valid, publeeclie accessible URL)",
"upload_source_file": "(ae file oan yer computer)",
"wantedtemplates": "Wantit templates",
"mostlinked": "Maist airtit-tae pages",
"mostlinkedcategories": "Maist airtit-tae categeries",
- "mostlinkedtemplates": "Maist linkt-til templates",
+ "mostlinkedtemplates": "Maist transcludit pages",
"mostcategories": "Airticles wi the maist categeries",
"mostimages": "Maist uised eemages",
"mostinterwikis": "Pages wi the maist interwikis",
"action-createaccount": "отварање овог корисничког налога",
"action-history": "гледање историје ове странице",
"action-minoredit": "означавање ове измене као мање",
- "action-move": "пÑ\80емеÑ\81Ñ\82и овÑ\83 Ñ\81Ñ\82Ñ\80аниÑ\86Ñ\83",
+ "action-move": "пÑ\80емеÑ\88Ñ\82аÑ\9aе ове Ñ\81Ñ\82Ñ\80аниÑ\86е",
"action-move-subpages": "премештање ове странице и њених подстраница",
"action-move-rootuserpages": "премештање основних корисничких страница",
- "action-movefile": "пÑ\80емеÑ\81Ñ\82и овÑ\83 даÑ\82оÑ\82екÑ\83",
+ "action-movefile": "пÑ\80емеÑ\88Ñ\82аÑ\9aе ове даÑ\82оÑ\82еке",
"action-upload": "слање ове датотеке",
"action-reupload": "замењивање постојеће датотеке",
"action-reupload-shared": "постављање ове датотеке на заједничко складиште",
"action-rollback": "брзо враћање измена последњег корисника који је мењао одређену страницу",
"action-import": "увожење страница из других викија",
"action-importupload": "увожење страница из отпремљене датотеке",
- "action-patrol": "означавање туђих измена прегледаним",
- "action-autopatrol": "самоозначавање измена прегледаним",
+ "action-patrol": "означавање туђих измена патролираним",
+ "action-autopatrol": "означавање сопствених измена патролираним",
"action-unwatchedpages": "прегледање списка ненадгледаних страница",
"action-mergehistory": "спајање историје ове странице",
"action-userrights": "уређивање свих корисничких права",
"action-userrights-interwiki": "уређивање корисничких права на другим викијима",
"action-siteadmin": "закључавање или откључавање базе података",
"action-sendemail": "слање е-порука",
- "action-editmywatchlist": "измени свој списак надгледања",
+ "action-editmywatchlist": "измену сопственог списак надгледања",
"action-viewmywatchlist": "преглед вашег списак надгледања",
"action-viewmyprivateinfo": "прегледање ваших личних података",
"action-editmyprivateinfo": "уређивање ваших личних података",
"pagelang-name": "Страница",
"pagelang-language": "Језик",
"pagelang-select-lang": "Изабери језик",
- "right-pagelang": "пÑ\80омена језика странице",
+ "right-pagelang": "меÑ\9aаÑ\9aе језика странице",
"action-pagelang": "промену језика странице"
}
"action-createaccount": "otvaranje ovog korisničkog naloga",
"action-history": "gledanje istorije ove stranice",
"action-minoredit": "označavanje ove izmene kao manje",
- "action-move": "premesti ovu stranicu",
+ "action-move": "premeštanje ove stranice",
"action-move-subpages": "premeštanje ove stranice i njenih podstranica",
"action-move-rootuserpages": "premeštanje osnovnih korisničkih stranica",
- "action-movefile": "premesti ovu datoteku",
+ "action-movefile": "premeštanje ove datoteke",
"action-upload": "slanje ove datoteke",
"action-reupload": "zamenjivanje postojeće datoteke",
"action-reupload-shared": "postavljanje ove datoteke na zajedničko skladište",
"action-import": "uvoženje stranica iz drugih vikija",
"action-importupload": "uvoženje stranica iz otpremljene datoteke",
"action-patrol": "označavanje tuđih izmena pregledanim",
- "action-autopatrol": "samooznačavanje izmena pregledanim",
+ "action-autopatrol": "označavanje sopstvenih izmena patroliranim",
"action-unwatchedpages": "pregledanje spiska nenadgledanih stranica",
"action-mergehistory": "spajanje istorije ove stranice",
"action-userrights": "uređivanje svih korisničkih prava",
"action-userrights-interwiki": "uređivanje korisničkih prava na drugim vikijima",
"action-siteadmin": "zaključavanje ili otključavanje baze podataka",
"action-sendemail": "slanje e-poruka",
- "action-editmywatchlist": "izmeni svoj spisak nadgledanja",
+ "action-editmywatchlist": "izmenu sopstvenog spisak nadgledanja",
"action-viewmywatchlist": "pregled vašeg spisak nadgledanja",
"action-viewmyprivateinfo": "pregledanje vaših ličnih podataka",
"action-editmyprivateinfo": "uređivanje vaših ličnih podataka",
"version-version": "($1)",
"version-no-ext-name": "[без назви]",
"version-svn-revision": "(r$2)",
- "version-license": "Ліцензія MediaWik",
+ "version-license": "Ліцензія MediaWiki",
"version-ext-license": "Ліцензія",
"version-ext-colheader-name": "Розширення",
"version-skin-colheader-name": "Тема оформлення",
"group-bot": "机器人",
"group-sysop": "管理员",
"group-bureaucrat": "行政员",
- "group-suppress": "监督",
+ "group-suppress": "监督员",
"group-all": "(所有)",
"group-user-member": "{{GENDER:$1|用户}}",
"group-autoconfirmed-member": "自动确认用户",
"group-bot-member": "机器人",
"group-sysop-member": "{{GENDER:$1|管理员}}",
"group-bureaucrat-member": "行政员",
- "group-suppress-member": "监督员",
+ "group-suppress-member": "{{GENDER:$1|监督员}}",
"grouppage-user": "{{ns:project}}:用户",
"grouppage-autoconfirmed": "{{ns:project}}:自动确认用户",
"grouppage-bot": "{{ns:project}}:机器人",
"grouppage-sysop": "{{ns:project}}:管理员",
"grouppage-bureaucrat": "{{ns:project}}:行政员",
- "grouppage-suppress": "{{ns:project}}:监督员",
+ "grouppage-suppress": "{{ns:project}}:监督",
"right-read": "阅读页面",
"right-edit": "编辑页面",
"right-createpage": "创建非讨论页面",
"revdelete-text-text": "已刪除的修訂仍會出現於頁面歷史中,但內容將不開放存取。",
"revdelete-text-file": "已刪除的檔案版本仍會出現於檔案歷史中,但內容將不開放存取。",
"logdelete-text": "已刪除的日誌活動仍會出現於日誌中,但內容將不開放存取。",
- "revdelete-text-others": "å\9c¨ {{SITENAME}} ä¸\8aç\9a\84å\85¶ä»\96管ç\90\86å\93¡ä»\8dæ\9c\89æ¬\8aé\99\90å\8f¯ä»¥å\98å\8f\96é\9a±è\97\8fç\9a\84å\85§å®¹ï¼\8cä¸\94è\83½å¤ å\8f\96æ¶\88å\88ªé\99¤ï¼\8cé\99¤é\9d\9eæ\9c\89é¡\8då¤\96ç\9a\84è¨å®\9aé\99\90å\88¶ã\80\82",
+ "revdelete-text-others": "å\85¶ä»\96管ç\90\86å\93¡ä»\8dæ\9c\89æ¬\8aé\99\90檢è¦\96é\9a±è\97\8fç\9a\84å\85§å®¹ï¼\8cä¸\94è\83½å¤ å\8f\96æ¶\88å\88ªé\99¤ï¼\8cé\99¤é\9d\9eæ\9c\89é¡\8då¤\96ç\9a\84è¨å®\9aé\99\90å\88¶ã\80\82",
"revdelete-confirm": "請確認您是否明白此動作會造成的後果,\n以及您所做的動作是否符合 [[{{MediaWiki:Policy-url}}|政策]] 規範。",
"revdelete-suppress-text": "禁制顯示應<strong>只有</strong>在下述情形時使用:\n* 潛在誹謗的資訊\n* 不合適個人資料\n*: <em>住家地址、電話號碼、身分證字號等。</em>",
"revdelete-legend": "設定顯示限制",
"right-deletedtext": "檢視已刪除修訂中已刪除的文字及變更",
"right-browsearchive": "搜尋已刪除的頁面",
"right-undelete": "取消刪除頁面",
- "right-suppressrevision": "複查與還原由管理員隱藏的修訂",
+ "right-suppressrevision": "檢視、隱藏與還原某使用者對頁面的特定修訂",
+ "right-viewsuppressed": "檢視某使用者隱藏的修訂",
"right-suppressionlog": "檢視非公開日誌",
"right-block": "封鎖其他使用者的編輯權限",
"right-blockemail": "封鎖使用者傳送電子郵件的權限",
"action-importupload": "由檔案上傳匯入頁面",
"action-patrol": "標示其它人的編輯為已巡查",
"action-autopatrol": "標示您的編輯為已巡查",
- "action-unwatchedpages": "檢視未監視的頁面列表",
+ "action-unwatchedpages": "檢視未監視的頁面清單",
"action-mergehistory": "合併此頁面的歷史",
"action-userrights": "編輯所有使用者的權限",
"action-userrights-interwiki": "編輯在其它 Wiki 上的使用者權限",
class DeleteEqualMessages extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Deletes all pages in the MediaWiki namespace that are equal to the default message";
+ $this->mDescription = "Deletes all pages in the MediaWiki namespace that are equal to '
+ . 'the default message";
$this->addOption( 'delete', 'Actually delete the pages (default: dry run)' );
$this->addOption( 'delete-talk', 'Don\'t leave orphaned talk pages behind during deletion' );
- $this->addOption( 'lang-code', 'Check for subpages of this language code (default: root page against content language). ' .
- 'Use value "*" to run for all mwfile language code subpages (including the base pages that override content language).', false, true );
+ $this->addOption( 'lang-code', 'Check for subpages of this language code (default: root '
+ . 'page against content language). Use value "*" to run for all mwfile language code '
+ . 'subpages (including the base pages that override content language).', false, true );
}
/**
// Normalise message names for NS_MEDIAWIKI page_title
$messageNames = array_map( array( $wgContLang, 'ucfirst' ), $messageNames );
- $statuses = AllMessagesTablePager::getCustomisedStatuses( $messageNames, $langCode, $nonContLang );
+ $statuses = AllMessagesTablePager::getCustomisedStatuses(
+ $messageNames, $langCode, $nonContLang );
// getCustomisedStatuses is stripping the sub page from the page titles, add it back
$titleSuffix = $nonContLang ? "/$langCode" : '';
return;
}
- $this->output( "\n{$messageInfo['relevantPages']} pages in the MediaWiki namespace override messages." );
- $this->output( "\n{$messageInfo['equalPages']} pages are equal to the default message (+ {$messageInfo['equalPagesTalks']} talk pages).\n" );
+ $this->output( "\n{$messageInfo['relevantPages']} pages in the MediaWiki namespace ' .
+ 'override messages." );
+ $this->output( "\n{$messageInfo['equalPages']} pages are equal to the default message ' .
+ '(+ {$messageInfo['equalPagesTalks']} talk pages).\n" );
if ( !$doDelete ) {
$list = '';
$this->output( "\n* [[$title]]" );
$page = WikiPage::factory( $title );
$error = ''; // Passed by ref
- $page->doDeleteArticle( 'Orphaned talk page of no longer required message', false, 0, false, $error, $user );
+ $page->doDeleteArticle( 'Orphaned talk page of no longer required message',
+ false, 0, false, $error, $user );
}
}
$this->output( "\n\ndone!\n" );
}
$this->output( "Searching for supplementary i18n files...\n" );
$dir_iterator = new RecursiveDirectoryIterator( dirname( $phpfile ) );
- $iterator = new RecursiveIteratorIterator( $dir_iterator, RecursiveIteratorIterator::LEAVES_ONLY );
+ $iterator = new RecursiveIteratorIterator(
+ $dir_iterator, RecursiveIteratorIterator::LEAVES_ONLY );
foreach ( $iterator as $path => $fileObject ) {
if ( fnmatch( "*.i18n.php", $fileObject->getFilename() ) ) {
$this->output( "Converting $path.\n" );
/**
* Maintenance script to install and configure MediaWiki
*
- * Default values for the options are defined in DefaultSettings.php (see the mapping in CliInstaller.php)
+ * Default values for the options are defined in DefaultSettings.php
+ * (see the mapping in CliInstaller.php)
* Default for --dbpath (SQLite-specific) is defined in SqliteInstaller::getGlobalDefaults
*
* @ingroup Maintenance
true
);
$this->addOption( 'confpath', "Path to write LocalSettings.php to ($IP)", false, true );
- $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in PostgreSQL/Microsoft SQL Server (mediawiki)', false, true );
+ $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in '
+ . 'PostgreSQL/Microsoft SQL Server (mediawiki)', false, true );
/*
- $this->addOption( 'namespace', 'The project namespace (same as the "name" argument)', false, true );
+ $this->addOption( 'namespace', 'The project namespace (same as the "name" argument)',
+ false, true );
*/
$this->addOption( 'env-checks', "Run environment checks only, don't change anything" );
}
}
}
- $type = $this->getOption( 'type', false );
- $maxJobs = $this->getOption( 'maxjobs', false );
- $maxTime = $this->getOption( 'maxtime', false );
- $noThrottle = $this->hasOption( 'nothrottle' );
- $startTime = time();
-
- $group = JobQueueGroup::singleton();
- // Handle any required periodic queue maintenance
- $count = $group->executeReadyPeriodicTasks();
- if ( $count > 0 ) {
- $this->runJobsLog( "Executed $count periodic queue task(s)." );
- }
-
- $backoffs = $this->loadBackoffs(); // map of (type => UNIX expiry)
- $startingBackoffs = $backoffs; // avoid unnecessary writes
- $backoffExpireFunc = function ( $t ) {
- return $t > time();
- };
-
- $jobsRun = 0; // counter
- $flags = JobQueueGroup::USE_CACHE;
- $lastTime = microtime( true ); // time since last slave check
- do {
- $backoffs = array_filter( $backoffs, $backoffExpireFunc );
- $blacklist = $noThrottle ? array() : array_keys( $backoffs );
- if ( $type === false ) {
- $job = $group->pop( JobQueueGroup::TYPE_DEFAULT, $flags, $blacklist );
- } elseif ( in_array( $type, $blacklist ) ) {
- $job = false; // requested queue in backoff state
- } else {
- $job = $group->pop( $type ); // job from a single queue
- }
- if ( $job ) { // found a job
- ++$jobsRun;
- $this->runJobsLog( $job->toString() . " STARTING" );
-
- // Run the job...
- wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
- $t = microtime( true );
- try {
- $status = $job->run();
- $error = $job->getLastError();
- } catch ( MWException $e ) {
- MWExceptionHandler::rollbackMasterChangesAndLog( $e );
- $status = false;
- $error = get_class( $e ) . ': ' . $e->getMessage();
- $e->report(); // write error to STDERR and the log
- }
- $timeMs = intval( ( microtime( true ) - $t ) * 1000 );
- wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
-
- // Mark the job as done on success or when the job cannot be retried
- if ( $status !== false || !$job->allowRetries() ) {
- $group->ack( $job ); // done
- }
-
- if ( $status === false ) {
- $this->runJobsLog( $job->toString() . " t=$timeMs error={$error}" );
- } else {
- $this->runJobsLog( $job->toString() . " t=$timeMs good" );
- }
-
- // Back off of certain jobs for a while (for throttling and for errors)
- $ttw = $this->getBackoffTimeToWait( $job );
- if ( $status === false && mt_rand( 0, 49 ) == 0 ) {
- $ttw = max( $ttw, 30 );
- }
- if ( $ttw > 0 ) {
- $jType = $job->getType();
- $backoffs[$jType] = isset( $backoffs[$jType] ) ? $backoffs[$jType] : 0;
- $backoffs[$jType] = max( $backoffs[$jType], time() + $ttw );
- }
-
- // Break out if we hit the job count or wall time limits...
- if ( $maxJobs && $jobsRun >= $maxJobs ) {
- break;
- } elseif ( $maxTime && ( time() - $startTime ) > $maxTime ) {
- break;
- }
-
- // Don't let any of the main DB slaves get backed up
- $timePassed = microtime( true ) - $lastTime;
- if ( $timePassed >= 5 || $timePassed < 0 ) {
- wfWaitForSlaves( $lastTime );
- $lastTime = microtime( true );
- }
- // Don't let any queue slaves/backups fall behind
- if ( $jobsRun > 0 && ( $jobsRun % 100 ) == 0 ) {
- $group->waitForBackups();
- }
-
- // Bail if near-OOM instead of in a job
- $this->assertMemoryOK();
- }
- } while ( $job ); // stop when there are no jobs
- // Sync the persistent backoffs for the next runJobs.php pass
- $backoffs = array_filter( $backoffs, $backoffExpireFunc );
- if ( $backoffs !== $startingBackoffs ) {
- $this->syncBackoffs( $backoffs );
- }
- }
-
- /**
- * @param Job $job
- * @return int Seconds for this runner to avoid doing more jobs of this type
- * @see $wgJobBackoffThrottling
- */
- private function getBackoffTimeToWait( Job $job ) {
- global $wgJobBackoffThrottling;
-
- if ( !isset( $wgJobBackoffThrottling[$job->getType()] ) ||
- $job instanceof DuplicateJob // no work was done
- ) {
- return 0; // not throttled
- }
-
- $itemsPerSecond = $wgJobBackoffThrottling[$job->getType()];
- if ( $itemsPerSecond <= 0 ) {
- return 0; // not throttled
- }
-
- $seconds = 0;
- if ( $job->workItemCount() > 0 ) {
- $exactSeconds = $job->workItemCount() / $itemsPerSecond;
- // use randomized rounding
- $seconds = floor( $exactSeconds );
- $remainder = $exactSeconds - $seconds;
- $seconds += ( mt_rand() / mt_getrandmax() < $remainder ) ? 1 : 0;
- }
-
- return (int)$seconds;
- }
-
- /**
- * Get the previous backoff expiries from persistent storage
- *
- * @return array Map of (job type => backoff expiry timestamp)
- */
- private function loadBackoffs() {
- $section = new ProfileSection( __METHOD__ );
-
- $backoffs = array();
- $file = wfTempDir() . '/mw-runJobs-backoffs.json';
- if ( is_file( $file ) ) {
- $handle = fopen( $file, 'rb' );
- flock( $handle, LOCK_SH );
- $content = stream_get_contents( $handle );
- flock( $handle, LOCK_UN );
- fclose( $handle );
- $backoffs = json_decode( $content, true ) ? : array();
- }
-
- return $backoffs;
- }
-
- /**
- * Merge the current backoff expiries from persistent storage
- *
- * @param array $backoffs Map of (job type => backoff expiry timestamp)
- */
- private function syncBackoffs( array $backoffs ) {
- $section = new ProfileSection( __METHOD__ );
-
- $file = wfTempDir() . '/mw-runJobs-backoffs.json';
- $handle = fopen( $file, 'wb+' );
- flock( $handle, LOCK_EX );
- $content = stream_get_contents( $handle );
- $cBackoffs = json_decode( $content, true ) ? : array();
- foreach ( $backoffs as $type => $timestamp ) {
- $cBackoffs[$type] = isset( $cBackoffs[$type] ) ? $cBackoffs[$type] : 0;
- $cBackoffs[$type] = max( $cBackoffs[$type], $backoffs[$type] );
- }
- ftruncate( $handle, 0 );
- fwrite( $handle, json_encode( $backoffs ) );
- flock( $handle, LOCK_UN );
- fclose( $handle );
- }
-
- /**
- * Make sure that this script is not too close to the memory usage limit.
- * It is better to die in between jobs than OOM right in the middle of one.
- * @throws MWException
- */
- private function assertMemoryOK() {
- static $maxBytes = null;
- if ( $maxBytes === null ) {
- $m = array();
- if ( preg_match( '!^(\d+)(k|m|g|)$!i', ini_get( 'memory_limit' ), $m ) ) {
- list( , $num, $unit ) = $m;
- $conv = array( 'g' => 1073741824, 'm' => 1048576, 'k' => 1024, '' => 1 );
- $maxBytes = $num * $conv[strtolower( $unit )];
- } else {
- $maxBytes = 0;
- }
- }
- $usedBytes = memory_get_usage();
- if ( $maxBytes && $usedBytes >= 0.95 * $maxBytes ) {
- throw new MWException( "Detected excessive memory usage ($usedBytes/$maxBytes)." );
- }
+ $runner = new JobRunner();
+ $runner->setDebugHandler( array( $this, 'debugInternal' ) );
+ $runner->run( array(
+ 'type' => $this->getOption( 'type', false ),
+ 'maxJobs' => $this->getOption( 'maxjobs', false ),
+ 'maxTime' => $this->getOption( 'maxtime', false ),
+ 'throttle' => $this->hasOption( 'nothrottle' ) ? false : true,
+ ) );
}
/**
- * Log the job message
- * @param string $msg The message to log
+ * @param string $s
*/
- private function runJobsLog( $msg ) {
- $this->output( wfTimestamp( TS_DB ) . " $msg\n" );
- wfDebugLog( 'runJobs', $msg );
+ public function debugInternal( $s ) {
+ $this->output( $s );
}
}
{
- "skinname-monobook": "MonoBook"
+ "@metadata": {
+ "authors": [
+ "Pikne"
+ ]
+ },
+ "skinname-monobook": "MonoBook",
+ "monobook.css": "/* Siin asuv kaskaadilaadistik puudutab kõiki MonoBooki-kujunduse kasutajaid. */",
+ "monobook.js": "/* Siin asuv JavaScript laaditakse MonoBooki-kujunduse kasutajate jaoks. */"
}
{
"@metadata": {
"authors": [
- "Rotemliss"
+ "Rotemliss",
+ "Amire80"
]
},
"skinname-monobook": "מונובוק",
+ "monobook-desc": "העיצוב הקלאסי של מדיה־ויקי מ־2004, שנקרא על שם הצילום השחור־לבן של ספר ברקע",
"monobook.css": "/* הסגנונות הנכתבים כאן ישפיעו על העיצוב MonoBook בלבד */",
"monobook.js": "/* כל סקריפט JavaScript שנכתב כאן ירוץ רק עבור המשתמשים בעיצוב Monobook */"
}
echo ' emptyPortlet';
}
?>" aria-labelledby="p-cactions-label">
- <h3 id="p-cactions-label"><span><?php $this->msg( 'vector-more-actions' ) ?></span><a href="#"></a></h3>
+ <h3 id="p-cactions-label"><span><?php
+ $this->msg( 'vector-more-actions' )
+ ?></span><a href="#"></a></h3>
<div class="menu">
<ul<?php $this->html( 'userlangattributes' ) ?>>
]
},
"skinname-vector": "Vektor",
+ "vector-skin-desc": "MonoBooki uuem versioon värskema väljanägemise ja mitme kasutajasõbralikuma täiendusega",
+ "vector.css": "/* Siin asuv kaskaadilaadistik puudutab kõiki Vektori-kujunduse kasutajaid. */",
+ "vector.js": "/* Siin asuv JavaScript laaditakse kõigi Vektori-kujunduse kasutajate jaoks. */",
"vector-action-addsection": "Lisa teema",
"vector-action-delete": "Kustuta",
"vector-action-move": "Teisalda",
]
},
"skinname-vector": "וקטור",
+ "vector-skin-desc": "גרסה מודרנית של מונובוק עם מראה רענן והרבה שיפורי שמישות",
"vector.css": "/* הסגנונות הנכתבים כאן ישפיעו על העיצוב Vector בלבד */",
"vector.js": "/* כל סקריפט JavaScript שנכתב כאן ירוץ רק עבור המשתמשים בעיצוב Vector */",
"vector-action-addsection": "הוספת נושא",
"authors": [
"Teak",
"Vadgt",
- "Xelgen"
+ "Xelgen",
+ "Arman musikyan"
]
},
"skinname-vector": "Սովորական",
"vector-view-edit": "Խմբագրել",
"vector-view-history": "Դիտել պատմությունը",
"vector-view-view": "Կարդալ",
- "vector-view-viewsource": "Դիտել ելատեքստը"
+ "vector-view-viewsource": "Դիտել ելատեքստը",
+ "vector-more-actions": "Ավելին"
}
'UserWrapper' => "$testDir/phpunit/includes/api/UserWrapper.php",
'RandomImageGenerator' => "$testDir/phpunit/includes/api/RandomImageGenerator.php",
+ # tests/phpunit/includes/changes
+ 'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
+
# tests/phpunit/includes/content
'DummyContentHandlerForTesting' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
'DummyContentForTesting' => "$testDir/phpunit/includes/content/ContentHandlerTest.php",
* @ingroup Testing
*/
-$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled', 'run-parsoid' );
+$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output',
+ 'record', 'run-disabled', 'run-parsoid' );
$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
require_once __DIR__ . '/../maintenance/commandLine.inc';
*/
public function testInLanguage() {
$this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( 'en' )->text() );
- $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( 'ru' )->text() );
+ $this->assertEquals( 'Заглавная страница',
+ wfMessage( 'mainpage' )->inLanguage( 'ru' )->text() );
// NOTE: make sure internal caching of the message text is reset appropriately
$msg = wfMessage( 'mainpage' );
array( 'tsv', 'text/plain', 'text/tab-separated-values' ),
array( 'json', 'text/plain', 'application/json' ),
array( 'foo', 'application/x-opc+zip', 'application/zip' ),
- array( 'docx', 'application/x-opc+zip', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ),
+ array( 'docx', 'application/x-opc+zip',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ),
array( 'djvu', 'image/x-djvu', 'image/vnd.djvu' ),
array( 'wav', 'audio/wav', 'audio/wav' ),
);
--- /dev/null
+<?php
+
+/**
+ * @covers OldChangesList
+ *
+ * @group Database
+ *
+ * @licence GNU GPL v2+
+ * @author Katie Filbert < aude.wiki@gmail.com >
+ */
+class OldChangesListTest extends MediaWikiLangTestCase {
+
+ /**
+ * @var TestRecentChangesHelper
+ */
+ private $testRecentChangesHelper;
+
+ public function __construct( $name = null, array $data = array(), $dataName = '' ) {
+ parent::__construct( $name, $data, $dataName );
+
+ $this->testRecentChangesHelper = new TestRecentChangesHelper();
+ }
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->setMwGlobals( array(
+ 'wgArticlePath' => '/wiki/$1'
+ ) );
+ }
+
+ /**
+ * @dataProvider recentChangesLine_CssForLineNumberProvider
+ */
+ public function testRecentChangesLine_CssForLineNumber( $expected, $linenumber, $message ) {
+ $oldChangesList = $this->getOldChangesList();
+ $recentChange = $this->getEditChange();
+
+ $line = $oldChangesList->recentChangesLine( $recentChange, false, $linenumber );
+
+ $this->assertRegExp( $expected, $line, $message );
+ }
+
+ public function recentChangesLine_CssForLineNumberProvider() {
+ return array(
+ array( '/mw-line-odd/', 1, 'odd line number' ),
+ array( '/mw-line-even/', 2, 'even line number' )
+ );
+ }
+
+ public function testRecentChangesLine_NotWatchedCssClass() {
+ $oldChangesList = $this->getOldChangesList();
+ $recentChange = $this->getEditChange();
+
+ $line = $oldChangesList->recentChangesLine( $recentChange, false, 1 );
+
+ $this->assertRegExp( '/mw-changeslist-line-not-watched/', $line );
+ }
+
+ public function testRecentChangesLine_WatchedCssClass() {
+ $oldChangesList = $this->getOldChangesList();
+ $recentChange = $this->getEditChange();
+
+ $line = $oldChangesList->recentChangesLine( $recentChange, true, 1 );
+
+ $this->assertRegExp( '/mw-changeslist-line-watched/', $line );
+ }
+
+ public function testRecentChangesLine_LogTitle() {
+ $oldChangesList = $this->getOldChangesList();
+ $recentChange = $this->getLogChange( 'delete' );
+
+ $line = $oldChangesList->recentChangesLine( $recentChange, false, 1 );
+
+ $message = new Message( 'dellogpage' );
+ $expectedLinkText = $message->inLanguage( 'en' )->text();
+
+ $this->assertRegExp( '/href="\/wiki\/Special:Log\/delete/', $line, 'link has href attribute' );
+ $this->assertRegExp( '/title="Special:Log\/delete/', $line, 'link has title attribute' );
+ $this->assertRegExp( "/$expectedLinkText/", $line, 'link text' );
+ }
+
+ public function testRecentChangesLine_DiffHistLinks() {
+ $oldChangesList = $this->getOldChangesList();
+ $recentChange = $this->getEditChange();
+
+ $line = $oldChangesList->recentChangesLine( $recentChange, false, 1 );
+
+ $this->assertRegExp(
+ '/title=Cat&curid=20131103212153&diff=5&oldid=191/',
+ $line,
+ 'assert diff link'
+ );
+
+ $this->assertRegExp( '/tabindex="0"/', $line, 'assert tab index' );
+ $this->assertRegExp(
+ '/title=Cat&curid=20131103212153&action=history"/',
+ $line,
+ 'assert history link'
+ );
+ }
+
+ private function getNewBotEditChange() {
+ $user = $this->getTestUser();
+
+ $recentChange = $this->testRecentChangesHelper->makeNewBotEditRecentChange(
+ $user, 'Abc', '20131103212153', 0, 0
+ );
+
+ return $recentChange;
+ }
+
+ private function getLogChange( $logType ) {
+ $user = $this->getTestUser();
+
+ $recentChange = $this->testRecentChangesHelper->makeLogRecentChange(
+ $logType, $user, 'Abc', '20131103212153', 0, 0
+ );
+
+ return $recentChange;
+ }
+
+ private function getEditChange() {
+ $user = $this->getTestUser();
+ $recentChange = $this->testRecentChangesHelper->makeEditRecentChange(
+ $user, 'Cat', '20131103212153', 5, 191, 190, 0, 0
+ );
+
+ return $recentChange;
+ }
+
+ private function getOldChangesList() {
+ $context = $this->getContext();
+ return new OldChangesList( $context );
+ }
+
+ private function getTestUser() {
+ $user = User::newFromName( 'TestRecentChangesUser' );
+
+ if ( !$user->getId() ) {
+ $user->addToDatabase();
+ }
+
+ return $user;
+ }
+
+ private function getContext() {
+ $user = $this->getTestUser();
+ $context = $this->testRecentChangesHelper->getTestContext( $user );
+
+ $title = Title::newFromText( 'RecentChanges', NS_SPECIAL );
+ $context->setTitle( $title );
+
+ return $context;
+ }
+
+}
* @author Katie Filbert < aude.wiki@gmail.com >
*/
class RCCacheEntryFactoryTest extends MediaWikiLangTestCase {
+
+ /**
+ * @var TestRecentChangesHelper
+ */
+ private $testRecentChangesHelper;
+
+ public function __construct( $name = null, array $data = array(), $dataName = '' ) {
+ parent::__construct( $name, $data, $dataName );
+
+ $this->testRecentChangesHelper = new TestRecentChangesHelper();
+ }
+
protected function setUp() {
parent::setUp();
);
$this->assertEquals( $expected['unpatrolled'], $cacheEntry->unpatrolled, 'unpatrolled' );
- $this->assertUserLinks( 'Mary', $cacheEntry );
+ $this->assertUserLinks( 'TestRecentChangesUser', $cacheEntry );
$this->assertTitleLink( 'Xyz', $cacheEntry );
$this->assertQueryLink( 'cur', $expected['cur'], $cacheEntry->curlink, 'cur link' );
array(
array(
'title' => 'Xyz',
- 'user' => 'Mary',
+ 'user' => 'TestRecentChangesUser',
'diff' => array( 'curid' => 5, 'diff' => 191, 'oldid' => 190 ),
'cur' => array( 'curid' => 5, 'diff' => 0, 'oldid' => 191 ),
'timestamp' => '21:21',
),
$this->getContext(),
$this->getMessages(),
- $this->makeEditRecentChange(
- 'Xyz',
+ $this->testRecentChangesHelper->makeEditRecentChange(
$this->getTestUser(),
+ 'Xyz',
5, // curid
191, // thisid
190, // lastid
0, // counter
0 // number of watching users
),
- false,
- 'edit'
- )
- );
- }
-
- private function makeEditRecentChange( $title, $user, $curid, $thisid, $lastid,
- $timestamp, $counter, $watchingUsers
- ) {
-
- $attribs = array_merge(
- $this->getDefaultAttributes( $title, $timestamp ),
- array(
- 'rc_user' => $user->getId(),
- 'rc_user_text' => $user->getName(),
- 'rc_this_oldid' => $thisid,
- 'rc_last_oldid' => $lastid,
- 'rc_cur_id' => $curid
+ false
)
);
-
- return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
}
/**
$this->assertEquals( $expected['unpatrolled'], $cacheEntry->unpatrolled, 'unpatrolled' );
$this->assertDeleteLogLink( $cacheEntry );
- $this->assertUserLinks( 'Mary', $cacheEntry );
+ $this->assertUserLinks( 'TestRecentChangesUser', $cacheEntry );
$this->assertEquals( 'cur', $cacheEntry->curlink, 'cur link for delete log or rev' );
$this->assertEquals( 'diff', $cacheEntry->difflink, 'diff link for delete log or rev' );
array(
array(
'title' => 'Abc',
- 'user' => 'Mary',
+ 'user' => 'TestRecentChangesUser',
'timestamp' => '21:21',
'numberofWatchingusers' => 0,
'unpatrolled' => false
),
$this->getContext(),
$this->getMessages(),
- $this->makeLogRecentChange(
- 'Abc',
+ $this->testRecentChangesHelper->makeLogRecentChange(
+ 'delete',
$this->getTestUser(),
+ 'Abc',
'20131103212153',
0, // counter
0 // number of watching users
),
- false,
- 'delete'
- )
- );
- }
-
- private function makeLogRecentChange( $title, $user, $timestamp, $counter, $watchingUsers ) {
- $attribs = array_merge(
- $this->getDefaultAttributes( $title, $timestamp ),
- array(
- 'rc_cur_id' => 0,
- 'rc_user' => $user->getId(),
- 'rc_user_text' => $user->getName(),
- 'rc_this_oldid' => 0,
- 'rc_last_oldid' => 0,
- 'rc_old_len' => null,
- 'rc_new_len' => null,
- 'rc_type' => 3,
- 'rc_logid' => 25,
- 'rc_log_type' => 'delete',
- 'rc_log_action' => 'delete'
+ false
)
);
-
- return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
}
/**
array(
array(
'title' => 'Zzz',
- 'user' => 'Mary',
+ 'user' => 'TestRecentChangesUser',
'diff' => '',
'cur' => '',
'timestamp' => '21:21',
),
$this->getContext(),
$this->getMessages(),
- $this->makeDeletedEditRecentChange(
- 'Zzz',
+ $this->testRecentChangesHelper->makeDeletedEditRecentChange(
$this->getTestUser(),
+ 'Zzz',
'20131103212153',
191, // thisid
190, // lastid
0, // counter
0 // number of watching users
),
- false,
- 'deletedrevuser'
- )
- );
- }
-
- private function makeDeletedEditRecentChange( $title, $user, $timestamp, $curid, $thisid,
- $lastid, $counter, $watchingUsers
- ) {
- $attribs = array_merge(
- $this->getDefaultAttributes( $title, $timestamp ),
- array(
- 'rc_user' => $user->getId(),
- 'rc_user_text' => $user->getName(),
- 'rc_deleted' => 5,
- 'rc_cur_id' => $curid,
- 'rc_this_oldid' => $thisid,
- 'rc_last_oldid' => $lastid
+ false
)
);
-
- return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
}
private function assertUserLinks( $user, $cacheEntry ) {
}
}
- private function makeRecentChange( $attribs, $counter, $watchingUsers ) {
- $change = new RecentChange();
- $change->setAttribs( $attribs );
- $change->counter = $counter;
- $change->numberofWatchingusers = $watchingUsers;
-
- return $change;
- }
-
- private function getDefaultAttributes( $title, $timestamp ) {
- return array(
- 'rc_id' => 545,
- 'rc_user' => 0,
- 'rc_user_text' => '127.0.0.1',
- 'rc_ip' => '127.0.0.1',
- 'rc_title' => $title,
- 'rc_namespace' => 0,
- 'rc_timestamp' => $timestamp,
- 'rc_old_len' => 212,
- 'rc_new_len' => 188,
- 'rc_comment' => '',
- 'rc_minor' => 0,
- 'rc_bot' => 0,
- 'rc_type' => 0,
- 'rc_patrolled' => 1,
- 'rc_deleted' => 0,
- 'rc_logid' => 0,
- 'rc_log_type' => null,
- 'rc_log_action' => '',
- 'rc_params' => '',
- 'rc_source' => 'mw.edit'
- );
- }
-
- private function getTestUser() {
- $user = User::newFromName( 'Mary' );
-
- if ( !$user->getId() ) {
- $user->addToDatabase();
- }
-
- return $user;
- }
-
private function getMessages() {
return array(
'cur' => 'cur',
);
}
- private function getContext() {
- $title = Title::newFromText( 'RecentChanges', NS_SPECIAL );
+ private function getTestUser() {
+ $user = User::newFromName( 'TestRecentChangesUser' );
- $context = new RequestContext();
- $context->setTitle( $title );
- $context->setLanguage( Language::factory( 'en' ) );
+ if ( !$user->getId() ) {
+ $user->addToDatabase();
+ }
+
+ return $user;
+ }
+ private function getContext() {
$user = $this->getTestUser();
- $context->setUser( $user );
+ $context = $this->testRecentChangesHelper->getTestContext( $user );
+
+ $title = Title::newFromText( 'RecentChanges', NS_SPECIAL );
+ $context->setTitle( $title );
return $context;
}
--- /dev/null
+<?php
+
+/**
+ * Helper for generating test recent changes entries.
+ *
+ * @licence GNU GPL v2+
+ * @author Katie Filbert < aude.wiki@gmail.com >
+ */
+class TestRecentChangesHelper {
+
+ public function makeEditRecentChange( User $user, $titleText, $curid, $thisid, $lastid,
+ $timestamp, $counter, $watchingUsers
+ ) {
+
+ $attribs = array_merge(
+ $this->getDefaultAttributes( $titleText, $timestamp ),
+ array(
+ 'rc_user' => $user->getId(),
+ 'rc_user_text' => $user->getName(),
+ 'rc_this_oldid' => $thisid,
+ 'rc_last_oldid' => $lastid,
+ 'rc_cur_id' => $curid
+ )
+ );
+
+ return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
+ }
+
+ public function makeLogRecentChange( $logType, User $user, $titleText, $timestamp, $counter,
+ $watchingUsers
+ ) {
+ $attribs = array_merge(
+ $this->getDefaultAttributes( $titleText, $timestamp ),
+ array(
+ 'rc_cur_id' => 0,
+ 'rc_user' => $user->getId(),
+ 'rc_user_text' => $user->getName(),
+ 'rc_this_oldid' => 0,
+ 'rc_last_oldid' => 0,
+ 'rc_old_len' => null,
+ 'rc_new_len' => null,
+ 'rc_type' => 3,
+ 'rc_logid' => 25,
+ 'rc_log_type' => $logType,
+ 'rc_log_action' => $logType,
+ 'rc_source' => 'mw.log'
+ )
+ );
+
+ return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
+ }
+
+ public function makeDeletedEditRecentChange( User $user, $titleText, $timestamp, $curid,
+ $thisid, $lastid, $counter, $watchingUsers
+ ) {
+ $attribs = array_merge(
+ $this->getDefaultAttributes( $titleText, $timestamp ),
+ array(
+ 'rc_user' => $user->getId(),
+ 'rc_user_text' => $user->getName(),
+ 'rc_deleted' => 5,
+ 'rc_cur_id' => $curid,
+ 'rc_this_oldid' => $thisid,
+ 'rc_last_oldid' => $lastid
+ )
+ );
+
+ return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
+ }
+
+ public function makeNewBotEditRecentChange( User $user, $titleText, $curid, $thisid, $lastid,
+ $timestamp, $counter, $watchingUsers
+ ) {
+
+ $attribs = array_merge(
+ $this->getDefaultAttributes( $titleText, $timestamp ),
+ array(
+ 'rc_user' => $user->getId(),
+ 'rc_user_text' => $user->getName(),
+ 'rc_this_oldid' => $thisid,
+ 'rc_last_oldid' => $lastid,
+ 'rc_cur_id' => $curid,
+ 'rc_type' => 1,
+ 'rc_bot' => 1,
+ 'rc_source' => 'mw.new'
+ )
+ );
+
+ return $this->makeRecentChange( $attribs, $counter, $watchingUsers );
+ }
+
+ private function makeRecentChange( $attribs, $counter, $watchingUsers ) {
+ $change = new RecentChange();
+ $change->setAttribs( $attribs );
+ $change->counter = $counter;
+ $change->numberofWatchingusers = $watchingUsers;
+
+ return $change;
+ }
+
+ private function getDefaultAttributes( $titleText, $timestamp ) {
+ return array(
+ 'rc_id' => 545,
+ 'rc_user' => 0,
+ 'rc_user_text' => '127.0.0.1',
+ 'rc_ip' => '127.0.0.1',
+ 'rc_title' => $titleText,
+ 'rc_namespace' => 0,
+ 'rc_timestamp' => $timestamp,
+ 'rc_old_len' => 212,
+ 'rc_new_len' => 188,
+ 'rc_comment' => '',
+ 'rc_minor' => 0,
+ 'rc_bot' => 0,
+ 'rc_type' => 0,
+ 'rc_patrolled' => 1,
+ 'rc_deleted' => 0,
+ 'rc_logid' => 0,
+ 'rc_log_type' => null,
+ 'rc_log_action' => '',
+ 'rc_params' => '',
+ 'rc_source' => 'mw.edit'
+ );
+ }
+
+ public function getTestContext( User $user ) {
+ $context = new RequestContext();
+ $context->setLanguage( Language::factory( 'en' ) );
+
+ $context->setUser( $user );
+
+ return $context;
+ }
+}
$this->setUpForeignRepo();
$fakeCallback = $this->getMock( 'RepoGroupTestHelper' );
$fakeCallback->expects( $this->once() )->method( 'callback' );
- RepoGroup::singleton()->forEachForeignRepo( array( $fakeCallback, 'callback' ), array( array() ) );
+ RepoGroup::singleton()->forEachForeignRepo(
+ array( $fakeCallback, 'callback' ), array( array() ) );
}
function testForEachForeignRepoNone() {
FileBackendGroup::destroySingleton();
$fakeCallback = $this->getMock( 'RepoGroupTestHelper' );
$fakeCallback->expects( $this->never() )->method( 'callback' );
- RepoGroup::singleton()->forEachForeignRepo( array( $fakeCallback, 'callback' ), array( array() ) );
+ RepoGroup::singleton()->forEachForeignRepo(
+ array( $fakeCallback, 'callback' ), array( array() ) );
}
private function setUpForeignRepo() {
$backend = RepoGroup::singleton()->getLocalRepo()->getBackend();
$backend->prepare( array( 'dir' => "$base/local-public/3/3a" ) );
$backend->store( array(
- 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg", 'dst' => "$base/local-public/3/3a/Foobar.jpg"
+ 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg",
+ 'dst' => "$base/local-public/3/3a/Foobar.jpg"
) );
$backend->prepare( array( 'dir' => "$base/local-public/e/ea" ) );
$backend->store( array(
- 'src' => "$IP/tests/phpunit/data/parser/wiki.png", 'dst' => "$base/local-public/e/ea/Thumb.png"
+ 'src' => "$IP/tests/phpunit/data/parser/wiki.png",
+ 'dst' => "$base/local-public/e/ea/Thumb.png"
) );
$backend->prepare( array( 'dir' => "$base/local-public/0/09" ) );
$backend->store( array(
- 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg", 'dst' => "$base/local-public/0/09/Bad.jpg"
+ 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg",
+ 'dst' => "$base/local-public/0/09/Bad.jpg"
) );
$backend->prepare( array( 'dir' => "$base/local-public/5/5f" ) );
$backend->store( array(
- 'src' => "$IP/tests/phpunit/data/parser/LoremIpsum.djvu", 'dst' => "$base/local-public/5/5f/LoremIpsum.djvu"
+ 'src' => "$IP/tests/phpunit/data/parser/LoremIpsum.djvu",
+ 'dst' => "$base/local-public/5/5f/LoremIpsum.djvu"
) );
// No helpful SVG file to copy, so make one ourselves
<?php
-// We will use this class with getMockForAbstractClass to create a concrete mock class. That call will die if the
-// contructor is not public, unless we use disableOriginalConstructor(), in which case we could not test the constructor.
+// We will use this class with getMockForAbstractClass to create a concrete mock class.
+// That call will die if the contructor is not public, unless we use disableOriginalConstructor(),
+// in which case we could not test the constructor.
abstract class PoolCounterAbstractMock extends PoolCounter {
public function __construct() {
call_user_func_array( 'parent::__construct', func_get_args() );
$poolCounter = $this->getMockBuilder( 'PoolCounterAbstractMock' )
->setConstructorArgs( array( $poolCounterConfig, 'testCounter', 'someKey' ) )
- // don't mock anything - the proper syntax would be setMethods(null), but due to a PHPUnit bug that
- // does not work with getMockForAbstractClass()
+ // don't mock anything - the proper syntax would be setMethods(null), but due
+ // to a PHPUnit bug that does not work with getMockForAbstractClass()
->setMethods( array( 'idontexist' ) )
->getMockForAbstractClass();
$this->assertInstanceOf( 'PoolCounter', $poolCounter );
public function testHashKeyIntoSlots() {
$poolCounter = $this->getMockBuilder( 'PoolCounterAbstractMock' )
- // don't mock anything - the proper syntax would be setMethods(null), but due to a PHPUnit bug that
- // does not work with getMockForAbstractClass()
+ // don't mock anything - the proper syntax would be setMethods(null), but due
+ // to a PHPUnit bug that does not work with getMockForAbstractClass()
->setMethods( array( 'idontexist' ) )
->disableOriginalConstructor()
->getMockForAbstractClass();
class TestFileIterator implements Iterator {
private $file;
private $fh;
- private $parserTest; /* An instance of ParserTest (parserTests.php) or MediaWikiParserTest (phpunit) */
+ /**
+ * @var ParserTest|MediaWikiParserTest An instance of ParserTest (parserTests.php)
+ * or MediaWikiParserTest (phpunit)
+ */
+ private $parserTest;
private $index = 0;
private $test;
private $section = null;
$this->checkSection( 'text' );
$this->checkSection( 'article' );
- $this->parserTest->addArticle( ParserTest::chomp( $this->sectionData['article'] ), $this->sectionData['text'], $this->lineNum );
+ $this->parserTest->addArticle(
+ ParserTest::chomp( $this->sectionData['article'] ),
+ $this->sectionData['text'], $this->lineNum );
$this->clearSection();
}
if ( $input == false || $result == false ||
- ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] ) && !$this->parserTest->runDisabled )
- || ( preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] ) && $result != 'html/php' && !$this->parserTest->runParsoid )
+ ( ( preg_match( '/\\bdisabled\\b/i', $this->sectionData['options'] )
+ && !$this->parserTest->runDisabled )
+ || ( preg_match( '/\\bparsoid\\b/i', $this->sectionData['options'] )
+ && $result != 'html/php' && !$this->parserTest->runParsoid )
|| !preg_match( "/" . $this->parserTest->regex . "/i", $this->sectionData['test'] ) )
) {
# disabled test
}
if ( isset( $this->sectionData[$this->section] ) ) {
- throw new MWException( "duplicate section '$this->section' at line {$this->lineNum} of $this->file\n" );
+ throw new MWException( "duplicate section '$this->section' "
+ . "at line {$this->lineNum} of $this->file\n" );
}
$this->sectionData[$this->section] = '';
*/
public function unleash( &$parserTest ) {
if ( !( $parserTest instanceof ParserTest || $parserTest instanceof NewParserTest ) ) {
- throw new MWException( __METHOD__ . " must be passed an instance of ParserTest or NewParserTest classes\n" );
+ throw new MWException( __METHOD__ . " must be passed an instance of ParserTest or "
+ . "NewParserTest classes\n" );
}
# Trigger delayed hooks. Any failure will make us abort
$errorHtml = false;
// guard thumbnail rendering with PoolCounter to avoid stampedes
- // expensive files use a separate PoolCounter config so it is possible to set up a global limit on them
+ // expensive files use a separate PoolCounter config so it is possible
+ // to set up a global limit on them
if ( $file->isExpensiveToThumbnail() ) {
$poolCounterType = 'FileRenderExpensive';
} else {
$repo = RepoGroup::singleton()->getLocalRepo();
$hashDirReg = $subdirReg = '';
- for ( $i = 0; $i < $repo->getHashLevels(); $i++ ) {
+ $hashLevels = $repo->getHashLevels();
+ for ( $i = 0; $i < $hashLevels; $i++ ) {
$subdirReg .= '[0-9a-f]';
$hashDirReg .= "$subdirReg/";
}