浏览代码

Fixed a regression introduced by [r3141]: display of objects templates was broken.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3242 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 年之前
父节点
当前提交
5a569ba617
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      application/webpage.class.inc.php

+ 10 - 1
application/webpage.class.inc.php

@@ -788,9 +788,18 @@ class TabManager
 		return $iLength;
 		return $iLength;
 	}
 	}
 	
 	
+	/**
+	 * Truncates the given tab to the specifed length and returns the truncated part
+	 * @param string $sTabContainer The tab container in which to truncate the tab
+	 * @param string $sTab The name/identifier of the tab to truncate
+	 * @param integer $iLength The length/offset at which to truncate the tab
+	 * @return string The truncated part
+	 */
 	public function TruncateTab($sTabContainer, $sTab, $iLength)
 	public function TruncateTab($sTabContainer, $sTab, $iLength)
 	{
 	{
-		$this->m_aTabs[$this->m_sCurrentTabContainer]['tabs'][$this->m_sCurrentTab]['html'] = substr($this->m_aTabs[$this->m_sCurrentTabContainer]['tabs'][$this->m_sCurrentTab]['html'], 0, $iLength);	
+		$sResult = substr($this->m_aTabs[$this->m_sCurrentTabContainer]['tabs'][$this->m_sCurrentTab]['html'], $iLength);
+		$this->m_aTabs[$this->m_sCurrentTabContainer]['tabs'][$this->m_sCurrentTab]['html'] = substr($this->m_aTabs[$this->m_sCurrentTabContainer]['tabs'][$this->m_sCurrentTab]['html'], 0, $iLength);
+		return $sResult;	
 	}
 	}
 	
 	
 	public function TabExists($sTabContainer, $sTab)
 	public function TabExists($sTabContainer, $sTab)