Index: trunk/phase3/includes/filerepo/README |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | ForeignDBFile.php extends LocalFile |
50 | 50 | Image.php extends LocalFile |
51 | 51 | UnregisteredLocalFile.php extends File. |
52 | | -FileRepo.php defined an abstract class FileRepo. |
| 52 | +FileRepo.php defines an abstract class FileRepo. |
53 | 53 | ForeignAPIRepo.php extends FileRepo |
54 | 54 | FSRepo extends FileRepo |
55 | 55 | LocalRepo.php extends FSRepo |
— | — | @@ -57,3 +57,4 @@ |
58 | 58 | NullRepo extends FileRepo |
59 | 59 | |
60 | 60 | Russ Nelson, March 2011 |
| 61 | + |
Index: trunk/phase3/includes/filerepo/UnregisteredLocalFile.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | $this->dims = array(); |
76 | 76 | } |
77 | 77 | |
78 | | - function getPageDimensions( $page = 1 ) { |
| 78 | + private function cachePageDimensions( $page = 1 ) { |
79 | 79 | if ( !isset( $this->dims[$page] ) ) { |
80 | 80 | if ( !$this->getHandler() ) { |
81 | 81 | return false; |
— | — | @@ -85,19 +85,19 @@ |
86 | 86 | } |
87 | 87 | |
88 | 88 | function getWidth( $page = 1 ) { |
89 | | - $dim = $this->getPageDimensions( $page ); |
| 89 | + $dim = $this->cachePageDimensions( $page ); |
90 | 90 | return $dim['width']; |
91 | 91 | } |
92 | 92 | |
93 | 93 | function getHeight( $page = 1 ) { |
94 | | - $dim = $this->getPageDimensions( $page ); |
| 94 | + $dim = $this->cachePageDimensions( $page ); |
95 | 95 | return $dim['height']; |
96 | 96 | } |
97 | 97 | |
98 | 98 | function getMimeType() { |
99 | 99 | if ( !isset( $this->mime ) ) { |
100 | 100 | $magic = MimeMagic::singleton(); |
101 | | - $this->mime = $magic->guessMimeType( $this->path ); |
| 101 | + $this->mime = $magic->guessMimeType( $this->getPath() ); |
102 | 102 | } |
103 | 103 | return $this->mime; |
104 | 104 | } |