[evolvis-commits] r17745: finally, this works as it should, I think

mirabilos at evolvis.org mirabilos at evolvis.org
Wed Nov 30 16:28:52 CET 2011


Author: mirabilos
Date: 2011-11-30 16:28:51 +0100 (Wed, 30 Nov 2011)
New Revision: 17745

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/common/ExtraTabsPlugin.class.php
   trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/www/iframe.php
Log:
finally, this works as it should, I think

[#2214] pending merges:
  Thorsten Glaser 2011-11-30 make global extratabs even more global
    Thorsten Glaser 2011-11-30 apply some escape
    Thorsten Glaser 2011-11-30 make global extratabs really global


Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/common/ExtraTabsPlugin.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/common/ExtraTabsPlugin.class.php	2011-11-30 15:28:47 UTC (rev 17744)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/common/ExtraTabsPlugin.class.php	2011-11-30 15:28:51 UTC (rev 17745)
@@ -104,7 +104,7 @@
 						break;
 
 					case 1: // Iframe
-						$params['DIRS'][] = '/plugins/'.$this->name.'/iframe.php?group_id='.$group_id.'&tab_name='.$row_tab['tab_name'];
+						$params['DIRS'][] = '/plugins/'.$this->name.'/iframe.php?group_id='.$group_id.'&tab_name='.urlencode($row_tab['tab_name']);
 						if (isset($params['toptab']) && ($params['toptab'] == $row_tab['tab_name'])) {
 							$params['selected'] = count($params['TITLES']) - 1;
 						}

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/www/iframe.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/www/iframe.php	2011-11-30 15:28:47 UTC (rev 17744)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/extratabs/www/iframe.php	2011-11-30 15:28:51 UTC (rev 17745)
@@ -39,12 +39,29 @@
 						array ($group_id, $tab_name));
 if ($result && db_numrows($result)) {
 	$tab_url = rtrim(db_result($result, 0, 'tab_url'), '/');
-	site_project_header(array('title'=>_($tab_name), 'group' => $group_id, 'toptab'=>$tab_name));
+	$params = array(
+		'title' => $tab_name,
+		'toptab' => $tab_name,
+	    );
+	if ($group_id == 1) {
+		$params['h1'] = $tab_name;
+		unset($group_id);
+		site_header($params);
+		$is_global = true;
+	} else {
+		$params['group'] = $group_id;
+		site_project_header($params);
+		$is_global = false;
+	}
 	?>
 	<iframe src="<?php echo util_html_secure($tab_url) ?>"
 	 frameborder="0" height="600px" width="100%"></iframe>
 	<?php
-	site_project_footer(array());
+	if ($is_global) {
+		site_footer($params);
+	} else {
+		site_project_footer($params);
+	}
 }
 
 // Local Variables:



More information about the evolvis-commits mailing list