Index: trunk/extensions/WebStore/WebStore.php |
— | — | @@ -64,7 +64,6 @@ |
65 | 65 | |
66 | 66 | $wgAutoloadClasses['WebStoreClient'] = 'extensions/WebStore/WebStoreClient.php'; |
67 | 67 | $wgAutoloadClasses['WebStoreCommon'] = 'extensions/WebStore/WebStoreCommon.php'; |
68 | | -$wgAutoloadClasses['WebStoreLocalImage'] = 'extensions/WebStore/WebStoreCommon.php'; |
69 | 68 | $wgAutoloadClasses['WebStorePostFile'] = 'extensions/WebStore/WebStorePostFile.php'; |
70 | 69 | $wgHooks['LoadAllMessages'][] = 'WebStoreCommon::initialiseMessages'; |
71 | 70 | |
Index: trunk/extensions/WebStore/metadata.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | return false; |
61 | 61 | } |
62 | 62 | |
63 | | - $image = new WebStoreLocalImage( $fullPath, $mime ); |
| 63 | + $image = UnregisteredLocalFile::newFromPath( $fullPath, $mime ); |
64 | 64 | if ( !$image->getHandler() ) { |
65 | 65 | $this->error( 400, 'webstore_no_handler' ); |
66 | 66 | return false; |
Index: trunk/extensions/WebStore/inplace-scaler.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | $magic = MimeMagic::singleton(); |
71 | 71 | $mime = $magic->guessTypesForExtension( $ext ); |
72 | 72 | |
73 | | - $image = new WebStoreLocalImage( $srcTemp, $mime ); |
| 73 | + $image = UnregisteredLocalFile::newFromPath( $srcTemp, $mime ); |
74 | 74 | |
75 | 75 | $handler = $image->getHandler(); |
76 | 76 | if ( !$handler ) { |
Index: trunk/extensions/WebStore/WebStoreCommon.php |
— | — | @@ -494,58 +494,4 @@ |
495 | 495 | } |
496 | 496 | } |
497 | 497 | |
498 | | -class WebStoreLocalImage { |
499 | | - function __construct( $path, $mime ) { |
500 | | - $this->imagePath = $path; |
501 | | - $this->mime = $mime; |
502 | | - $this->handler = MediaHandler::getHandler( $mime ); |
503 | | - $this->dims = array(); |
504 | | - } |
505 | | - |
506 | | - function getPageDimensions( $page = 1 ) { |
507 | | - if ( !isset( $this->dims[$page] ) ) { |
508 | | - $this->dims[$page] = $this->handler->getPageDimensions( $this, $page ); |
509 | | - } |
510 | | - return $this->dims[$page]; |
511 | | - } |
512 | | - |
513 | | - function getWidth( $page = 1 ) { |
514 | | - $dim = $this->getPageDimensions( $page ); |
515 | | - return $dim['width']; |
516 | | - } |
517 | | - |
518 | | - function getHeight( $page = 1 ) { |
519 | | - $dim = $this->getPageDimensions( $page ); |
520 | | - return $dim['height']; |
521 | | - } |
522 | | - |
523 | | - function getMimeType() { |
524 | | - return $this->mime; |
525 | | - } |
526 | | - |
527 | | - function getImagePath() { |
528 | | - return $this->imagePath; |
529 | | - } |
530 | | - |
531 | | - function getHandler() { |
532 | | - return $this->handler; |
533 | | - } |
534 | | - |
535 | | - function getImageSize() { |
536 | | - return $this->handler->getImageSize( $this, $this->getImagePath() ); |
537 | | - } |
538 | | - |
539 | | - function getMetadata() { |
540 | | - if ( !isset( $this->metadata ) ) { |
541 | | - $this->metadata = $this->handler->getMetadata( $this, $this->getImagePath() ); |
542 | | - } |
543 | | - return $this->metadata; |
544 | | - } |
545 | | - |
546 | | - function getURL() { |
547 | | - return false; |
548 | | - } |
549 | | -} |
550 | | - |
551 | | - |
552 | 498 | ?> |