diff --git a/application/default/controllers/MetainfoController.php b/application/default/controllers/MetainfoController.php index 9cdd7e61..c895d039 100644 --- a/application/default/controllers/MetainfoController.php +++ b/application/default/controllers/MetainfoController.php @@ -3,7 +3,7 @@ class MetainfoController extends Zend_Controller_Action { function indexAction() { $title=$this->_request->getParam('title'); $filePath="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=revisions&titles=$title&rvprop=content&redirects"; - $wikifp=fopen($filePath,r); + $wikifp=fopen($filePath,'r'); while (!feof($wikifp)) { $wikiLines=fgets($wikifp); $yuchuli=array('";}}}}}}','**','*'); @@ -17,7 +17,13 @@ class MetainfoController extends Zend_Controller_Action { }else { $this->wikitransform($wikiLine,$content); } - } + } + /*$wikicontent=unserialize(file_get_contents($filePath)); + $wiki_keys=array_keys($wikicontent['query']['pages']); + $content= $wikicontent['query']['pages'][$wiki_keys[0]]; + $this->view->title=$content['title']; + $c1=explode('\n',$content['revisions'][0]['*']); + foreach ($c1 as $c2) $this->wikitransform($c2,$tcontent);*/ $this->view->content=$content; $this->view->config = Zend_Registry::get('config'); } @@ -37,25 +43,27 @@ class MetainfoController extends Zend_Controller_Action { $wikiFont=str_replace('==','',$text); $result.="
'.str_replace($a,$c,$text).'
'; }elseif(strpos($text,'[http://')!== false||strpos($text,'[ http://')!== false){ diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 823db4bc..4f6921cc 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -86,7 +86,7 @@ else