Fixed convertion of non array url parameter
Benjamin Renard

Benjamin Renard commited on 2013-08-13 13:28:58
Showing 1 changed files, with 2 additions and 7 deletions.

... ...
@@ -15,13 +15,8 @@ class ProjectInfosPlugin extends VGPlugin
15 15
 	function hook_summary() {
16 16
 		global $page;
17 17
 		$page['project_infos']=get_project_info($page['project']);
18
-		if (isset($conf['projects'][$project]['url'])) {
19
-			if (is_array($conf['projects'][$project]['url'])) {
20
-				$page['project_infos']['url']=array($conf['projects'][$project]['url']);
21
-			}
22
-			else {
23
-				$page['project_infos']['url']=$conf['projects'][$project]['url'];
24
-			}
18
+		if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
19
+			$page['project_infos']['url']=array($page['project_infos']['url']);
25 20
 		}
26 21
 		$this->display_plugin_template('summary', FALSE);
27 22
 	}
28 23