00001 <?php
00002
00022 abstract class File {
00023 const DELETED_FILE = 1;
00024 const DELETED_COMMENT = 2;
00025 const DELETED_USER = 4;
00026 const DELETED_RESTRICTED = 8;
00027 const RENDER_NOW = 1;
00028
00029 const DELETE_SOURCE = 1;
00030
00049 var $repo, $title, $lastError, $redirected, $redirectedTitle;
00050
00054 function __construct( $title, $repo ) {
00055 $this->title = $title;
00056 $this->repo = $repo;
00057 }
00058
00059 function __get( $name ) {
00060 $function = array( $this, 'get' . ucfirst( $name ) );
00061 if ( !is_callable( $function ) ) {
00062 return null;
00063 } else {
00064 $this->$name = call_user_func( $function );
00065 return $this->$name;
00066 }
00067 }
00068
00076 static function normalizeExtension( $ext ) {
00077 $lower = strtolower( $ext );
00078 $squish = array(
00079 'htm' => 'html',
00080 'jpeg' => 'jpg',
00081 'mpeg' => 'mpg',
00082 'tiff' => 'tif',
00083 'ogv' => 'ogg' );
00084 if( isset( $squish[$lower] ) ) {
00085 return $squish[$lower];
00086 } elseif( preg_match( '/^[0-9a-z]+$/', $lower ) ) {
00087 return $lower;
00088 } else {
00089 return '';
00090 }
00091 }
00092
00099 static function checkExtensionCompatibility( File $old, $new ) {
00100 $oldMime = $old->getMimeType();
00101 $n = strrpos( $new, '.' );
00102 $newExt = self::normalizeExtension(
00103 $n ? substr( $new, $n + 1 ) : '' );
00104 $mimeMagic = MimeMagic::singleton();
00105 return $mimeMagic->isMatchingExtension( $newExt, $oldMime );
00106 }
00107
00113 function upgradeRow() {}
00114
00122 static function splitMime( $mime ) {
00123 if( strpos( $mime, '/' ) !== false ) {
00124 return explode( '/', $mime, 2 );
00125 } else {
00126 return array( $mime, 'unknown' );
00127 }
00128 }
00129
00133 public function getName() {
00134 if ( !isset( $this->name ) ) {
00135 $this->name = $this->repo->getNameFromTitle( $this->title );
00136 }
00137 return $this->name;
00138 }
00139
00143 function getExtension() {
00144 if ( !isset( $this->extension ) ) {
00145 $n = strrpos( $this->getName(), '.' );
00146 $this->extension = self::normalizeExtension(
00147 $n ? substr( $this->getName(), $n + 1 ) : '' );
00148 }
00149 return $this->extension;
00150 }
00151
00155 public function getTitle() { return $this->title; }
00156
00160 public function getOriginalTitle() {
00161 if ( $this->redirected )
00162 return $this->getRedirectedTitle();
00163 return $this->title;
00164 }
00165
00169 public function getUrl() {
00170 if ( !isset( $this->url ) ) {
00171 $this->url = $this->repo->getZoneUrl( 'public' ) . '/' . $this->getUrlRel();
00172 }
00173 return $this->url;
00174 }
00175
00182 public function getFullUrl() {
00183 return wfExpandUrl( $this->getUrl() );
00184 }
00185
00186 function getViewURL() {
00187 if( $this->mustRender()) {
00188 if( $this->canRender() ) {
00189 return $this->createThumb( $this->getWidth() );
00190 }
00191 else {
00192 wfDebug(__METHOD__.': supposed to render '.$this->getName().' ('.$this->getMimeType()."), but can't!\n");
00193 return $this->getURL(); #hm... return NULL?
00194 }
00195 } else {
00196 return $this->getURL();
00197 }
00198 }
00199
00210 public function getPath() {
00211 if ( !isset( $this->path ) ) {
00212 $this->path = $this->repo->getZonePath('public') . '/' . $this->getRel();
00213 }
00214 return $this->path;
00215 }
00216
00220 public function getFullPath() {
00221 return $this->getPath();
00222 }
00223
00231 public function getWidth( $page = 1 ) { return false; }
00232
00240 public function getHeight( $page = 1 ) { return false; }
00241
00248 public function getUser( $type='text' ) { return null; }
00249
00253 public function getLength() {
00254 $handler = $this->getHandler();
00255 if ( $handler ) {
00256 return $handler->getLength( $this );
00257 } else {
00258 return 0;
00259 }
00260 }
00261
00267 public function getMetadata() { return false; }
00268
00274 public function getBitDepth() { return 0; }
00275
00281 public function getSize() { return false; }
00282
00288 function getMimeType() { return 'unknown/unknown'; }
00289
00296 function getMediaType() { return MEDIATYPE_UNKNOWN; }
00297
00308 function canRender() {
00309 if ( !isset( $this->canRender ) ) {
00310 $this->canRender = $this->getHandler() && $this->handler->canRender( $this );
00311 }
00312 return $this->canRender;
00313 }
00314
00318 protected function getCanRender() {
00319 return $this->canRender();
00320 }
00321
00332 function mustRender() {
00333 return $this->getHandler() && $this->handler->mustRender( $this );
00334 }
00335
00339 function allowInlineDisplay() {
00340 return $this->canRender();
00341 }
00342
00354 function isSafeFile() {
00355 if ( !isset( $this->isSafeFile ) ) {
00356 $this->isSafeFile = $this->_getIsSafeFile();
00357 }
00358 return $this->isSafeFile;
00359 }
00360
00362 protected function getIsSafeFile() {
00363 return $this->isSafeFile();
00364 }
00365
00367 protected function _getIsSafeFile() {
00368 if ($this->allowInlineDisplay()) return true;
00369 if ($this->isTrustedFile()) return true;
00370
00371 global $wgTrustedMediaFormats;
00372
00373 $type= $this->getMediaType();
00374 $mime= $this->getMimeType();
00375 #wfDebug("LocalFile::isSafeFile: type= $type, mime= $mime\n");
00376
00377 if (!$type || $type===MEDIATYPE_UNKNOWN) return false; #unknown type, not trusted
00378 if ( in_array( $type, $wgTrustedMediaFormats) ) return true;
00379
00380 if ($mime==="unknown/unknown") return false; #unknown type, not trusted
00381 if ( in_array( $mime, $wgTrustedMediaFormats) ) return true;
00382
00383 return false;
00384 }
00385
00396 function isTrustedFile() {
00397 #this could be implemented to check a flag in the databas,
00398 #look for signatures, etc
00399 return false;
00400 }
00401
00409 public function exists() {
00410 return $this->getPath() && file_exists( $this->path );
00411 }
00412
00420 function isVisible() {
00421 return $this->exists();
00422 }
00423
00424 function getTransformScript() {
00425 if ( !isset( $this->transformScript ) ) {
00426 $this->transformScript = false;
00427 if ( $this->repo ) {
00428 $script = $this->repo->getThumbScriptUrl();
00429 if ( $script ) {
00430 $this->transformScript = "$script?f=" . urlencode( $this->getName() );
00431 }
00432 }
00433 }
00434 return $this->transformScript;
00435 }
00436
00440 function getUnscaledThumb( $page = false ) {
00441 $width = $this->getWidth( $page );
00442 if ( !$width ) {
00443 return $this->iconThumb();
00444 }
00445 if ( $page ) {
00446 $params = array(
00447 'page' => $page,
00448 'width' => $this->getWidth( $page )
00449 );
00450 } else {
00451 $params = array( 'width' => $this->getWidth() );
00452 }
00453 return $this->transform( $params );
00454 }
00455
00462 function thumbName( $params ) {
00463 if ( !$this->getHandler() ) {
00464 return null;
00465 }
00466 $extension = $this->getExtension();
00467 list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( $extension, $this->getMimeType() );
00468 $thumbName = $this->handler->makeParamString( $params ) . '-' . $this->getName();
00469 if ( $thumbExt != $extension ) {
00470 $thumbName .= ".$thumbExt";
00471 }
00472 return $thumbName;
00473 }
00474
00490 public function createThumb( $width, $height = -1 ) {
00491 $params = array( 'width' => $width );
00492 if ( $height != -1 ) {
00493 $params['height'] = $height;
00494 }
00495 $thumb = $this->transform( $params );
00496 if( is_null( $thumb ) || $thumb->isError() ) return '';
00497 return $thumb->getUrl();
00498 }
00499
00515 public function getThumbnail( $width, $height=-1, $render = true ) {
00516 $params = array( 'width' => $width );
00517 if ( $height != -1 ) {
00518 $params['height'] = $height;
00519 }
00520 return $this->transform( $params, 0 );
00521 }
00522
00531 function transform( $params, $flags = 0 ) {
00532 global $wgUseSquid, $wgIgnoreImageErrors;
00533
00534 wfProfileIn( __METHOD__ );
00535 do {
00536 if ( !$this->canRender() ) {
00537
00538 $thumb = $this->iconThumb();
00539 break;
00540 }
00541
00542 $script = $this->getTransformScript();
00543 if ( $script && !($flags & self::RENDER_NOW) ) {
00544
00545 $thumb = $this->handler->getScriptedTransform( $this, $script, $params );
00546 if( $thumb ) {
00547 break;
00548 }
00549 }
00550
00551 $normalisedParams = $params;
00552 $this->handler->normaliseParams( $this, $normalisedParams );
00553 $thumbName = $this->thumbName( $normalisedParams );
00554 $thumbPath = $this->getThumbPath( $thumbName );
00555 $thumbUrl = $this->getThumbUrl( $thumbName );
00556
00557 if ( $this->repo->canTransformVia404() && !($flags & self::RENDER_NOW ) ) {
00558 $thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
00559 break;
00560 }
00561
00562 wfDebug( __METHOD__.": Doing stat for $thumbPath\n" );
00563 $this->migrateThumbFile( $thumbName );
00564 if ( file_exists( $thumbPath ) ) {
00565 $thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
00566 break;
00567 }
00568 $thumb = $this->handler->doTransform( $this, $thumbPath, $thumbUrl, $params );
00569
00570
00571 if ( !$thumb ) {
00572 $thumb = null;
00573 } elseif ( $thumb->isError() ) {
00574 $this->lastError = $thumb->toText();
00575 if ( $wgIgnoreImageErrors && !($flags & self::RENDER_NOW) ) {
00576 $thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
00577 }
00578 }
00579
00580
00581
00582
00583 if ( $wgUseSquid && ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL()) ) {
00584 SquidUpdate::purge( array( $thumbUrl ) );
00585 }
00586 } while (false);
00587
00588 wfProfileOut( __METHOD__ );
00589 return is_object( $thumb ) ? $thumb : false;
00590 }
00591
00597 function migrateThumbFile( $thumbName ) {}
00598
00602 function getHandler() {
00603 if ( !isset( $this->handler ) ) {
00604 $this->handler = MediaHandler::getHandler( $this->getMimeType() );
00605 }
00606 return $this->handler;
00607 }
00608
00613 function iconThumb() {
00614 global $wgStylePath, $wgStyleDirectory;
00615
00616 $try = array( 'fileicon-' . $this->getExtension() . '.png', 'fileicon.png' );
00617 foreach( $try as $icon ) {
00618 $path = '/common/images/icons/' . $icon;
00619 $filepath = $wgStyleDirectory . $path;
00620 if( file_exists( $filepath ) ) {
00621 return new ThumbnailImage( $this, $wgStylePath . $path, 120, 120 );
00622 }
00623 }
00624 return null;
00625 }
00626
00631 function getLastError() {
00632 return $this->lastError;
00633 }
00634
00640 function getThumbnails() { return array(); }
00641
00647 function purgeCache() {}
00648
00654 function purgeDescription() {
00655 $title = $this->getTitle();
00656 if ( $title ) {
00657 $title->invalidateCache();
00658 $title->purgeSquid();
00659 }
00660 }
00661
00666 function purgeEverything() {
00667
00668 $this->purgeCache();
00669 $this->purgeDescription();
00670
00671
00672 $title = $this->getTitle();
00673 if ( $title ) {
00674 $update = new HTMLCacheUpdate( $title, 'imagelinks' );
00675 $update->doUpdate();
00676 }
00677 }
00678
00688 function getHistory($limit = null, $start = null, $end = null, $inc=true) {
00689 return array();
00690 }
00691
00700 public function nextHistoryLine() {
00701 return false;
00702 }
00703
00710 public function resetHistory() {}
00711
00717 function getHashPath() {
00718 if ( !isset( $this->hashPath ) ) {
00719 $this->hashPath = $this->repo->getHashPath( $this->getName() );
00720 }
00721 return $this->hashPath;
00722 }
00723
00727 function getRel() {
00728 return $this->getHashPath() . $this->getName();
00729 }
00730
00734 function getUrlRel() {
00735 return $this->getHashPath() . rawurlencode( $this->getName() );
00736 }
00737
00739 function getArchiveRel( $suffix = false ) {
00740 $path = 'archive/' . $this->getHashPath();
00741 if ( $suffix === false ) {
00742 $path = substr( $path, 0, -1 );
00743 } else {
00744 $path .= $suffix;
00745 }
00746 return $path;
00747 }
00748
00750 function getThumbRel( $suffix = false ) {
00751 $path = 'thumb/' . $this->getRel();
00752 if ( $suffix !== false ) {
00753 $path .= '/' . $suffix;
00754 }
00755 return $path;
00756 }
00757
00759 function getArchivePath( $suffix = false ) {
00760 return $this->repo->getZonePath('public') . '/' . $this->getArchiveRel( $suffix );
00761 }
00762
00764 function getThumbPath( $suffix = false ) {
00765 return $this->repo->getZonePath('public') . '/' . $this->getThumbRel( $suffix );
00766 }
00767
00769 function getArchiveUrl( $suffix = false ) {
00770 $path = $this->repo->getZoneUrl('public') . '/archive/' . $this->getHashPath();
00771 if ( $suffix === false ) {
00772 $path = substr( $path, 0, -1 );
00773 } else {
00774 $path .= rawurlencode( $suffix );
00775 }
00776 return $path;
00777 }
00778
00780 function getThumbUrl( $suffix = false ) {
00781 $path = $this->repo->getZoneUrl('public') . '/thumb/' . $this->getUrlRel();
00782 if ( $suffix !== false ) {
00783 $path .= '/' . rawurlencode( $suffix );
00784 }
00785 return $path;
00786 }
00787
00789 function getArchiveVirtualUrl( $suffix = false ) {
00790 $path = $this->repo->getVirtualUrl() . '/public/archive/' . $this->getHashPath();
00791 if ( $suffix === false ) {
00792 $path = substr( $path, 0, -1 );
00793 } else {
00794 $path .= rawurlencode( $suffix );
00795 }
00796 return $path;
00797 }
00798
00800 function getThumbVirtualUrl( $suffix = false ) {
00801 $path = $this->repo->getVirtualUrl() . '/public/thumb/' . $this->getUrlRel();
00802 if ( $suffix !== false ) {
00803 $path .= '/' . rawurlencode( $suffix );
00804 }
00805 return $path;
00806 }
00807
00809 function getVirtualUrl( $suffix = false ) {
00810 $path = $this->repo->getVirtualUrl() . '/public/' . $this->getUrlRel();
00811 if ( $suffix !== false ) {
00812 $path .= '/' . rawurlencode( $suffix );
00813 }
00814 return $path;
00815 }
00816
00820 function isHashed() {
00821 return $this->repo->isHashed();
00822 }
00823
00824 function readOnlyError() {
00825 throw new MWException( get_class($this) . ': write operations are not supported' );
00826 }
00827
00833 function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', $watch = false ) {
00834 $this->readOnlyError();
00835 }
00836
00856 function publish( $srcPath, $flags = 0 ) {
00857 $this->readOnlyError();
00858 }
00859
00868 function getLinksTo( $options = array() ) {
00869 wfProfileIn( __METHOD__ );
00870
00871
00872 if ( count( $options ) > 0 ) {
00873 $db = wfGetDB( DB_MASTER );
00874 } else {
00875 $db = wfGetDB( DB_SLAVE );
00876 }
00877 $linkCache = LinkCache::singleton();
00878
00879 $encName = $db->addQuotes( $this->getName() );
00880 $res = $db->select( array( 'page', 'imagelinks'),
00881 array( 'page_namespace', 'page_title', 'page_id', 'page_len', 'page_is_redirect' ),
00882 array( 'page_id' => 'il_from', 'il_to' => $encName ),
00883 __METHOD__,
00884 $options );
00885
00886 $retVal = array();
00887 if ( $db->numRows( $res ) ) {
00888 while ( $row = $db->fetchObject( $res ) ) {
00889 if ( $titleObj = Title::newFromRow( $row ) ) {
00890 $linkCache->addGoodLinkObj( $row->page_id, $titleObj, $row->page_len, $row->page_is_redirect );
00891 $retVal[] = $titleObj;
00892 }
00893 }
00894 }
00895 $db->freeResult( $res );
00896 wfProfileOut( __METHOD__ );
00897 return $retVal;
00898 }
00899
00900 function formatMetadata() {
00901 if ( !$this->getHandler() ) {
00902 return false;
00903 }
00904 return $this->getHandler()->formatMetadata( $this, $this->getMetadata() );
00905 }
00906
00912 function isLocal() {
00913 return $this->getRepoName() == 'local';
00914 }
00915
00921 function getRepoName() {
00922 return $this->repo ? $this->repo->getName() : 'unknown';
00923 }
00924
00925
00926
00927 function getRepo() {
00928 return $this->repo;
00929 }
00930
00935 function isOld() {
00936 return false;
00937 }
00938
00943 function isDeleted( $field ) {
00944 return false;
00945 }
00946
00952 function wasDeleted() {
00953 $title = $this->getTitle();
00954 return $title && $title->isDeletedQuick();
00955 }
00956
00969 function move( $target ) {
00970 $this->readOnlyError();
00971 }
00972
00987 function delete( $reason, $suppress = false ) {
00988 $this->readOnlyError();
00989 }
00990
01005 function restore( $versions=array(), $unsuppress=false ) {
01006 $this->readOnlyError();
01007 }
01008
01015 function isMultipage() {
01016 return $this->getHandler() && $this->handler->isMultiPage( $this );
01017 }
01018
01023 function pageCount() {
01024 if ( !isset( $this->pageCount ) ) {
01025 if ( $this->getHandler() && $this->handler->isMultiPage( $this ) ) {
01026 $this->pageCount = $this->handler->pageCount( $this );
01027 } else {
01028 $this->pageCount = false;
01029 }
01030 }
01031 return $this->pageCount;
01032 }
01033
01037 static function scaleHeight( $srcWidth, $srcHeight, $dstWidth ) {
01038
01039 if ( $srcWidth == 0 ) {
01040 return 0;
01041 } else {
01042 return round( $srcHeight * $dstWidth / $srcWidth );
01043 }
01044 }
01045
01053 function getImageSize( $fileName ) {
01054 if ( !$this->getHandler() ) {
01055 return false;
01056 }
01057 return $this->handler->getImageSize( $this, $fileName );
01058 }
01059
01064 function getDescriptionUrl() {
01065 return $this->repo->getDescriptionUrl( $this->getName() );
01066 }
01067
01071 function getDescriptionText() {
01072 global $wgMemc, $wgContLang;
01073 if ( !$this->repo->fetchDescription ) {
01074 return false;
01075 }
01076 $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() );
01077 if ( $renderUrl ) {
01078 if ( $this->repo->descriptionCacheExpiry > 0 ) {
01079 wfDebug("Attempting to get the description from cache...");
01080 $key = wfMemcKey( 'RemoteFileDescription', 'url', $wgContLang->getCode(),
01081 $this->getName() );
01082 $obj = $wgMemc->get($key);
01083 if ($obj) {
01084 wfDebug("success!\n");
01085 return $obj;
01086 }
01087 wfDebug("miss\n");
01088 }
01089 wfDebug( "Fetching shared description from $renderUrl\n" );
01090 $res = Http::get( $renderUrl );
01091 if ( $res && $this->repo->descriptionCacheExpiry > 0 ) {
01092 $wgMemc->set( $key, $res, $this->repo->descriptionCacheExpiry );
01093 }
01094 return $res;
01095 } else {
01096 return false;
01097 }
01098 }
01099
01104 function getDescription() {
01105 return null;
01106 }
01107
01112 function getTimestamp() {
01113 $path = $this->getPath();
01114 if ( !file_exists( $path ) ) {
01115 return false;
01116 }
01117 return wfTimestamp( TS_MW, filemtime( $path ) );
01118 }
01119
01123 function getSha1() {
01124 return self::sha1Base36( $this->getPath() );
01125 }
01126
01134 function userCan( $field ) {
01135 return true;
01136 }
01137
01145 static function getPropsFromPath( $path, $ext = true ) {
01146 wfProfileIn( __METHOD__ );
01147 wfDebug( __METHOD__.": Getting file info for $path\n" );
01148 $info = array(
01149 'fileExists' => file_exists( $path ) && !is_dir( $path )
01150 );
01151 $gis = false;
01152 if ( $info['fileExists'] ) {
01153 $magic = MimeMagic::singleton();
01154
01155 $info['mime'] = $magic->guessMimeType( $path, $ext );
01156 list( $info['major_mime'], $info['minor_mime'] ) = self::splitMime( $info['mime'] );
01157 $info['media_type'] = $magic->getMediaType( $path, $info['mime'] );
01158
01159 # Get size in bytes
01160 $info['size'] = filesize( $path );
01161
01162 # Height, width and metadata
01163 $handler = MediaHandler::getHandler( $info['mime'] );
01164 if ( $handler ) {
01165 $tempImage = (object)array();
01166 $info['metadata'] = $handler->getMetadata( $tempImage, $path );
01167 $gis = $handler->getImageSize( $tempImage, $path, $info['metadata'] );
01168 } else {
01169 $gis = false;
01170 $info['metadata'] = '';
01171 }
01172 $info['sha1'] = self::sha1Base36( $path );
01173
01174 wfDebug(__METHOD__.": $path loaded, {$info['size']} bytes, {$info['mime']}.\n");
01175 } else {
01176 $info['mime'] = NULL;
01177 $info['media_type'] = MEDIATYPE_UNKNOWN;
01178 $info['metadata'] = '';
01179 $info['sha1'] = '';
01180 wfDebug(__METHOD__.": $path NOT FOUND!\n");
01181 }
01182 if( $gis ) {
01183 # NOTE: $gis[2] contains a code for the image type. This is no longer used.
01184 $info['width'] = $gis[0];
01185 $info['height'] = $gis[1];
01186 if ( isset( $gis['bits'] ) ) {
01187 $info['bits'] = $gis['bits'];
01188 } else {
01189 $info['bits'] = 0;
01190 }
01191 } else {
01192 $info['width'] = 0;
01193 $info['height'] = 0;
01194 $info['bits'] = 0;
01195 }
01196 wfProfileOut( __METHOD__ );
01197 return $info;
01198 }
01199
01209 static function sha1Base36( $path ) {
01210 wfSuppressWarnings();
01211 $hash = sha1_file( $path );
01212 wfRestoreWarnings();
01213 if ( $hash === false ) {
01214 return false;
01215 } else {
01216 return wfBaseConvert( $hash, 16, 36, 31 );
01217 }
01218 }
01219
01220 function getLongDesc() {
01221 $handler = $this->getHandler();
01222 if ( $handler ) {
01223 return $handler->getLongDesc( $this );
01224 } else {
01225 return MediaHandler::getGeneralLongDesc( $this );
01226 }
01227 }
01228
01229 function getShortDesc() {
01230 $handler = $this->getHandler();
01231 if ( $handler ) {
01232 return $handler->getShortDesc( $this );
01233 } else {
01234 return MediaHandler::getGeneralShortDesc( $this );
01235 }
01236 }
01237
01238 function getDimensionsString() {
01239 $handler = $this->getHandler();
01240 if ( $handler ) {
01241 return $handler->getDimensionsString( $this );
01242 } else {
01243 return '';
01244 }
01245 }
01246
01247 function getRedirected() {
01248 return $this->redirected;
01249 }
01250
01251 function getRedirectedTitle() {
01252 if ( $this->redirected ) {
01253 if ( !$this->redirectTitle )
01254 $this->redirectTitle = Title::makeTitle( NS_FILE, $this->redirected );
01255 return $this->redirectTitle;
01256 }
01257 }
01258
01259 function redirectedFrom( $from ) {
01260 $this->redirected = $from;
01261 }
01262 }
01266 define( 'MW_IMG_DELETED_FILE', File::DELETED_FILE );
01267 define( 'MW_IMG_DELETED_COMMENT', File::DELETED_COMMENT );
01268 define( 'MW_IMG_DELETED_USER', File::DELETED_USER );
01269 define( 'MW_IMG_DELETED_RESTRICTED', File::DELETED_RESTRICTED );