Go to the documentation of this file.
66 if ( $this->title ===
null ) {
79 if ( !$titleObj || !$titleObj->getArticleID() ) {
86 if ( !$this->permissionManager->userCan(
'read', $this->user, $titleObj ) ) {
94 $results = $this->
getDbResults( $titleObj->getArticleID() );
95 if ( count( $results ) > self::MAX_NUM_LINKS ) {
98 ->plaintextParams(
$title )
99 ->numParams( self::MAX_NUM_LINKS ),
113 return $dbr->selectFieldValues(
116 [
'il_from' => $pageId ],
119 'ORDER BY' =>
'il_to',
120 'LIMIT' => self::MAX_NUM_LINKS + 1,
132 $findTitles = array_map(
function (
$title ) {
139 $files = $this->repoGroup->findFiles( $findTitles );
140 list( $maxWidth, $maxHeight ) = self::getImageLimitsFromOption( $this->user,
'imagesize' );
143 'maxWidth' => $maxWidth,
144 'maxHeight' => $maxHeight,
148 foreach ( $files as
$file ) {
149 $response[] = $this->getFileInfo(
$file, $this->user, $transforms );
166 self::PARAM_SOURCE =>
'path',
167 ParamValidator::PARAM_TYPE =>
'string',
168 ParamValidator::PARAM_REQUIRED =>
true,
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
getArticleID( $flags=0)
Get the article ID for this Title from the link cache, adding it if necessary.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
Group all the pieces relevant to the context of a request into one instance @newable.
getLatestRevID( $flags=0)
What is the page_latest field for this page?
static getMain()
Get the RequestContext object associated with the main request.
Represents a title within MediaWiki.
getTouched( $db=null)
Get the last touched timestamp.
Prioritized list of file repositories.
exists( $flags=0)
Check if page exists.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...