/**
* Get the HTML text of the description page, if available
- * For local files ImagePage does not use it, because it skips the parser cache.
*/
function getDescriptionText() {
- if( $this->isLocal() ) {
- global $wgParser;
- $revision = Revision::newFromTitle( $this->title );
- if ( !$revision ) {
- return false;
- }
- $text = $revision->getText();
- if ( !$text ) {
- return false;
- }
- $pout = $wgParser->parse( $text, $this->title, new ParserOptions() );
- return $pout->getText();
- }
-
global $wgMemc, $wgLang;
if ( !$this->repo->fetchDescription ) {
return false;
function move( $target ) {
$this->readOnlyError();
}
+
+ function getDescriptionUrl() {
+ // Restore remote behaviour
+ return File::getDescriptionUrl();
+ }
+
+ function getDescriptionText() {
+ // Restore remote behaviour
+ return File::getDescriptionText();
+ }
}
/** scaleHeight inherited */
/** getImageSize inherited */
- /** getDescriptionUrl inherited */
- /** getDescriptionText inherited */
+ /**
+ * Get the URL of the file description page.
+ */
+ function getDescriptionUrl() {
+ return $this->title->getLocalUrl();
+ }
+
+ /**
+ * Get the HTML text of the description page
+ * This is not used by ImagePage for local files, since (among other things)
+ * it skips the parser cache.
+ */
+ function getDescriptionText() {
+ global $wgParser;
+ $revision = Revision::newFromTitle( $this->title );
+ if ( !$revision ) return false;
+ $text = $revision->getText();
+ if ( !$text ) return false;
+ $pout = $wgParser->parse( $text, $this->title, new ParserOptions() );
+ return $pout->getText();
+ }
function getDescription() {
$this->load();