add image redirects parameter

This commit is contained in:
wlx 2012-05-18 01:58:20 +00:00
parent b6310b53c8
commit 4065cba7e7
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class MetainfoController extends Zend_Controller_Action {
}elseif(strpos($text,'[[image:')!== false||strpos($text,'[[Image:')!== false) {
$wimag=array('[[image:',']]','[[Image:');
$imag=str_replace($wimag,'',$text);
$fname="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=imageinfo&titles=image:$imag&iiprop=url";
$fname="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=imageinfo&titles=image:$imag&iiprop=url&redirects";
$imagfp=fopen($fname,r);
$imagfiles=fread($imagfp,1024);
$imagfile=strstr($imagfiles,'http');