/**
* Get parser options suitable for rendering the primary article wikitext
- * @return ParserOptions|bool
+ * @return ParserOptions
*/
public function getParserOptions() {
global $wgUser;
* This first argument used to be an User object.
*
* @deprecated in 1.18; use newFromContext() instead
- * @param $unused
+ * @param $unused string|User Unused
* @return ChangesList|EnhancedChangesList|OldChangesList derivative
*/
public static function newFromUser( $unused ) {
* This is a wrapper around newFromId().
*
* @param $user User
- * @return ExternalUser|bool
+ * @return ExternalUser|bool False on failure
*/
public static function newFromUser( $user ) {
global $wgExternalAuthType;
/**
* Get the text for the submit button, either customised or a default.
- * @return
+ * @return string
*/
function getSubmitText() {
return $this->mSubmitText
/**
* This REALLY should be protected... but it's public for compatibility
*
- * @param $errno
+ * @param $errno int Unused
* @param $errstr String: error message
* @return Boolean: false
*/
/**
* Notify the callback function of a revision
- * @param $revision |WikiRevision object
+ * @param $revision WikiRevision object
* @return bool|mixed
*/
private function revisionCallback( $revision ) {
*
* @param $text string
*
- * @return string|bool
+ * @return string|bool False on failure
*/
public function matchStartToEnd( $text ) {
$hash = $this->getHash();
*
* @param $text string
*
- * @return int|bool
+ * @return int|bool False on failure
*/
public function matchStartAndRemove( &$text ) {
$regexes = $this->getRegexStart();
* If false is given, the title will be treated as non-existing.
*
* @param $row Object|bool database row
- * @return void
*/
public function loadFromRow( $row ) {
if ( $row ) { // page found
* address if it was already confirmed.
*
* @note Call saveSettings() after calling this function to commit the change.
- * @return bool
+ * @return bool Returns true
*/
function invalidateEmail() {
$this->load();
* Get a request header, or false if it isn't set
* @param $name String: case-insensitive header name
*
- * @return string|bool
+ * @return string|bool False on failure
*/
public function getHeader( $name ) {
$this->initHeaders();
* 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
- * @return String|bool The text of the current revision
+ * @return String|bool The text of the current revision. False on failure
*/
public function getText( $audience = Revision::FOR_PUBLIC ) {
$this->loadLastEdit();
/**
* Get the text of the current revision. No side-effects...
*
- * @return String|bool The text of the current revision
+ * @return String|bool The text of the current revision. False on failure
*/
public function getRawText() {
$this->loadLastEdit();
* @param $title String: Message cache key with initial uppercase letter.
* @param $code String: code denoting the language to try.
*
- * @return string|bool
+ * @return string|bool False on failure
*/
function getMsgFromNamespace( $title, $code ) {
global $wgAdaptiveMessageCache;
* @param $table string
* @param $index string
* @param $fname string
- * @return bool|array
+ * @return bool|array|null False or null on failure
*/
function indexInfo( $table, $index, $fname = 'DatabaseMysql::indexInfo' ) {
# SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
/**
* Check if the searchindext table is FTS enabled.
- * @return bool if not enabled.
+ * @return bool False if not enabled.
*/
function checkForEnabledSearch() {
if ( self::$fulltextEnabled === null ) {
* Get information about a given field
* Returns false if the field does not exist.
*
- * @return SQLiteField|bool
+ * @param $table string
+ * @param $field string
+ * @return SQLiteField|bool False on failure
*/
function fieldInfo( $table, $field ) {
$tableName = $this->tableName( $table );
* Returns false if there is no connection open
*
* @param $i int
- * @return DatabaseBase|bool
+ * @return DatabaseBase|bool False on failure
*/
function getAnyOpenConnection( $i ) {
foreach ( $this->mConns as $conns ) {
*
* $diff = new Diff($lines1, $lines2);
* $rev = $diff->reverse();
- * @return object object A Diff object representing the inverse of the
+ * @return Object A Diff object representing the inverse of the
* original diff.
*/
function reverse() {
* private: If true, return restricted (deleted) files if the current
* user is allowed to view them. Otherwise, such files will not
* be found.
- * @return File|bool
+ * @return File|bool False on failure
*/
public function findFile( $title, $options = array() ) {
$title = File::normalizeTitle( $title );
*
* @param $sha1 String base 36 SHA-1 hash
* @param $options array Option array, same as findFile().
- * @return File|bool
+ * @return File|bool False on failure
*/
public function findFileFromKey( $sha1, $options = array() ) {
$time = isset( $options['time'] ) ? $options['time'] : false;
/**
* Get the public root URL of the repository
*
- * @return string|bool
+ * @return string
*/
public function getRootUrl() {
return $this->url;
*
* @param $query mixed Query string to append
* @param $entry string Entry point; defaults to index
- * @return string|bool
+ * @return string|bool False on failure
*/
public function makeUrl( $query = '', $entry = 'index' ) {
if ( isset( $this->scriptDirUrl ) ) {
/**
* Get the URL of the stylesheet to apply to description pages
*
- * @return string|bool
+ * @return string|bool False on failure
*/
public function getDescriptionStylesheetUrl() {
if ( isset( $this->scriptDirUrl ) ) {
* Get the timestamp of a file with a given virtual URL/storage path
*
* @param $virtualUrl string
- * @return string|bool
+ * @return string|bool False on failure
*/
public function getFileTimestamp( $virtualUrl ) {
$path = $this->resolveToStoragePath( $virtualUrl );
/**
* @see FileBackend::getFileSha1Base36()
- * @return bool
+ * @return bool|string
*/
final public function getFileSha1Base36( array $params ) {
wfProfileIn( __METHOD__ );
*
* @param $source string Storage path
* @param $predicates Array
- * @return string|bool
+ * @return string|bool False on failure
*/
final protected function fileSha1( $source, array $predicates ) {
if ( isset( $predicates['sha1'][$source] ) ) {
/**
* Get a connection to the Swift proxy
*
- * @return CF_Connection|bool
+ * @return CF_Connection|bool False on failure
* @throws InvalidResponseException
*/
protected function getConnection() {
/**
* Loads a file object from the filearchive table
- * @return bool on success or null
+ * @return bool|null True on success or null
*/
public function load() {
if ( $this->dataLoaded ) {
var $repo;
/**
- * @var Title|bool
+ * @var Title
*/
var $title;
var $lastError, $redirected, $redirectedTitle;
/**
- * @var FSFile|bool
+ * @var FSFile|bool False if undefined
*/
protected $fsFile;
/**
* Return the associated title object
*
- * @return Title|bool
+ * @return Title
*/
public function getTitle() {
return $this->title;
}
/**
- * Return the storage path to the file. Note that this does
- * not mean that a file actually exists under that location.
- *
- * This path depends on whether directory hashing is active or not,
- * i.e. whether the files are all found in the same directory,
- * or in hashed paths like /images/3/3c.
- *
- * Most callers don't check the return value, but ForeignAPIFile::getPath
- * returns false.
+ * Return the storage path to the file. Note that this does
+ * not mean that a file actually exists under that location.
+ *
+ * This path depends on whether directory hashing is active or not,
+ * i.e. whether the files are all found in the same directory,
+ * or in hashed paths like /images/3/3c.
+ *
+ * Most callers don't check the return value, but ForeignAPIFile::getPath
+ * returns false.
*
- * @return string|bool
+ * @return string|bool ForeignAPIFile::getPath can return false
*/
public function getPath() {
if ( !isset( $this->path ) ) {
* Returns false on failure. Callers must not alter the file.
* Temporary files are cleared automatically.
*
- * @return string|bool
+ * @return string|bool False on failure
*/
public function getLocalRefPath() {
$this->assertRepoDefined();
*
* @param $page int
*
- * @return bool|number
+ * @return bool|number False on failure
*/
public function getHeight( $page = 1 ) {
return false;
* @param $params Array: an associative array of handler-specific parameters.
* Typical keys are width, height and page.
* @param $flags Integer: a bitfield, may contain self::RENDER_NOW to force rendering
- * @return MediaTransformOutput|bool
+ * @return MediaTransformOutput|bool False on failure
*/
function transform( $params, $flags = 0 ) {
global $wgUseSquid, $wgIgnoreImageErrors, $wgThumbnailEpoch;
/**
* Get all thumbnail names previously generated for this file
- * @param $archiveName string|bool Name of an archive file
+ * @param $archiveName string|bool Name of an archive file, default false
* @return array first element is the base dir, then files in that base dir.
*/
function getThumbnails( $archiveName = false ) {
*
* @param $dstPath string The location of the suspect file
* @param $retval int Return value of some shell process, file will be deleted if this is non-zero
- * @return bool if removed, false otherwise
+ * @return bool True if removed, false otherwise
*/
function removeBadFile( $dstPath, $retval = 0 ) {
if( file_exists( $dstPath ) ) {
* @param $srcWidth Integer: width of the source image
* @param $srcHeight Integer: height of the source image
* @param $mimeType
- * @return bool to indicate that an error should be returned to the user.
+ * @return bool False to indicate that an error should be returned to the user.
*/
function validateThumbParams( &$width, &$height, $srcWidth, $srcHeight, $mimeType ) {
$width = intval( $width );
* Retrieve the ParserOutput from ParserCache, even if it's outdated.
* @param $article Article
* @param $popts ParserOptions
- * @return ParserOutput|bool
+ * @return ParserOutput|bool False on failure
*/
public function getDirty( $article, $popts ) {
$value = $this->get( $article, $popts, true );
* @param $popts ParserOptions
* @param $useOutdated
*
- * @return ParserOutput|bool
+ * @return ParserOutput|bool False on failure
*/
public function get( $article, $popts, $useOutdated = false ) {
global $wgCacheEpoch;
/*************************************************************************************************/
+ /**
+ * @param $sidebar array
+ */
protected function renderPortals( $sidebar ) {
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
}
/*************************************************************************************************/
+ /**
+ * @param $bar string
+ * @param $cont array|string
+ */
function customBox( $bar, $cont ) {
$portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
$tooltip = Linker::titleAttrib( "p-$bar" );
}
}
+ /**
+ * @param $name string
+ * @param $content array
+ * @param $msg null|string
+ * @param $hook null|string|array
+ */
private function renderPortal( $name, $content, $msg = null, $hook = null ) {
if ( $msg === null ) {
$msg = $name;