* Get the copyright warning
*
* Renamed to getCopyrightWarning(), old name kept around for backwards compatibility
+ * @return string
*/
protected function getCopywarn() {
return self::getCopyrightWarning( $this->mTitle );
* @param string $name Name attribute
* @param bool $checked Whether the checkbox is checked or not
* @param array $attribs Array of additional attributes
+ * @return string
*/
public static function check( $name, $checked = false, array $attribs = array() ) {
if ( isset( $attribs['value'] ) ) {
* @param string $name Name attribute
* @param bool $checked Whether the checkbox is checked or not
* @param array $attribs Array of additional attributes
+ * @return string
*/
public static function radio( $name, $checked = false, array $attribs = array() ) {
if ( isset( $attribs['value'] ) ) {
* @param string $label Contents of the label
* @param string $id ID of the element being labeled
* @param array $attribs Additional attributes
+ * @return string
*/
public static function label( $label, $id, array $attribs = array() ) {
$attribs += array(
/**
* Get a 2-d hashtable for this array
+ * @return array
*/
function getHash() {
if ( is_null( $this->hash ) ) {
/**
* Get the base regex
+ * @return array
*/
function getBaseRegex() {
if ( is_null( $this->baseRegex ) ) {
/**
* Get an unanchored regex that does not match parameters
+ * @return array
*/
function getRegex() {
if ( is_null( $this->regex ) ) {
* Regular expression to match HTML/XML attribute pairs within a tag.
* Allows some... latitude.
* Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes
+ * @return string
*/
static function getAttribsRegex() {
if ( self::$attribsRegex === null ) {
/**
* Check permissions
* @param string $what 'viewmywatchlist' or 'editmywatchlist'
+ * @return bool
*/
private function isAllowed( $what ) {
return !$this->mCheckRights || $this->mUser->isAllowed( $what );
/**
* Get the contents of the buffer.
+ * @return string
*/
public function getBuffer() {
return $this->mBuffer;
/**
* @param Content $content
* @param string $what Identifies the content in error messages, e.g. page title.
+ * @return Content|bool
*/
private function getSectionContent( Content $content, $what ) {
// Not cached (save or load)
*
* @param string $code
* @param array $deps
+ * @return array
*/
protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
global $IP;
/**
* Generate the feed items given a row from the database.
* @param object $rows DatabaseBase resource with recentchanges rows
+ * @return array
*/
public static function buildItems( $rows ) {
wfProfileIn( __METHOD__ );
/**
* @since 1.19
+ * @return string
*/
public function __toString() {
return (string)$this->mConn;
* Give an id for the connection
*
* mysql driver used resource id, but mysqli objects cannot be cast to string.
+ * @return string
*/
public function __toString() {
if ( $this->mConn instanceof Mysqli ) {
/**
* @since 1.19
+ * @return bool|mixed
*/
function defaultValue() {
if ( $this->has_default ) {
* If you're using a real search engine, you'll probably want to override
* this behavior and do something nicer with the original wikitext.
* @param string $text
+ * @return string
*/
public static function updateText( $text ) {
global $wgContLang;
/**
* Create a repo class based on an info structure
* @param array $info
+ * @return FileRepo
*/
protected function newRepo( $info ) {
$class = $info['class'];
/**
* Returns the number of pages of a multipage document, or false for
* documents which aren't multipage documents
+ * @return bool|int
*/
function pageCount() {
if ( !isset( $this->pageCount ) ) {
/**
* Get last thumbnailing error.
* Largely obsolete.
+ * @return string
*/
function getLastError() {
return $this->lastError;
*
* @param string|bool $mode Mode to use. False to use the default
* @param IContextSource|null $context
+ * @return ImageGalleryBase
* @throws MWException
*/
static function factory( $mode = false, IContextSource $context = null ) {
/**
* Add javascript which auto-justifies the rows by manipulating the image sizes.
* Also ensures that the hover version of this degrades gracefully.
+ * @return array
*/
protected function getModules() {
return array( 'mediawiki.page.gallery' );
/**
* Updates the timestamps in the transcache table
+ * @return bool
*/
protected function doUpdateTranscacheField() {
if ( $this->updateRowExists( 'convert transcache field' ) ) {
/**
* Environment check for register_globals.
* Prevent installation if enabled
+ * @return bool
*/
protected function envCheckRegisterGlobals() {
if ( wfIniGetBool( 'register_globals' ) ) {
/**
* Get the comment from the last addEntry() call
+ * @return string
*/
public function getComment() {
return $this->comment;
/**
* Get $this->mFilteredExifData
+ * @return array
*/
function getFilteredData() {
return $this->mFilteredExifData;
* raw WikiPage fields for backwards compatibility.
*
* @param string $fname Field name
+ * @return mixed
*/
public function __get( $fname ) {
if ( property_exists( $this->mPage, $fname ) ) {
/**
* Save space for for serialization by removing useless values
+ * @return array
*/
public function __sleep() {
return array_diff(
* the target is category or image, leave it
*
* @param array $matches
+ * @return string
*/
function linkReplace( $matches ) {
$colon = strpos( $matches[1], ':' );
* However this version should be no more expensive then
* Special:MostLinked, which seems to get handled fine
* with however we are doing cached special pages.
+ * @return array
*/
function getQueryInfo() {
return array(
* @param int $offset
* @param int $limit
* @param bool $asc
+ * @return array
*/
function reallyDoQuery( $offset, $limit, $asc ) {
$prevTableName = $this->mTableName;
* that this report gives results in a logical order). As an aditional
* note, mysql seems to by default order things by img_name ASC, which
* is what we ideally want, so everything works out fine anyhow.
+ * @return array
*/
function getOrderFields() {
return array();
/**
*
* @param array $data
+ * @return bool
*/
public function onSubmit( array $data ) {
$title = Title::newFromText( $data['pagename'] );
/**
* Display appropriate message if there's nothing to do.
* The submit button is also suppressed in this case (see alterForm()).
+ * @return array
*/
protected function getFormFields() {
$user = $this->getUser();
/**
* Are we running on Windows?
+ * @return bool
*/
protected function isWindows() {
return substr( php_uname(), 0, 7 ) == 'Windows';
/**
* Initialize an initial random state based off of whatever we can find
+ * @return string
*/
protected function initialRandomState() {
// $_SERVER contains a variety of unstable user and system specific information