Change-Id: I897d5833cdaf7dc2d3bca5bb5551958611f22bd9
32 files changed:
* @author Rob Church <robchur@gmail.com>
*/
abstract class ImageQueryPage extends QueryPage {
* @author Rob Church <robchur@gmail.com>
*/
abstract class ImageQueryPage extends QueryPage {
/**
* Format and output report results using the given information plus
* OutputPage
*
/**
* Format and output report results using the given information plus
* OutputPage
*
- * @param $out OutputPage to print to
- * @param $skin Skin: user skin to use [unused]
- * @param $dbr DatabaseBase (read) connection to use
- * @param $res Integer: result pointer
- * @param $num Integer: number of available result rows
- * @param $offset Integer: paging offset
+ * @param OutputPage $out OutputPage to print to
+ * @param Skin $skin User skin to use [unused]
+ * @param DatabaseBase $dbr (read) connection to use
+ * @param int $res Result pointer
+ * @param int $num Number of available result rows
+ * @param int $offset Paging offset
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
if( $num > 0 ) {
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
if( $num > 0 ) {
/**
* Get additional HTML to be shown in a results' cell
*
/**
* Get additional HTML to be shown in a results' cell
*
- * @param $row Object: result row
- * @return String
+ * @param object $row Result row
+ * @return string
*/
protected function getCellHtml( $row ) {
return '';
}
*/
protected function getCellHtml( $row ) {
return '';
}
* @ingroup SpecialPage
*/
abstract class PageQueryPage extends QueryPage {
* @ingroup SpecialPage
*/
abstract class PageQueryPage extends QueryPage {
/**
* Format the result as a simple link to the page
*
/**
* Format the result as a simple link to the page
*
- * @param $skin Skin
- * @param $row Object: result row
+ * @param Skin $skin
+ * @param object $row Result row
* @return string
*/
public function formatResult( $skin, $row ) {
* @return string
*/
public function formatResult( $skin, $row ) {
/**
* The offset and limit in use, as passed to the query() function
*
/**
* The offset and limit in use, as passed to the query() function
*
*/
var $offset = 0;
var $limit = 0;
*/
var $offset = 0;
var $limit = 0;
/**
* A mutator for $this->listoutput;
*
/**
* A mutator for $this->listoutput;
*
*/
function setListoutput( $bool ) {
$this->listoutput = $bool;
*/
function setListoutput( $bool ) {
$this->listoutput = $bool;
/**
* Override to sort by increasing values
*
/**
* Override to sort by increasing values
*
*/
function sortDescending() {
return true;
*/
function sortDescending() {
return true;
* don't let it run in miser mode. $wgDisableQueryPages causes all query
* pages to be declared expensive. Some query pages are always expensive.
*
* don't let it run in miser mode. $wgDisableQueryPages causes all query
* pages to be declared expensive. Some query pages are always expensive.
*
*/
function isExpensive() {
global $wgDisableQueryPages;
*/
function isExpensive() {
global $wgDisableQueryPages;
* Is the output of this query cacheable? Non-cacheable expensive pages
* will be disabled in miser mode and will not have their results written
* to the querycache table.
* Is the output of this query cacheable? Non-cacheable expensive pages
* will be disabled in miser mode and will not have their results written
* to the querycache table.
* @since 1.18
*/
public function isCacheable() {
* @since 1.18
*/
public function isCacheable() {
* Whether or not the output of the page in question is retrieved from
* the database cache.
*
* Whether or not the output of the page in question is retrieved from
* the database cache.
*
*/
function isCached() {
global $wgMiserMode;
*/
function isCached() {
global $wgMiserMode;
/**
* Sometime we don't want to build rss / atom feeds.
*
/**
* Sometime we don't want to build rss / atom feeds.
*
*/
function isSyndicated() {
return true;
*/
function isSyndicated() {
return true;
* skin; you can use it for making links. The result is a single row of
* result data. You should be able to grab SQL results off of it.
* If the function returns false, the line output will be skipped.
* skin; you can use it for making links. The result is a single row of
* result data. You should be able to grab SQL results off of it.
* If the function returns false, the line output will be skipped.
- * @param $skin Skin
- * @param $result object Result row
- * @return mixed String or false to skip
- *
- * @param $skin Skin object
- * @param $result Object: database row
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string|bool String or false to skip
*/
abstract function formatResult( $skin, $result );
/**
* The content returned by this function will be output before any result
*
*/
abstract function formatResult( $skin, $result );
/**
* The content returned by this function will be output before any result
*
*/
function getPageHeader() {
return '';
*/
function getPageHeader() {
return '';
* as an associative array. They will be encoded and added to the paging
* links (prev/next/lengths).
*
* as an associative array. They will be encoded and added to the paging
* links (prev/next/lengths).
*
*/
function linkParameters() {
return array();
*/
function linkParameters() {
return array();
/**
* Clear the cache and save new results
*
/**
* Clear the cache and save new results
*
- * @param $limit Integer: limit for SQL statement
- * @param $ignoreErrors Boolean: whether to ignore database errors
+ * @param int|bool $limit Limit for SQL statement
+ * @param bool $ignoreErrors Whether to ignore database errors
+ * @throws DBError|Exception
* @return bool|int
*/
function recache( $limit, $ignoreErrors = true ) {
* @return bool|int
*/
function recache( $limit, $ignoreErrors = true ) {
/**
* Run the query and return the result
/**
* Run the query and return the result
- * @param $limit mixed Numerical limit or false for no limit
- * @param $offset mixed Numerical offset or false for no offset
+ * @param int|bool $limit Numerical limit or false for no limit
+ * @param int|bool $offset Numerical offset or false for no offset
* @return ResultWrapper
* @since 1.18
*/
* @return ResultWrapper
* @since 1.18
*/
$dbr = wfGetDB( DB_SLAVE );
$query = $this->getQueryInfo();
$order = $this->getOrderFields();
$dbr = wfGetDB( DB_SLAVE );
$query = $this->getQueryInfo();
$order = $this->getOrderFields();
if ( $this->sortDescending() ) {
foreach ( $order as &$field ) {
$field .= ' DESC';
}
}
if ( $this->sortDescending() ) {
foreach ( $order as &$field ) {
$field .= ' DESC';
}
}
if ( is_array( $query ) ) {
$tables = isset( $query['tables'] ) ? (array)$query['tables'] : array();
$fields = isset( $query['fields'] ) ? (array)$query['fields'] : array();
$conds = isset( $query['conds'] ) ? (array)$query['conds'] : array();
$options = isset( $query['options'] ) ? (array)$query['options'] : array();
$join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array();
if ( is_array( $query ) ) {
$tables = isset( $query['tables'] ) ? (array)$query['tables'] : array();
$fields = isset( $query['fields'] ) ? (array)$query['fields'] : array();
$conds = isset( $query['conds'] ) ? (array)$query['conds'] : array();
$options = isset( $query['options'] ) ? (array)$query['options'] : array();
$join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array();
if ( count( $order ) ) {
$options['ORDER BY'] = $order;
}
if ( count( $order ) ) {
$options['ORDER BY'] = $order;
}
if ( $limit !== false ) {
$options['LIMIT'] = intval( $limit );
}
if ( $limit !== false ) {
$options['LIMIT'] = intval( $limit );
}
if ( $offset !== false ) {
$options['OFFSET'] = intval( $offset );
}
if ( $offset !== false ) {
$options['OFFSET'] = intval( $offset );
}
$sql = $dbr->limitResult( $sql, $limit, $offset );
$res = $dbr->query( $sql, $fname );
}
$sql = $dbr->limitResult( $sql, $limit, $offset );
$res = $dbr->query( $sql, $fname );
}
return $dbr->resultObject( $res );
}
/**
* Somewhat deprecated, you probably want to be using execute()
return $dbr->resultObject( $res );
}
/**
* Somewhat deprecated, you probably want to be using execute()
+ * @param int|bool $offset
+ * @oaram int|bool $limit
* @return ResultWrapper
*/
function doQuery( $offset = false, $limit = false ) {
* @return ResultWrapper
*/
function doQuery( $offset = false, $limit = false ) {
/**
* Fetch the query results from the query cache
/**
* Fetch the query results from the query cache
- * @param $limit mixed Numerical limit or false for no limit
- * @param $offset mixed Numerical offset or false for no offset
+ * @param int|bool $limit Numerical limit or false for no limit
+ * @param int|bool $offset Numerical offset or false for no offset
* @return ResultWrapper
* @since 1.18
*/
* @return ResultWrapper
* @since 1.18
*/
/**
* This is the actual workhorse. It does everything needed to make a
* real, honest-to-gosh query page.
/**
* This is the actual workhorse. It does everything needed to make a
* real, honest-to-gosh query page.
* @return int
*/
function execute( $par ) {
* @return int
*/
function execute( $par ) {
* Format and output report results using the given information plus
* OutputPage
*
* Format and output report results using the given information plus
* OutputPage
*
- * @param $out OutputPage to print to
- * @param $skin Skin: user skin to use
- * @param $dbr Database (read) connection to use
- * @param $res Integer: result pointer
- * @param $num Integer: number of available result rows
- * @param $offset Integer: paging offset
+ * @param OutputPage $out OutputPage to print to
+ * @param Skin $skin User skin to use
+ * @param DatabaseBase $dbr Database (read) connection to use
+ * @param int $res Result pointer
+ * @param int $num Number of available result rows
+ * @param int $offset Paging offset
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
global $wgContLang;
*/
protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) {
global $wgContLang;
/**
* Do any necessary preprocessing of the result object.
/**
* Do any necessary preprocessing of the result object.
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {}
/**
* Similar to above, but packaging in a syndicated feed instead of a web page
*/
function preprocessResults( $db, $res ) {}
/**
* Similar to above, but packaging in a syndicated feed instead of a web page
+ * @param string $class
+ * @param int $limit
* @return bool
*/
function doFeed( $class = '', $limit = 50 ) {
* @return bool
*/
function doFeed( $class = '', $limit = 50 ) {
/**
* Override for custom handling. If the titles/links are ok, just do
* feedItemDesc()
/**
* Override for custom handling. If the titles/links are ok, just do
* feedItemDesc()
* @return FeedItem|null
*/
function feedResult( $row ) {
* @return FeedItem|null
*/
function feedResult( $row ) {
* WantedPages, WantedTemplates, etc
*/
abstract class WantedQueryPage extends QueryPage {
* WantedPages, WantedTemplates, etc
*/
abstract class WantedQueryPage extends QueryPage {
function isExpensive() {
return true;
}
function isExpensive() {
return true;
}
/**
* Cache page existence for performance
/**
* Cache page existence for performance
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
/**
* Format an individual result
*
/**
* Format an individual result
*
- * @param $skin Skin to use for UI elements
- * @param $result Result row
+ * @param Skin $skin Skin to use for UI elements
+ * @param object $result Result row
* @return string
*/
public function formatResult( $skin, $result ) {
* @return string
*/
public function formatResult( $skin, $result ) {
/**
* Make a "what links here" link for a given title
*
/**
* Make a "what links here" link for a given title
*
- * @param $title Title to make the link for
- * @param $result Object: result row
+ * @param Title $title Title to make the link for
+ * @param object $result Result row
* @return string
*/
private function makeWlhLink( $title, $result ) {
* @return string
*/
private function makeWlhLink( $title, $result ) {
* @ingroup SpecialPage
*/
class SpecialAllmessages extends SpecialPage {
* @ingroup SpecialPage
*/
class SpecialAllmessages extends SpecialPage {
/**
* @var AllmessagesTablePager
*/
/**
* @var AllmessagesTablePager
*/
* getting data from a table when in fact not all of it comes from the database.
*/
class AllmessagesTablePager extends TablePager {
* getting data from a table when in fact not all of it comes from the database.
*/
class AllmessagesTablePager extends TablePager {
protected $filter, $prefix, $langcode, $displayPrefix;
public $mLimitsShown;
protected $filter, $prefix, $langcode, $displayPrefix;
public $mLimitsShown;
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
global $wgContLang;
function formatResult( $skin, $result ) {
global $wgContLang;
public static function validateTarget( $value, User $user ) {
global $wgBlockCIDRLimit;
public static function validateTarget( $value, User $user ) {
global $wgBlockCIDRLimit;
+ /** @var User $target */
list( $target, $type ) = self::getTargetAndType( $value );
$status = Status::newGood( $target );
list( $target, $type ) = self::getTargetAndType( $value );
$status = Status::newGood( $target );
# can come from it
$data['Confirm'] = !in_array( $data['Confirm'], array( '', '0', null, false ), true );
# can come from it
$data['Confirm'] = !in_array( $data['Confirm'], array( '', '0', null, false ), true );
+ /** @var User $target */
list( $target, $type ) = self::getTargetAndType( $data['Target'] );
if ( $type == Block::TYPE_USER ) {
$user = $target;
list( $target, $type ) = self::getTargetAndType( $data['Target'] );
if ( $type == Block::TYPE_USER ) {
$user = $target;
/**
* Do a LinkBatch query to minimise database load when generating all these links
/**
* Do a LinkBatch query to minimise database load when generating all these links
+ * @param ResultWrapper $result
*/
function preprocessResults( $result ) {
wfProfileIn( __METHOD__ );
*/
function preprocessResults( $result ) {
wfProfileIn( __METHOD__ );
- * @param $skin Skin
- * @param $result
- * @return String
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
*/
function formatResult( $skin, $result ) {
$fromObj = Title::makeTitle( $result->namespace, $result->title );
*/
function formatResult( $skin, $result ) {
$fromObj = Title::makeTitle( $result->namespace, $result->title );
* @ingroup SpecialPage
*/
class DisambiguationsPage extends QueryPage {
* @ingroup SpecialPage
*/
class DisambiguationsPage extends QueryPage {
function __construct( $name = 'Disambiguations' ) {
parent::__construct( $name );
}
function __construct( $name = 'Disambiguations' ) {
parent::__construct( $name );
}
$set = 'FALSE';
wfDebug( "Mediawiki:disambiguationspage message does not link to any templates!\n" );
}
$set = 'FALSE';
wfDebug( "Mediawiki:disambiguationspage message does not link to any templates!\n" );
}
/**
* Fetch links and cache their existence
*
/**
* Fetch links and cache their existence
*
- * @param $db DatabaseBase
- * @param $res
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$title = Title::newFromID( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
function formatResult( $skin, $result ) {
$title = Title::newFromID( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
* @ingroup SpecialPage
*/
class DoubleRedirectsPage extends QueryPage {
* @ingroup SpecialPage
*/
class DoubleRedirectsPage extends QueryPage {
function __construct( $name = 'DoubleRedirects' ) {
parent::__construct( $name );
}
function __construct( $name = 'DoubleRedirects' ) {
parent::__construct( $name );
}
'rb.rd_from = pb.page_id',
)
);
'rb.rd_from = pb.page_id',
)
);
if ( $limitToTitle ) {
$retval['conds']['pa.page_namespace'] = $namespace;
$retval['conds']['pa.page_title'] = $title;
}
if ( $limitToTitle ) {
$retval['conds']['pa.page_namespace'] = $namespace;
$retval['conds']['pa.page_title'] = $title;
}
return array ( 'ra.rd_namespace', 'ra.rd_title' );
}
return array ( 'ra.rd_namespace', 'ra.rd_title' );
}
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$titleA = Title::makeTitle( $result->namespace, $result->title );
function formatResult( $skin, $result ) {
$titleA = Title::makeTitle( $result->namespace, $result->title );
- * @param $skin Skin object
- * @param $result Object: database row
+ * @param Skin $skin
+ * @param object $result Database row
* @return String
*/
function formatResult( $skin, $result ) {
* @return String
*/
function formatResult( $skin, $result ) {
/**
* Fetch dupes from all connected file repositories.
*
/**
* Fetch dupes from all connected file repositories.
*
- * @return Array of File objects
+ * @return array of File objects
*/
function getDupes() {
return RepoGroup::singleton()->findBySha1( $this->hash );
*/
function getDupes() {
return RepoGroup::singleton()->findBySha1( $this->hash );
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$title = Title::makeTitle( $result->namespace, $result->title );
$url = $result->url;
function formatResult( $skin, $result ) {
$title = Title::makeTitle( $result->namespace, $result->title );
$url = $result->url;
/**
* Cache page existence for performance
*
/**
* Cache page existence for performance
*
- * @param $db DatabaseBase
- * @param $res ResultWrapper
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
$batch = new LinkBatch;
*/
function preprocessResults( $db, $res ) {
$batch = new LinkBatch;
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
# Make a link to the redirect itself
$rd_title = Title::makeTitle( $result->namespace, $result->title );
function formatResult( $skin, $result ) {
# Make a link to the redirect itself
$rd_title = Title::makeTitle( $result->namespace, $result->title );
parent::execute( $par );
}
parent::execute( $par );
}
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
global $wgContLang;
function formatResult( $skin, $result ) {
global $wgContLang;
* @ingroup SpecialPage
*/
class MostcategoriesPage extends QueryPage {
* @ingroup SpecialPage
*/
class MostcategoriesPage extends QueryPage {
function __construct( $name = 'Mostcategories' ) {
parent::__construct( $name );
}
function __construct( $name = 'Mostcategories' ) {
parent::__construct( $name );
}
- * @param $db DatabaseBase
- * @param $res
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
/**
* Pre-fill the link cache
*
/**
* Pre-fill the link cache
*
- * @param $db DatabaseBase
- * @param $res
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
/**
* Pre-fill the link cache
*
/**
* Pre-fill the link cache
*
- * @param $db DatabaseBase
- * @param $res
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
if ( $res->numRows() > 0 ) {
*/
function preprocessResults( $db, $res ) {
if ( $res->numRows() > 0 ) {
/**
* Make links to the page corresponding to the item, and the "what links here" page for it
*
/**
* Make links to the page corresponding to the item, and the "what links here" page for it
*
- * @param $skin Skin to be used
- * @param $result Result row
+ * @param Skin $skin Skin to be used
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
/**
* Fetch user page links and cache their existence
*
/**
* Fetch user page links and cache their existence
*
- * @param $db DatabaseBase
- * @param $res DatabaseResult
+ * @param DatabaseBase $db
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
*/
function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
* Pre-cache page existence to speed up link generation
*
* @param $db DatabaseBase connection
* Pre-cache page existence to speed up link generation
*
* @param $db DatabaseBase connection
- * @param $res ResultWrapper
+ * @param ResultWrapper $res
*/
public function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
*/
public function preprocessResults( $db, $res ) {
if ( !$res->numRows() ) {
/**
* Format a result row
*
/**
* Format a result row
*
- * @param $skin Skin to use for UI elements
- * @param $result Result row
- * @return String
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
*/
public function formatResult( $skin, $result ) {
$title = Title::makeTitleSafe( $result->namespace, $result->title );
*/
public function formatResult( $skin, $result ) {
$title = Title::makeTitleSafe( $result->namespace, $result->title );
/**
* Make a "what links here" link for a given title
*
/**
* Make a "what links here" link for a given title
*
- * @param $title Title to make the link for
- * @param $result Result row
+ * @param Title $title Title to make the link for
+ * @param object $result Result row
* @return String
*/
private function makeWlhLink( $title, $result ) {
* @return String
*/
private function makeWlhLink( $title, $result ) {
return array( 'page_id' );
}
return array( 'page_id' );
}
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$title = Title::newFromRow( $result );
$ret = Linker::link( $title, null, array(), array(), array( 'known' ) );
function formatResult( $skin, $result ) {
$title = Title::newFromRow( $result );
$ret = Linker::link( $title, null, array(), array(), array( 'known' ) );
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
/**
* Callback function to output a restriction
*
/**
* Callback function to output a restriction
*
- * @param Object $row Database row
+ * @param object $row Database row
* @return string
*/
function formatRow( $row ) {
* @return string
*/
function formatRow( $row ) {
/**
* @param $db DatabaseBase
/**
* @param $db DatabaseBase
- * @param $res
- * @return void
+ * @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
*/
function preprocessResults( $db, $res ) {
# There's no point doing a batch check if we aren't caching results;
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$dm = $this->getLanguage()->getDirMark();
function formatResult( $skin, $result ) {
$dm = $this->getLanguage()->getDirMark();
/** Put them into a sortable array */
$groups = array();
/** Put them into a sortable array */
$groups = array();
+ /** @var SpecialPage $page */
foreach ( $pages as $page ) {
if ( $page->isListed() ) {
$group = $page->getFinalGroupName();
foreach ( $pages as $page ) {
if ( $page->isListed() ) {
$group = $page->getFinalGroupName();
- * @param $skin The current skin
- * @param $result The query result
+ * @param Skin $skin The current skin
+ * @param object $result The query result
* @return string The category link
*/
function formatResult( $skin, $result ) {
* @return string The category link
*/
function formatResult( $skin, $result ) {
/**
* Get the text from an archive row containing ar_text, ar_flags and ar_text_id
*
/**
* Get the text from an archive row containing ar_text, ar_flags and ar_text_id
*
- * @param Object $row Database row
+ * @param object $row Database row
* @return string
*/
function getTextFromRow( $row ) {
* @return string
*/
function getTextFromRow( $row ) {
+ /**
+ * @param Skin $skin
+ * @param object $result Result row
+ * @return string
+ */
function formatResult( $skin, $result ) {
$title = Title::makeTitle( NS_CATEGORY, $result->title );
return Linker::link( $title, htmlspecialchars( $title->getText() ) );
function formatResult( $skin, $result ) {
$title = Title::makeTitle( NS_CATEGORY, $result->title );
return Linker::link( $title, htmlspecialchars( $title->getText() ) );
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {
return $this->userCanChangeRights( $user, false );
}
return $this->userCanChangeRights( $user, false );
}
+ /**
+ * @param User $user
+ * @param bool $checkIfSelf
+ * @return bool
+ */
public function userCanChangeRights( $user, $checkIfSelf = true ) {
$available = $this->changeableGroups();
if ( $user->getId() == 0 ) {
public function userCanChangeRights( $user, $checkIfSelf = true ) {
$available = $this->changeableGroups();
if ( $user->getId() == 0 ) {
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result Result row
* @return string
*/
function formatResult( $skin, $result ) {
* @return string
*/
function formatResult( $skin, $result ) {