Go to the documentation of this file.
38 parent::__construct(
$title );
44 $overrides = parent::getActionOverrides();
45 $overrides[
'revert'] =
'RevertFileAction';
54 $this->mFileLoaded =
true;
61 if ( $this->mFileLoaded ) {
64 $this->mFileLoaded =
true;
67 if ( !$this->mFile ) {
70 $this->mRepo = $this->mFile->getRepo();
79 if ( $this->mFile->isLocal() ) {
80 return parent::getRedirectTarget();
83 $from = $this->mFile->getRedirected();
84 $to = $this->mFile->getName();
97 if ( $this->mFile->isLocal() ) {
98 return parent::followRedirect();
100 $from = $this->mFile->getRedirected();
101 $to = $this->mFile->getName();
102 if (
$from == $to ) {
113 if ( $this->mFile->isLocal() ) {
114 return parent::isRedirect();
117 return (
bool)$this->mFile->getRedirected();
125 return $this->mFile->isLocal();
141 if ( !is_null( $this->mDupes ) ) {
144 $hash = $this->mFile->getSha1();
146 $this->mDupes =
array();
151 $self = $this->mFile->getRepoName() .
':' . $this->mFile->getName();
152 $size = $this->mFile->getSize();
157 foreach ( $dupes
as $index =>
$file ) {
158 $key =
$file->getRepoName() .
':' .
$file->getName();
159 if ( $key ==
$self ) {
160 unset( $dupes[$index] );
163 unset( $dupes[$index] );
166 $this->mDupes = $dupes;
176 if ( $this->mFile->exists() ) {
177 wfDebug(
'ImagePage::doPurge purging ' . $this->mFile->getName() .
"\n" );
180 $this->mFile->upgradeRow();
181 $this->mFile->purgeCache(
array(
'forThumbRefresh' =>
true ) );
183 wfDebug(
'ImagePage::doPurge no image for ' . $this->mFile->getName() .
"; limiting purge to cache only\n" );
186 $this->mFile->purgeCache(
array(
'forThumbRefresh' =>
true ) );
188 if ( $this->mRepo ) {
190 $this->mRepo->invalidateImageRedirect( $this->mTitle );
192 return parent::doPurge();
210 wfDebug( __CLASS__ .
'::' . __METHOD__ .
" is not supported for this file\n" );
215 $repo =
$file->getRepo();
216 $dbr = $repo->getSlaveDB();
219 array(
'page',
'categorylinks' ),
221 'page_title' =>
'cl_to',
225 'page_namespace' =>
$title->getNamespace(),
226 'page_title' =>
$title->getDBkey(),
230 array(
'categorylinks' =>
array(
'INNER JOIN',
'page_id = cl_from' ) )
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual da...
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
static singleton()
Get a RepoGroup instance.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
static newFromResult( $res)
Class representing a MediaWiki article and history.
Implements some public methods and some protected utility functions which are required by multiple ch...
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
Class to represent a local file in the wiki's own database.
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Class to invalidate the HTML cache of all the pages linking to a given title.
presenting them properly to the user as errors is done by the caller $title
return false to override stock group addition can be modified try getUserPermissionsErrors userCan checks are continued by internal code can override on output return false to not delete it return false to override the default password checks & $hash
if(PHP_SAPI !='cli') $file
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getForeignCategories()
Get the categories this file is a member of on the wiki where it was uploaded.
wfFindFile( $title, $options=array())
Find a file.
doPurge()
Override handling of action=purge.
Special handling for file pages.
getActionOverrides()
Returns overrides for action handlers.
wfLocalFile( $title)
Get an object referring to a locally registered file.