+

Fixed convertion of non array url parameter

Benjamin Renard [2013-08-13 13:28:45]
Fixed convertion of non array url parameter
Filename
main.php
diff --git a/main.php b/main.php
index 3c8f6d4..f85f309 100644
--- a/main.php
+++ b/main.php
@@ -15,13 +15,8 @@ class ProjectInfosPlugin extends VGPlugin
 	function hook_summary() {
 		global $page;
 		$page['project_infos']=get_project_info($page['project']);
-		if (isset($conf['projects'][$project]['url'])) {
-			if (is_array($conf['projects'][$project]['url'])) {
-				$page['project_infos']['url']=array($conf['projects'][$project]['url']);
-			}
-			else {
-				$page['project_infos']['url']=$conf['projects'][$project]['url'];
-			}
+		if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
+			$page['project_infos']['url']=array($page['project_infos']['url']);
 		}
 		$this->display_plugin_template('summary', FALSE);
 	}
ViewGit