Index: trunk/extensions/Gnuplot/Gnuplot.php |
— | — | @@ -147,6 +147,6 @@ |
148 | 148 | * Output : the filesystem path for the file |
149 | 149 | */ |
150 | 150 | function getSourceDataPath ( $name ) { |
151 | | - $h = Image::newFromName($name); |
| 151 | + $h = wfFindFile($name); |
152 | 152 | return $h->exists() ? $h->getImagePath() : null; |
153 | 153 | } |
Index: trunk/extensions/RDF/Rdf.php |
— | — | @@ -644,7 +644,7 @@ |
645 | 645 | 'MwRdfImage'); |
646 | 646 | |
647 | 647 | while ($res && $row = $dbr->fetchObject($res)) { |
648 | | - $img = Image::newFromName($row->il_to); |
| 648 | + $img = wfFindFile($row->il_to); |
649 | 649 | if ($img->exists()) { |
650 | 650 | $iuri = $img->getURL(); |
651 | 651 | if ($iuri[0] == '/') { |
Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | $imageObj = wfFindFile( $imageTitle ); |
100 | 100 | } else { |
101 | 101 | // Old MW |
102 | | - $imageObj = Image::newFromTitle( $imageTitle ); |
| 102 | + $imageObj = wfFindFile( $imageTitle ); |
103 | 103 | } |
104 | 104 | if ( !$imageObj || !$imageObj->exists() ) { |
105 | 105 | return self::error( 'imagemap_invalid_image' ); |
Index: trunk/extensions/Icon/Icon.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | |
59 | 59 | // check if we are dealing with an InterWiki link |
60 | 60 | if ( $ititle->isLocal() ) { |
61 | | - $image = Image::newFromName( $img ); |
| 61 | + $image = wfFindFile( $img ); |
62 | 62 | if (!$image->exists()) |
63 | 63 | return '[[Image:'.$img.']]'; |
64 | 64 | |
Index: trunk/extensions/SmoothGallery/SmoothGalleryParser.php |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | $imageArray = Array(); |
205 | 205 | |
206 | 206 | //Get the image object from the database |
207 | | - $img_obj = Image::newFromTitle( $title ); |
| 207 | + $img_obj = wfFindFile( $title ); |
208 | 208 | |
209 | 209 | if ( !$img_obj->exists() ) { |
210 | 210 | //The user asked for an image that doesn't exist, let's |
Index: trunk/extensions/FileSearch/FileSearchIndexer.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | if( $namespace == NS_IMAGE ) { |
49 | 49 | wfDebugLog( 'filesearch', "Update called for `{$title}`" ); |
50 | 50 | $titleObj = Title::makeTitle( NS_IMAGE, $title ); |
51 | | - $image = Image::newFromTitle( $titleObj ); |
| 51 | + $image = wfFindFile( $titleObj ); |
52 | 52 | if ( !$image->exists() ) { |
53 | 53 | wfDebugLog( 'filesearch', "Image does not exist: $title" ); |
54 | 54 | return; |
Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -977,7 +977,7 @@ |
978 | 978 | if( $fanbox['fantag_image_name'] ){ |
979 | 979 | $fantag_image_width = 45; |
980 | 980 | $fantag_image_height = 53; |
981 | | - $fantag_image = Image::newFromName( $fanbox['fantag_image_name'] ); |
| 981 | + $fantag_image = wfFindFile( $fanbox['fantag_image_name'] ); |
982 | 982 | $fantag_image_url = $fantag_image->createThumb($fantag_image_width, $fantag_image_height); |
983 | 983 | $fantag_image_tag = '<img alt="" src="' . $fantag_image_url . '"/>'; |
984 | 984 | }; |
Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | } |
85 | 85 | if ( !$imageTitle ) return; |
86 | 86 | |
87 | | - $image = Image::newFromTitle( $imageTitle ); |
| 87 | + $image = wfFindFile( $imageTitle ); |
88 | 88 | |
89 | 89 | //if it is multipage, we use the page order of the file |
90 | 90 | if( $image->exists() && $image->isMultiPage() ) { |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | return true; |
300 | 300 | } |
301 | 301 | |
302 | | - $image = Image::newFromTitle( $imageTitle ); |
| 302 | + $image = wfFindFile( $imageTitle ); |
303 | 303 | if ( $image->exists() ) { |
304 | 304 | $width = $image->getWidth(); |
305 | 305 | $height = $image->getHeight(); |
— | — | @@ -540,7 +540,7 @@ |
541 | 541 | if ( !$imageTitle ) { |
542 | 542 | return true; |
543 | 543 | } |
544 | | - $image = Image::newFromTitle( $imageTitle ); |
| 544 | + $image = wfFindFile( $imageTitle ); |
545 | 545 | $return=""; |
546 | 546 | |
547 | 547 | if ( $image->isMultipage() ) { |
Index: trunk/extensions/MiniPreview/MiniPreview.php |
— | — | @@ -388,7 +388,7 @@ |
389 | 389 | function wfMiniPreviewGetImageData ( $image_titles , &$image_data ) { |
390 | 390 | $image_data = array(); # Paranoia |
391 | 391 | foreach ( $image_titles AS $i ) { |
392 | | - $image_data[$i] = Image::newFromName( $i ); |
| 392 | + $image_data[$i] = wfFindFile( $i ); |
393 | 393 | $image_data[$i]->load(); |
394 | 394 | } |
395 | 395 | } |
Index: trunk/extensions/Player/PlayerClass.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | static function newFromTitle( $title, $options, $sizeDefault = 'imagesize' ) { |
51 | 51 | wfLoadExtensionMessages( 'Player' ); |
52 | 52 | |
53 | | - $image = Image::newFromTitle( $title ); |
| 53 | + $image = wfFindFile( $title ); |
54 | 54 | if ( !$image->exists() ) { |
55 | 55 | throw new PlayerException(wfMsg("player-not-found"), 404); |
56 | 56 | } |
— | — | @@ -379,7 +379,7 @@ |
380 | 380 | $thumbstyle = ''; |
381 | 381 | $thumbimg = NULL; |
382 | 382 | $thumbname = @$attributes['thumb']; |
383 | | - if ($thumbname) $thumbimg = Image::newFromName( $thumbname ); |
| 383 | + if ($thumbname) $thumbimg = wfFindFile( $thumbname ); |
384 | 384 | |
385 | 385 | if ($thumbimg && $thumbimg->exists()) { |
386 | 386 | $tni = $thumbimg->getThumbnail( $this->width, $this->height ); |
Index: trunk/extensions/ImageTagging/ImageTagging.php |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | $tagName = preg_replace( "/[\"'<>]/", "", $tagName ); |
96 | 96 | $imgName = preg_replace( "/[\"'<>]/", "", $imgName ); |
97 | 97 | |
98 | | - $img = Image::newFromName($imgName); |
| 98 | + $img = wfFindFile($imgName); |
99 | 99 | if ($img) { |
100 | 100 | $imgTitle = $img->getTitle(); |
101 | 101 | |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | $tagName = preg_replace( "/[\"'<>]/", "", $tagName ); |
152 | 152 | $imgName = preg_replace( "/[\"'<>]/", "", $imgName ); |
153 | 153 | |
154 | | - $img = Image::newFromName($imgName); |
| 154 | + $img = wfFindFile($imgName); |
155 | 155 | if ($img) { |
156 | 156 | $imgTitle = $img->getTitle(); |
157 | 157 | |
Index: trunk/extensions/ImageTagging/ImageTagging_body.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | |
62 | 62 | $res = $db->query($SQL); |
63 | 63 | while ($o = $db->fetchObject($res)) { |
64 | | - $img = Image::newFromName($o->img_name); |
| 64 | + $img = wfFindFile($o->img_name); |
65 | 65 | $this->add($img, ''); |
66 | 66 | } |
67 | 67 | $db->freeResult($res); |
— | — | @@ -236,4 +236,4 @@ |
237 | 237 | $s .= $this->pagerHTML('bottom'); |
238 | 238 | return $s; |
239 | 239 | } |
240 | | -} //class |
\ No newline at end of file |
| 240 | +} //class |
Index: trunk/extensions/Logo/Logo.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | if( is_object( $title ) ) { |
22 | 22 | if( $title->getNamespace() != NS_IMAGE ) |
23 | 23 | $title = Title::makeTitle( NS_IMAGE, $title->getText() ); |
24 | | - $logo = Image::newFromTitle( $title ); |
| 24 | + $logo = wfFindFile( $title ); |
25 | 25 | if( $logo->exists() ) |
26 | 26 | $wgLogo = $logo->createThumb( 135 ); |
27 | 27 | } |
Index: trunk/extensions/RdfRedland/Modelers/Image.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | array('il_from = ' . $this->Agent->getTitle()->getArticleID()), |
45 | 45 | 'MwRdfImage'); |
46 | 46 | while ($res && $row = $dbr->fetchObject($res)) { |
47 | | - $img = Image::newFromName($row->il_to); |
| 47 | + $img = wfFindFile($row->il_to); |
48 | 48 | if ( ! $img->exists() ) continue; |
49 | 49 | $iuri = $img->getURL(); |
50 | 50 | if ($iuri[0] == '/') $iuri = $wgServer . $iuri; |
Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | # Convert image titles to file paths and store as JS to update dTree |
72 | 72 | foreach ($wgTreeViewImages as $k => $v) { |
73 | 73 | $title = Title::newFromText($v,NS_IMAGE); |
74 | | - $image = Image::newFromTitle($title); |
| 74 | + $image = wfFindFile($title); |
75 | 75 | $v = $image && $image->exists() ? $image->getURL() : $wgTreeViewImages[$k]; |
76 | 76 | $this->images .= "tree.icon['$k'] = '$v';"; |
77 | 77 | } |
Index: trunk/extensions/Click/Click.php |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | |
103 | 103 | // Add image element, or use alt text on it's own if image doesn't exist. |
104 | 104 | $imagetitle = Title::newFromText( $image ); |
105 | | - if( is_object( $imagetitle ) ) $imageimage = Image::newFromTitle( $imagetitle ); |
| 105 | + if( is_object( $imagetitle ) ) $imageimage = wfFindFile( $imagetitle ); |
106 | 106 | if( isset( $imageimage ) && is_object( $imagetitle ) && is_object( $imageimage ) && $imageimage->exists() ) { |
107 | 107 | // Display image. |
108 | 108 | if( !$width ) $width = $imageimage->getWidth(); |
Index: trunk/extensions/News/NewsRenderer.php |
— | — | @@ -633,7 +633,7 @@ |
634 | 634 | |
635 | 635 | $ticon = $icon ? Title::newFromText($icon, NS_IMAGE) : NULL; |
636 | 636 | if ( $ticon ) { |
637 | | - $image = Image::newFromTitle( $ticon ); |
| 637 | + $image = wfFindFile( $ticon ); |
638 | 638 | if ( !$image->exists() ) { |
639 | 639 | $image = false; |
640 | 640 | } |