Author: ralfbecker
New Revision: 55900
URL: http://svn.stylite.de/viewvc/egroupware?rev=55900&view=rev
Log:
move common::get_tpl_dir to Api\Framework\Template::get_dir, and replaced some other overlooked methods
Modified:
trunk/egroupware/api/src/Egw/Base.php
trunk/egroupware/api/src/Etemplate/Widget/Select.php
trunk/egroupware/api/src/Etemplate/Widget/Tree.php
trunk/egroupware/api/src/Framework/Template.php
trunk/egroupware/api/src/Html/HtmLawed.php
trunk/egroupware/api/src/Link.php
trunk/phpgwapi/inc/class.common.inc.php
— trunk/egroupware/api/src/Egw/Base.php (original)
+++ trunk/egroupware/api/src/Egw/Base.php Wed Apr 27 21:11:41 2016
@@ -109,7 +109,7 @@
case ‘framework’:
return $this->framework = Api\Framework::factory();
case ‘template’: // need to be instancated for the current app
— trunk/egroupware/api/src/Etemplate/Widget/Select.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Select.php Wed Apr 27 21:11:41 2016
@@ -801,11 +801,11 @@
*
* @param int $id
* @param array $acc =null optional values for keys account_(type|lid|lastname|firstname) to not read them again
-
-
-
@param boolean $show_type true: return array with values for keys label and icon, false: only label
-
-
-
@param boolean $show_type =false true: return array with values for keys label and icon, false: only label
-
@return string|array
*/
- private static function accountInfo($id,$acc=null,$longnames=0,$show_type=false)
- public static function accountInfo($id,$acc=null,$longnames=0,$show_type=false)
{
if (!$id)
{
— trunk/egroupware/api/src/Etemplate/Widget/Tree.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Tree.php Wed Apr 27 21:11:41 2016
@@ -335,7 +335,7 @@
/**
* Return image relative to trees image-path
*
-
-
@param string $image url of image, eg. from common::image($image, $app)
-
-
@param string $image url of image, eg. from Api\Image::find($image, $app)
-
@return string path relative to image-path, to use when returning tree data eg. via json
*/
public static function imagePath($image)
— trunk/egroupware/api/src/Framework/Template.php (original)
+++ trunk/egroupware/api/src/Framework/Template.php Wed Apr 27 21:11:41 2016
@@ -559,4 +559,59 @@
}
return False;
}
+
- /**
-
- get template dir of an application
-
-
-
@param $appname appication name optional can be derived from $GLOBALS[‘egw_info’][‘flags’][‘currentapp’];
-
-
@return string|boolean dir or false if no dir is found
- */
- static function get_dir($appname = ‘’)
- {
-
if (!$appname)
-
{
-
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
-
}
-
if ($appname == 'logout' || $appname == 'login')
-
{
-
$appname = 'phpgwapi';
-
}
-
-
if (!isset($GLOBALS['egw_info']['server']['template_set']) && isset($GLOBALS['egw_info']['user']['preferences']['common']['template_set']))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
-
}
-
-
// Setting this for display of template choices in user preferences
-
if ($GLOBALS['egw_info']['server']['template_set'] == 'user_choice')
-
{
-
$GLOBALS['egw_info']['server']['usrtplchoice'] = 'user_choice';
-
}
-
-
if (($GLOBALS['egw_info']['server']['template_set'] == 'user_choice' ||
-
!isset($GLOBALS['egw_info']['server']['template_set'])) &&
-
isset($GLOBALS['egw_info']['user']['preferences']['common']['template_set']))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
-
}
-
if (!file_exists(EGW_SERVER_ROOT.'/phpgwapi/templates/'.basename($GLOBALS['egw_info']['server']['template_set']).'/class.'.
-
$GLOBALS['egw_info']['server']['template_set'].'_framework.inc.php') &&
-
!file_exists(EGW_SERVER_ROOT.'/'.basename($GLOBALS['egw_info']['server']['template_set']).'/inc/class.'.
-
$GLOBALS['egw_info']['server']['template_set'].'_framework.inc.php'))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = 'idots';
-
}
-
$tpldir = EGW_SERVER_ROOT . '/' . $appname . '/templates/' . $GLOBALS['egw_info']['server']['template_set'];
-
$tpldir_default = EGW_SERVER_ROOT . '/' . $appname . '/templates/default';
-
-
if (@is_dir($tpldir))
-
{
-
return $tpldir;
-
}
-
elseif (@is_dir($tpldir_default))
-
{
-
return $tpldir_default;
-
}
-
return False;
- }
}
— trunk/egroupware/api/src/Html/HtmLawed.php (original)
+++ trunk/egroupware/api/src/Html/HtmLawed.php Wed Apr 27 21:11:41 2016
@@ -389,7 +389,7 @@
{
$attribute_array[‘alt’]= $attribute_array[‘alt’].’ [blocked (reason: url length):’.$attribute_array[‘src’].’]’;
if (!isset($attribute_array[‘title’])) $attribute_array[‘title’]=$attribute_array[‘alt’];
@@ -400,7 +400,7 @@
{
$attribute_array[‘alt’]= $attribute_array[‘alt’].’ [blocked external image:’.$attribute_array[‘src’].’]’;
if (!isset($attribute_array[‘title’])) $attribute_array[‘title’]=$attribute_array[‘alt’];
— trunk/egroupware/api/src/Link.php (original)
+++ trunk/egroupware/api/src/Link.php Wed Apr 27 21:11:41 2016
@@ -145,7 +145,7 @@
‘name’ => ‘Accounts’,
‘icon’ => ‘addressbook/accounts’,
‘query’ => ‘accounts::link_query’,
-
'title' => 'EGroupware\\Api\\Accounts::username',
'view' => array('menuaction'=>'addressbook.addressbook_ui.view','ajax'=>'true'),
'view_id' => 'account_id'
),
— trunk/phpgwapi/inc/class.common.inc.php (original)
+++ trunk/phpgwapi/inc/class.common.inc.php Wed Apr 27 21:11:41 2016
@@ -489,54 +489,11 @@
*
* @param $appname appication name optional can be derived from $GLOBALS[‘egw_info’][‘flags’][‘currentapp’];
* @return string|boolean dir or false if no dir is found
-
-
@deprecated use Api\Framework\Template::get_dir($appname)
*/
static function get_tpl_dir($appname = ‘’)
{
-
if (!$appname)
-
{
-
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
-
}
-
if ($appname == 'logout' || $appname == 'login')
-
{
-
$appname = 'phpgwapi';
-
}
-
-
if (!isset($GLOBALS['egw_info']['server']['template_set']) && isset($GLOBALS['egw_info']['user']['preferences']['common']['template_set']))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
-
}
-
-
// Setting this for display of template choices in user preferences
-
if ($GLOBALS['egw_info']['server']['template_set'] == 'user_choice')
-
{
-
$GLOBALS['egw_info']['server']['usrtplchoice'] = 'user_choice';
-
}
-
-
if (($GLOBALS['egw_info']['server']['template_set'] == 'user_choice' ||
-
!isset($GLOBALS['egw_info']['server']['template_set'])) &&
-
isset($GLOBALS['egw_info']['user']['preferences']['common']['template_set']))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
-
}
-
if (!file_exists(EGW_SERVER_ROOT.'/phpgwapi/templates/'.basename($GLOBALS['egw_info']['server']['template_set']).'/class.'.
-
$GLOBALS['egw_info']['server']['template_set'].'_framework.inc.php') &&
-
!file_exists(EGW_SERVER_ROOT.'/'.basename($GLOBALS['egw_info']['server']['template_set']).'/inc/class.'.
-
$GLOBALS['egw_info']['server']['template_set'].'_framework.inc.php'))
-
{
-
$GLOBALS['egw_info']['server']['template_set'] = 'idots';
-
}
-
$tpldir = EGW_SERVER_ROOT . '/' . $appname . '/templates/' . $GLOBALS['egw_info']['server']['template_set'];
-
$tpldir_default = EGW_SERVER_ROOT . '/' . $appname . '/templates/default';
-
-
if (@is_dir($tpldir))
-
{
-
return $tpldir;
-
}
-
elseif (@is_dir($tpldir_default))
-
{
-
return $tpldir_default;
-
}
-
return False;
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs