[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10017] API: new function for getting phpgw_info para
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10017] API: new function for getting phpgw_info parametres from xsl-templates |
Date: |
Fri, 21 Sep 2012 11:30:07 +0000 |
Revision: 10017
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10017
Author: sigurdne
Date: 2012-09-21 11:30:07 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
API: new function for getting phpgw_info parametres from xsl-templates
Modified Paths:
--------------
trunk/phpgwapi/inc/functions.inc.php
Modified: trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- trunk/phpgwapi/inc/functions.inc.php 2012-09-21 08:40:27 UTC (rev
10016)
+++ trunk/phpgwapi/inc/functions.inc.php 2012-09-21 11:30:07 UTC (rev
10017)
@@ -89,7 +89,26 @@
}
+
/**
+ * Get global phpgw_info from XSLT templates
+ * @param string on the format 'user|preferences|common|dateformat'
+ * @return array or string depending on if param is representing a node
+ */
+
+ function get_phpgw_info($key)
+ {
+ $_keys = explode('|',$key);
+
+ $ret = $GLOBALS['phpgw_info'];
+ foreach ($_keys as $_var)
+ {
+ $ret = $ret[$_var];
+ }
+ return $ret;
+ }
+
+ /**
* cleans up a backtrace array and converts it to a string
*
* @internal this is such an ugly piece of code due to a reference to
the error context
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10017] API: new function for getting phpgw_info parametres from xsl-templates,
Sigurd Nes <=