mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-25 14:41:50 +01:00
- Reset accidental commit using et2
- Set current app before validating to use app-specific values (category)
This commit is contained in:
parent
eae9b67d3c
commit
9846011ec2
@ -35,9 +35,9 @@ if (!isset($GLOBALS['egw_info']))
|
|||||||
*
|
*
|
||||||
* @ToDo supported customized templates stored in DB, currently we only support xet files stored in filesystem
|
* @ToDo supported customized templates stored in DB, currently we only support xet files stored in filesystem
|
||||||
*/
|
*/
|
||||||
//class etemplate extends etemplate_old {};
|
class etemplate extends etemplate_old {};
|
||||||
//class etemplate_new extends etemplate_widget_template
|
class etemplate_new extends etemplate_widget_template
|
||||||
class etemplate extends etemplate_widget_template
|
//class etemplate extends etemplate_widget_template
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Are we running as sitemgr module or not
|
* Are we running as sitemgr module or not
|
||||||
@ -214,6 +214,12 @@ class etemplate extends etemplate_widget_template
|
|||||||
{
|
{
|
||||||
throw new egw_exception_wrong_parameter('Can NOT read template '.array2string(self::$request->template));
|
throw new egw_exception_wrong_parameter('Can NOT read template '.array2string(self::$request->template));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set current app for validation
|
||||||
|
list($app) = explode('.',self::$request->method);
|
||||||
|
if(!$app) list($app) = explode('::',self::$request->method);
|
||||||
|
if($app) $GLOBALS['egw_info']['flags']['currentapp'] = $app;
|
||||||
|
|
||||||
$validated = array();
|
$validated = array();
|
||||||
$expand = array(
|
$expand = array(
|
||||||
'cont' => &self::$request->content,
|
'cont' => &self::$request->content,
|
||||||
|
@ -275,7 +275,8 @@ class etemplate_widget_menupopup extends etemplate_widget
|
|||||||
$no_lang = True;
|
$no_lang = True;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'select-cat': // !$type == globals cats too, $type2: extraStyleMultiselect, $type3: application, if not current-app, $type4: parent-id, $type5=owner (-1=global),$type6=show missing
|
case 'select-cat': // !$type == globals cats too, $type3: extraStyleMultiselect, $type3: application, if not current-app, $type4: parent-id, $type5=owner (-1=global),$type6=show missing
|
||||||
|
error_log("---CATS: $type, 2: $type2, 3: $type3, 4: $type4, 5: $type5, 6: $type6");
|
||||||
if ((!$type3 || $type3 === $GLOBALS['egw']->categories->app_name) &&
|
if ((!$type3 || $type3 === $GLOBALS['egw']->categories->app_name) &&
|
||||||
(!$type5 || $type5 == $GLOBALS['egw']->categories->account_id))
|
(!$type5 || $type5 == $GLOBALS['egw']->categories->account_id))
|
||||||
{
|
{
|
||||||
@ -285,6 +286,7 @@ class etemplate_widget_menupopup extends etemplate_widget
|
|||||||
{
|
{
|
||||||
$categories = new categories($type5,$type3);
|
$categories = new categories($type5,$type3);
|
||||||
}
|
}
|
||||||
|
error_log("--- CAT APPNAME: {$categories->app_name}");
|
||||||
// Allow text for global
|
// Allow text for global
|
||||||
$type = ($type && strlen($type) > 1 ? $type : !$type);
|
$type = ($type && strlen($type) > 1 ? $type : !$type);
|
||||||
// we cast $type4 (parent) to int, to get default of 0 if omitted
|
// we cast $type4 (parent) to int, to get default of 0 if omitted
|
||||||
|
Loading…
Reference in New Issue
Block a user