@@ -41,36 +41,36 @@ discard block |
||
41 | 41 | |
42 | 42 | class ViewModule extends SugarView |
43 | 43 | { |
44 | - var $mbModule; |
|
44 | + var $mbModule; |
|
45 | 45 | |
46 | - /** |
|
47 | - * @see SugarView::_getModuleTitleParams() |
|
48 | - */ |
|
49 | - protected function _getModuleTitleParams($browserTitle = false) |
|
50 | - { |
|
51 | - global $mod_strings; |
|
46 | + /** |
|
47 | + * @see SugarView::_getModuleTitleParams() |
|
48 | + */ |
|
49 | + protected function _getModuleTitleParams($browserTitle = false) |
|
50 | + { |
|
51 | + global $mod_strings; |
|
52 | 52 | |
53 | - return array( |
|
54 | - translate('LBL_MODULE_NAME','Administration'), |
|
55 | - ModuleBuilderController::getModuleTitle(), |
|
56 | - ); |
|
53 | + return array( |
|
54 | + translate('LBL_MODULE_NAME','Administration'), |
|
55 | + ModuleBuilderController::getModuleTitle(), |
|
56 | + ); |
|
57 | 57 | } |
58 | 58 | |
59 | - function display() |
|
60 | - { |
|
61 | - global $mod_strings; |
|
62 | - $smarty = new Sugar_Smarty(); |
|
59 | + function display() |
|
60 | + { |
|
61 | + global $mod_strings; |
|
62 | + $smarty = new Sugar_Smarty(); |
|
63 | 63 | |
64 | - require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); |
|
65 | - $mb = new ModuleBuilder(); |
|
66 | - $mb->getPackage($_REQUEST['view_package']); |
|
67 | - $package = $mb->packages[$_REQUEST['view_package']]; |
|
68 | - $module_name = (!empty($_REQUEST['view_module']))?$_REQUEST['view_module']:''; |
|
69 | - $package->getModule($module_name); |
|
70 | - $this->mbModule = $package->modules[$module_name]; |
|
71 | - $this->loadPackageHelp($module_name); |
|
64 | + require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); |
|
65 | + $mb = new ModuleBuilder(); |
|
66 | + $mb->getPackage($_REQUEST['view_package']); |
|
67 | + $package = $mb->packages[$_REQUEST['view_package']]; |
|
68 | + $module_name = (!empty($_REQUEST['view_module']))?$_REQUEST['view_module']:''; |
|
69 | + $package->getModule($module_name); |
|
70 | + $this->mbModule = $package->modules[$module_name]; |
|
71 | + $this->loadPackageHelp($module_name); |
|
72 | 72 | |
73 | - // set up the list of either available types for a new module, or implemented types for an existing one |
|
73 | + // set up the list of either available types for a new module, or implemented types for an existing one |
|
74 | 74 | $types = (empty($module_name)) ? MBModule::getTypes() : $this->mbModule->mbvardefs->templates ; |
75 | 75 | |
76 | 76 | foreach( $types as $type=>$definition) |
@@ -80,28 +80,28 @@ discard block |
||
80 | 80 | natcasesort($translated_type); |
81 | 81 | $smarty->assign('types',$translated_type); |
82 | 82 | |
83 | - $smarty->assign('package', $package); |
|
84 | - $smarty->assign('module', $this->mbModule); |
|
85 | - $smarty->assign('mod_strings', $mod_strings); |
|
83 | + $smarty->assign('package', $package); |
|
84 | + $smarty->assign('module', $this->mbModule); |
|
85 | + $smarty->assign('mod_strings', $mod_strings); |
|
86 | 86 | |
87 | - $ajax = new AjaxCompose(); |
|
88 | - $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")'); |
|
89 | - $ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")'); |
|
90 | - if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder'); |
|
91 | - $ajax->addCrumb($module_name, ''); |
|
92 | - $html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl'); |
|
93 | - if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule') |
|
94 | - $html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>"; |
|
95 | - $ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html); |
|
87 | + $ajax = new AjaxCompose(); |
|
88 | + $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")'); |
|
89 | + $ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")'); |
|
90 | + if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder'); |
|
91 | + $ajax->addCrumb($module_name, ''); |
|
92 | + $html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl'); |
|
93 | + if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule') |
|
94 | + $html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>"; |
|
95 | + $ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html); |
|
96 | 96 | |
97 | - echo $ajax->getJavascript(); |
|
98 | - } |
|
97 | + echo $ajax->getJavascript(); |
|
98 | + } |
|
99 | 99 | |
100 | - function loadPackageHelp( |
|
101 | - $name |
|
102 | - ) |
|
103 | - { |
|
100 | + function loadPackageHelp( |
|
101 | + $name |
|
102 | + ) |
|
103 | + { |
|
104 | 104 | $this->mbModule->help['default'] = (empty($name))?'create':'modify'; |
105 | 105 | $this->mbModule->help['group'] = 'module'; |
106 | - } |
|
106 | + } |
|
107 | 107 | } |
108 | 108 | \ No newline at end of file |
@@ -48,88 +48,88 @@ |
||
48 | 48 | |
49 | 49 | class ViewSearchView extends ViewListView |
50 | 50 | { |
51 | - function __construct() |
|
52 | - { |
|
53 | - parent::__construct(); |
|
54 | - if (!empty($_REQUEST['searchlayout'])) { |
|
55 | - $this->editLayout = $_REQUEST['searchlayout']; |
|
56 | - } |
|
57 | - } |
|
51 | + function __construct() |
|
52 | + { |
|
53 | + parent::__construct(); |
|
54 | + if (!empty($_REQUEST['searchlayout'])) { |
|
55 | + $this->editLayout = $_REQUEST['searchlayout']; |
|
56 | + } |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * @see SugarView::_getModuleTitleParams() |
|
61 | - */ |
|
62 | - protected function _getModuleTitleParams($browserTitle = false) |
|
63 | - { |
|
64 | - global $mod_strings; |
|
59 | + /** |
|
60 | + * @see SugarView::_getModuleTitleParams() |
|
61 | + */ |
|
62 | + protected function _getModuleTitleParams($browserTitle = false) |
|
63 | + { |
|
64 | + global $mod_strings; |
|
65 | 65 | |
66 | - return array( |
|
67 | - translate('LBL_MODULE_NAME','Administration'), |
|
68 | - ModuleBuilderController::getModuleTitle(), |
|
69 | - ); |
|
66 | + return array( |
|
67 | + translate('LBL_MODULE_NAME','Administration'), |
|
68 | + ModuleBuilderController::getModuleTitle(), |
|
69 | + ); |
|
70 | 70 | } |
71 | 71 | |
72 | - // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module |
|
73 | - function preDisplay() |
|
74 | - { |
|
75 | - } |
|
72 | + // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module |
|
73 | + function preDisplay() |
|
74 | + { |
|
75 | + } |
|
76 | 76 | |
77 | - function display( |
|
78 | - $preview = false |
|
79 | - ) |
|
80 | - { |
|
81 | - $packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ; |
|
82 | - require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ; |
|
83 | - $parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ; |
|
77 | + function display( |
|
78 | + $preview = false |
|
79 | + ) |
|
80 | + { |
|
81 | + $packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ; |
|
82 | + require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ; |
|
83 | + $parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ; |
|
84 | 84 | |
85 | - $smarty = parent::constructSmarty ( $parser ) ; |
|
86 | - $smarty->assign ( 'action', 'searchViewSave' ) ; |
|
87 | - $smarty->assign ( 'view', $this->editLayout ) ; |
|
88 | - $smarty->assign ( 'helpName', 'searchViewEditor' ) ; |
|
89 | - $smarty->assign ( 'helpDefault', 'modify' ) ; |
|
85 | + $smarty = parent::constructSmarty ( $parser ) ; |
|
86 | + $smarty->assign ( 'action', 'searchViewSave' ) ; |
|
87 | + $smarty->assign ( 'view', $this->editLayout ) ; |
|
88 | + $smarty->assign ( 'helpName', 'searchViewEditor' ) ; |
|
89 | + $smarty->assign ( 'helpDefault', 'modify' ) ; |
|
90 | 90 | |
91 | - if ($preview) |
|
92 | - { |
|
93 | - echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
94 | - } else |
|
95 | - { |
|
96 | - $ajax = $this->constructAjax () ; |
|
97 | - $ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
98 | - echo $ajax->getJavascript () ; |
|
99 | - } |
|
100 | - } |
|
91 | + if ($preview) |
|
92 | + { |
|
93 | + echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
94 | + } else |
|
95 | + { |
|
96 | + $ajax = $this->constructAjax () ; |
|
97 | + $ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
98 | + echo $ajax->getJavascript () ; |
|
99 | + } |
|
100 | + } |
|
101 | 101 | |
102 | - function constructAjax() |
|
103 | - { |
|
104 | - require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ; |
|
105 | - $ajax = new AjaxCompose ( ) ; |
|
106 | - switch ( $this->editLayout ) |
|
107 | - { |
|
108 | - default: |
|
109 | - $searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ; |
|
110 | - } |
|
102 | + function constructAjax() |
|
103 | + { |
|
104 | + require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ; |
|
105 | + $ajax = new AjaxCompose ( ) ; |
|
106 | + switch ( $this->editLayout ) |
|
107 | + { |
|
108 | + default: |
|
109 | + $searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ; |
|
110 | + } |
|
111 | 111 | |
112 | 112 | $layoutLabel = 'LBL_LAYOUTS' ; |
113 | 113 | $layoutView = 'layouts' ; |
114 | 114 | |
115 | 115 | |
116 | - if ($this->fromModuleBuilder) |
|
117 | - { |
|
118 | - $ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ; |
|
119 | - $ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
|
120 | - $ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")' ) ; |
|
121 | - $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")' ) ; |
|
122 | - if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
|
123 | - $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
|
124 | - } else |
|
125 | - { |
|
126 | - $ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ; |
|
127 | - $ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")' ) ; |
|
128 | - $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")' ) ; |
|
129 | - if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ; |
|
130 | - $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
|
131 | - } |
|
132 | - $this->title = $searchLabel; |
|
133 | - return $ajax ; |
|
134 | - } |
|
116 | + if ($this->fromModuleBuilder) |
|
117 | + { |
|
118 | + $ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ; |
|
119 | + $ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
|
120 | + $ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")' ) ; |
|
121 | + $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")' ) ; |
|
122 | + if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
|
123 | + $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
|
124 | + } else |
|
125 | + { |
|
126 | + $ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ; |
|
127 | + $ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")' ) ; |
|
128 | + $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")' ) ; |
|
129 | + if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ; |
|
130 | + $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
|
131 | + } |
|
132 | + $this->title = $searchLabel; |
|
133 | + return $ajax ; |
|
134 | + } |
|
135 | 135 | } |
@@ -40,40 +40,40 @@ |
||
40 | 40 | require_once('modules/ModuleBuilder/MB/AjaxCompose.php'); |
41 | 41 | class ViewExportcustomizations extends SugarView |
42 | 42 | { |
43 | - /** |
|
44 | - * @see SugarView::_getModuleTitleParams() |
|
45 | - */ |
|
46 | - protected function _getModuleTitleParams($browserTitle = false) |
|
47 | - { |
|
48 | - global $mod_strings; |
|
43 | + /** |
|
44 | + * @see SugarView::_getModuleTitleParams() |
|
45 | + */ |
|
46 | + protected function _getModuleTitleParams($browserTitle = false) |
|
47 | + { |
|
48 | + global $mod_strings; |
|
49 | 49 | |
50 | - return array( |
|
51 | - translate('LBL_MODULE_NAME','Administration'), |
|
52 | - ModuleBuilderController::getModuleTitle(), |
|
53 | - ); |
|
50 | + return array( |
|
51 | + translate('LBL_MODULE_NAME','Administration'), |
|
52 | + ModuleBuilderController::getModuleTitle(), |
|
53 | + ); |
|
54 | 54 | } |
55 | 55 | |
56 | - function display() |
|
57 | - { |
|
58 | - global $current_user, $mod_strings; |
|
59 | - $smarty = new Sugar_Smarty(); |
|
60 | - $mb = new MBPackage("packageCustom"); |
|
61 | - $mod=$mb->getCustomModules(); |
|
62 | - foreach($mod as $key => $value){ |
|
63 | - $modules[]=$key; |
|
64 | - $custom[]=$value; |
|
65 | - } |
|
66 | - $nb_mod = count($modules); |
|
67 | - $smarty->assign('mod_strings', $mod_strings); |
|
68 | - $smarty->assign('modules', $mod); |
|
69 | - $smarty->assign('custom', $custom); |
|
70 | - $smarty->assign('nb_mod', $nb_mod); |
|
71 | - $smarty->assign('defaultHelp', 'exportHelp'); |
|
72 | - $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']); |
|
73 | - $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']); |
|
74 | - $ajax = new AjaxCompose(); |
|
75 | - $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")'); |
|
76 | - $ajax->addSection('center', $mod_strings['LBL_EC_TITLE'],$smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl'))); |
|
77 | - echo $ajax->getJavascript(); |
|
78 | - } |
|
56 | + function display() |
|
57 | + { |
|
58 | + global $current_user, $mod_strings; |
|
59 | + $smarty = new Sugar_Smarty(); |
|
60 | + $mb = new MBPackage("packageCustom"); |
|
61 | + $mod=$mb->getCustomModules(); |
|
62 | + foreach($mod as $key => $value){ |
|
63 | + $modules[]=$key; |
|
64 | + $custom[]=$value; |
|
65 | + } |
|
66 | + $nb_mod = count($modules); |
|
67 | + $smarty->assign('mod_strings', $mod_strings); |
|
68 | + $smarty->assign('modules', $mod); |
|
69 | + $smarty->assign('custom', $custom); |
|
70 | + $smarty->assign('nb_mod', $nb_mod); |
|
71 | + $smarty->assign('defaultHelp', 'exportHelp'); |
|
72 | + $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']); |
|
73 | + $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']); |
|
74 | + $ajax = new AjaxCompose(); |
|
75 | + $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")'); |
|
76 | + $ajax->addSection('center', $mod_strings['LBL_EC_TITLE'],$smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl'))); |
|
77 | + echo $ajax->getJavascript(); |
|
78 | + } |
|
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | class ViewRelationship extends SugarView |
48 | 48 | { |
49 | 49 | /** |
50 | - * @see SugarView::_getModuleTitleParams() |
|
51 | - */ |
|
52 | - protected function _getModuleTitleParams($browserTitle = false) |
|
53 | - { |
|
54 | - global $mod_strings; |
|
50 | + * @see SugarView::_getModuleTitleParams() |
|
51 | + */ |
|
52 | + protected function _getModuleTitleParams($browserTitle = false) |
|
53 | + { |
|
54 | + global $mod_strings; |
|
55 | 55 | |
56 | - return array( |
|
57 | - translate('LBL_MODULE_NAME','Administration'), |
|
58 | - ModuleBuilderController::getModuleTitle(), |
|
59 | - ); |
|
56 | + return array( |
|
57 | + translate('LBL_MODULE_NAME','Administration'), |
|
58 | + ModuleBuilderController::getModuleTitle(), |
|
59 | + ); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | function overrideDefinitionFromPOST( |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | require_once 'modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' ; |
67 | 67 | foreach ( AbstractRelationship::$definitionKeys as $key ) |
68 | 68 | { |
69 | - if(!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label')) ){ |
|
70 | - continue; |
|
71 | - } |
|
69 | + if(!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label')) ){ |
|
70 | + continue; |
|
71 | + } |
|
72 | 72 | if (! empty ( $_REQUEST [ $key ] )) |
73 | 73 | { |
74 | 74 | $definition [ $key ] = $_REQUEST [ $key ] ; |
@@ -92,15 +92,15 @@ discard block |
||
92 | 92 | $fields = $module->fields ; |
93 | 93 | require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; |
94 | 94 | $relatableModules = DeployedRelationships::findRelatableModules () ; |
95 | - $appStrings = return_app_list_strings_language( $selected_lang ) ; |
|
96 | - $modStrings = return_module_language( $selected_lang, $_REQUEST [ 'view_module' ], true ) ; |
|
97 | - $appStrings = $appStrings['moduleList']; |
|
95 | + $appStrings = return_app_list_strings_language( $selected_lang ) ; |
|
96 | + $modStrings = return_module_language( $selected_lang, $_REQUEST [ 'view_module' ], true ) ; |
|
97 | + $appStrings = $appStrings['moduleList']; |
|
98 | 98 | } else |
99 | 99 | { |
100 | 100 | $mb = new ModuleBuilder ( ) ; |
101 | - $mb->getPackages(); |
|
102 | - //display the latest module name rather than what is in or not in the loaded app_list_strings. |
|
103 | - $mb->getPackage($_REQUEST ['view_package'])->loadModuleTitles(); |
|
101 | + $mb->getPackages(); |
|
102 | + //display the latest module name rather than what is in or not in the loaded app_list_strings. |
|
103 | + $mb->getPackage($_REQUEST ['view_package'])->loadModuleTitles(); |
|
104 | 104 | $module = $mb->getPackageModule ( $_REQUEST [ 'view_package' ], $_REQUEST [ 'view_module' ] ) ; |
105 | 105 | $moduleName = empty($module->key_name) ? $module->getModuleName() : $module->key_name; |
106 | 106 | $this->smarty->assign ( 'view_package', $_REQUEST [ 'view_package' ] ) ; |
@@ -132,16 +132,16 @@ discard block |
||
132 | 132 | $relationship->setName($_REQUEST [ 'relationship_name' ] ); |
133 | 133 | $definition = $relationship->getDefinition(); |
134 | 134 | if (!$this->fromModuleBuilder){ |
135 | - $modStrings = return_module_language( $selected_lang, $relationship->rhs_module, true ) ; |
|
136 | - $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module; |
|
137 | - $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ; |
|
138 | - $definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ; |
|
139 | - }else{ |
|
140 | - #30624 |
|
141 | - if(!empty($_REQUEST['rhs_module'])){ |
|
142 | - $definition['rhs_label'] = $_REQUEST['rhs_module']; |
|
143 | - } |
|
144 | - } |
|
135 | + $modStrings = return_module_language( $selected_lang, $relationship->rhs_module, true ) ; |
|
136 | + $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module; |
|
137 | + $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ; |
|
138 | + $definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ; |
|
139 | + }else{ |
|
140 | + #30624 |
|
141 | + if(!empty($_REQUEST['rhs_module'])){ |
|
142 | + $definition['rhs_label'] = $_REQUEST['rhs_module']; |
|
143 | + } |
|
144 | + } |
|
145 | 145 | } else |
146 | 146 | { |
147 | 147 | $definition = array ( ) ; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | if (empty($definition ['rhs_label'])) |
158 | 158 | { |
159 | - $definition ['rhs_label'] = translate($definition [ 'rhs_module' ]); |
|
159 | + $definition ['rhs_label'] = translate($definition [ 'rhs_module' ]); |
|
160 | 160 | } |
161 | 161 | if (empty($definition ['lhs_label'])) |
162 | 162 | { |
@@ -185,17 +185,17 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Activities') { |
188 | - $cardinality = array( MB_ONETOMANY => translate ( 'LBL_ONETOMANY' )); |
|
188 | + $cardinality = array( MB_ONETOMANY => translate ( 'LBL_ONETOMANY' )); |
|
189 | 189 | } |
190 | 190 | //Bug 23139, Campaigns module current cannot display custom subpanels, so we need to ban it from any |
191 | 191 | //relationships that would require a new subpanel to be shown in Campaigns. |
192 | - if (isset ($definition['lhs_module']) && $definition['lhs_module'] == 'Campaigns') { |
|
193 | - unset ( $cardinality [ MB_MANYTOMANY ] ) ; |
|
194 | - unset ( $cardinality [ MB_ONETOMANY ] ) ; |
|
192 | + if (isset ($definition['lhs_module']) && $definition['lhs_module'] == 'Campaigns') { |
|
193 | + unset ( $cardinality [ MB_MANYTOMANY ] ) ; |
|
194 | + unset ( $cardinality [ MB_ONETOMANY ] ) ; |
|
195 | 195 | } |
196 | - if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [ MB_MANYTOMANY ])) { |
|
197 | - unset ( $cardinality [ MB_MANYTOMANY ] ) ; |
|
198 | - unset ( $cardinality [ MB_MANYTOONE ] ); |
|
196 | + if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [ MB_MANYTOMANY ])) { |
|
197 | + unset ( $cardinality [ MB_MANYTOMANY ] ) ; |
|
198 | + unset ( $cardinality [ MB_MANYTOONE ] ); |
|
199 | 199 | } |
200 | 200 | if (! isset($cardinality[$relationship->getType()])) |
201 | 201 | { |
@@ -206,12 +206,12 @@ discard block |
||
206 | 206 | |
207 | 207 | $this->smarty->assign ( 'is_new', true ) ; |
208 | 208 | } else { |
209 | - $this->smarty->assign ( 'is_new', false ) ; |
|
209 | + $this->smarty->assign ( 'is_new', false ) ; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | //Remove Activities if one-to-many is not availible |
213 | - if (!isset($cardinality [ MB_ONETOMANY ]) && isset ($relatableModules['Activities'])) { |
|
214 | - unset ($relatableModules['Activities']); |
|
213 | + if (!isset($cardinality [ MB_ONETOMANY ]) && isset ($relatableModules['Activities'])) { |
|
214 | + unset ($relatableModules['Activities']); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $this->smarty->assign ( 'rhspanels', $rhs_subpanels ) ; |
238 | 238 | $this->smarty->assign ( 'lhspanels', $lhs_subpanels ) ; |
239 | 239 | $this->smarty->assign('selected_lang', $selected_lang); |
240 | - $this->smarty->assign('available_languages',get_languages()); |
|
240 | + $this->smarty->assign('available_languages',get_languages()); |
|
241 | 241 | |
242 | 242 | switch ( $relationship->relationship_type) |
243 | 243 | { |
@@ -41,31 +41,31 @@ discard block |
||
41 | 41 | |
42 | 42 | class ViewDropdowns extends SugarView |
43 | 43 | { |
44 | - /** |
|
45 | - * @see SugarView::_getModuleTitleParams() |
|
46 | - */ |
|
47 | - protected function _getModuleTitleParams($browserTitle = false) |
|
48 | - { |
|
49 | - global $mod_strings; |
|
44 | + /** |
|
45 | + * @see SugarView::_getModuleTitleParams() |
|
46 | + */ |
|
47 | + protected function _getModuleTitleParams($browserTitle = false) |
|
48 | + { |
|
49 | + global $mod_strings; |
|
50 | 50 | |
51 | - return array( |
|
52 | - translate('LBL_MODULE_NAME','Administration'), |
|
53 | - ModuleBuilderController::getModuleTitle(), |
|
54 | - ); |
|
51 | + return array( |
|
52 | + translate('LBL_MODULE_NAME','Administration'), |
|
53 | + ModuleBuilderController::getModuleTitle(), |
|
54 | + ); |
|
55 | 55 | } |
56 | 56 | |
57 | - function display() |
|
58 | - { |
|
59 | - $ajax = new AjaxCompose(); |
|
60 | - $smarty = new Sugar_Smarty(); |
|
57 | + function display() |
|
58 | + { |
|
59 | + $ajax = new AjaxCompose(); |
|
60 | + $smarty = new Sugar_Smarty(); |
|
61 | 61 | |
62 | - if (isset($_REQUEST['refreshTree'])) |
|
63 | - { |
|
64 | - require_once ('modules/ModuleBuilder/Module/DropDownTree.php'); |
|
65 | - $mbt = new DropDownTree(); |
|
66 | - $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes()); |
|
67 | - $smarty->assign('refreshTree',true); |
|
68 | - } |
|
62 | + if (isset($_REQUEST['refreshTree'])) |
|
63 | + { |
|
64 | + require_once ('modules/ModuleBuilder/Module/DropDownTree.php'); |
|
65 | + $mbt = new DropDownTree(); |
|
66 | + $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes()); |
|
67 | + $smarty->assign('refreshTree',true); |
|
68 | + } |
|
69 | 69 | |
70 | 70 | global $mod_strings; |
71 | 71 | $ajax->addCrumb($mod_strings['LBL_DROPDOWNEDITOR'], 'ModuleBuilder.main("dropdowns")'); |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | |
76 | 76 | $smarty->assign('LBL_BTN_ADDDROPDOWN',translate('LBL_BTN_ADDDROPDOWN')); |
77 | 77 | $smarty->assign('dropdowns', $dd->getNodes()); |
78 | - $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE'])); |
|
79 | - $smarty->assign('editImage', SugarThemeRegistry::current()->getImage( 'edit_inline', '',null,null,'.gif',$mod_strings['LBL_EDIT'])); |
|
80 | - $smarty->assign('action', 'savedropdown'); |
|
78 | + $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE'])); |
|
79 | + $smarty->assign('editImage', SugarThemeRegistry::current()->getImage( 'edit_inline', '',null,null,'.gif',$mod_strings['LBL_EDIT'])); |
|
80 | + $smarty->assign('action', 'savedropdown'); |
|
81 | 81 | |
82 | 82 | |
83 | - $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR'], $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl') ); |
|
84 | - echo $ajax->getJavascript(); |
|
85 | - } |
|
83 | + $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR'], $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl') ); |
|
84 | + echo $ajax->getJavascript(); |
|
85 | + } |
|
86 | 86 | } |
87 | 87 | \ No newline at end of file |
@@ -62,16 +62,16 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * @see SugarView::_getModuleTitleParams() |
|
66 | - */ |
|
67 | - protected function _getModuleTitleParams($browserTitle = false) |
|
68 | - { |
|
69 | - global $mod_strings; |
|
65 | + * @see SugarView::_getModuleTitleParams() |
|
66 | + */ |
|
67 | + protected function _getModuleTitleParams($browserTitle = false) |
|
68 | + { |
|
69 | + global $mod_strings; |
|
70 | 70 | |
71 | - return array( |
|
72 | - translate('LBL_MODULE_NAME','Administration'), |
|
73 | - ModuleBuilderController::getModuleTitle(), |
|
74 | - ); |
|
71 | + return array( |
|
72 | + translate('LBL_MODULE_NAME','Administration'), |
|
73 | + ModuleBuilderController::getModuleTitle(), |
|
74 | + ); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | // /* |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | |
102 | 102 | if ($preview) |
103 | 103 | { |
104 | - echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
104 | + echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
105 | 105 | } else |
106 | 106 | { |
107 | - $ajax = $this->constructAjax () ; |
|
108 | - $ajax->addSection ( 'center', translate('LBL_POPUP'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
109 | - echo $ajax->getJavascript () ; |
|
107 | + $ajax = $this->constructAjax () ; |
|
108 | + $ajax->addSection ( 'center', translate('LBL_POPUP'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
109 | + echo $ajax->getJavascript () ; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
@@ -151,11 +151,11 @@ discard block |
||
151 | 151 | $helpName = (isset( $_REQUEST['view']) && $_REQUEST['view']==MB_POPUPSEARCH) ? 'searchViewEditor' : 'popupListViewEditor'; |
152 | 152 | $smarty->assign ( 'helpName', $helpName ) ; |
153 | 153 | $smarty->assign ( 'helpDefault', 'modify' ) ; |
154 | - if ($this->fromModuleBuilder) { |
|
155 | - $mb = new ModuleBuilder ( ) ; |
|
154 | + if ($this->fromModuleBuilder) { |
|
155 | + $mb = new ModuleBuilder ( ) ; |
|
156 | 156 | $module = & $mb->getPackageModule ( $this->editPackage, $this->editModule ) ; |
157 | - $smarty->assign('current_mod_strings', $module->getModStrings()); |
|
158 | - } |
|
157 | + $smarty->assign('current_mod_strings', $module->getModStrings()); |
|
158 | + } |
|
159 | 159 | |
160 | 160 | $smarty->assign ( 'title', $this->_constructTitle () ) ; |
161 | 161 | $groups = array ( ) ; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | { |
172 | 172 | if (substr ( $field [ 'width' ], - 1, 1 ) == '%') |
173 | 173 | { |
174 | - $groups [ $groupKey ] [ $fieldKey ] [ 'width' ] = substr ( $field [ 'width' ], 0, strlen ( $field [ 'width' ] ) - 1 ) ; |
|
174 | + $groups [ $groupKey ] [ $fieldKey ] [ 'width' ] = substr ( $field [ 'width' ], 0, strlen ( $field [ 'width' ] ) - 1 ) ; |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 | } |
@@ -49,16 +49,16 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * @see SugarView::_getModuleTitleParams() |
|
53 | - */ |
|
54 | - protected function _getModuleTitleParams($browserTitle = false) |
|
55 | - { |
|
56 | - global $mod_strings; |
|
52 | + * @see SugarView::_getModuleTitleParams() |
|
53 | + */ |
|
54 | + protected function _getModuleTitleParams($browserTitle = false) |
|
55 | + { |
|
56 | + global $mod_strings; |
|
57 | 57 | |
58 | - return array( |
|
59 | - translate('LBL_MODULE_NAME','Administration'), |
|
60 | - ModuleBuilderController::getModuleTitle(), |
|
61 | - ); |
|
58 | + return array( |
|
59 | + translate('LBL_MODULE_NAME','Administration'), |
|
60 | + ModuleBuilderController::getModuleTitle(), |
|
61 | + ); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | $this->properties[substr($key,6)]['title'] = $value; |
98 | 98 | } |
99 | 99 | } |
100 | - } |
|
100 | + } |
|
101 | 101 | |
102 | 102 | function display() |
103 | 103 | { |
104 | 104 | global $mod_strings; |
105 | - $ajax = new AjaxCompose(); |
|
105 | + $ajax = new AjaxCompose(); |
|
106 | 106 | $smarty = new Sugar_Smarty(); |
107 | 107 | if (isset($_REQUEST['MB']) && $_REQUEST['MB'] == "1") |
108 | 108 | { |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
114 | - if(empty($selected_lang)){ |
|
115 | - $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
116 | - } |
|
117 | - $smarty->assign('available_languages', get_languages()); |
|
118 | - $smarty->assign('selected_lang', $selected_lang); |
|
114 | + if(empty($selected_lang)){ |
|
115 | + $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
116 | + } |
|
117 | + $smarty->assign('available_languages', get_languages()); |
|
118 | + $smarty->assign('selected_lang', $selected_lang); |
|
119 | 119 | |
120 | 120 | ksort($this->properties); |
121 | 121 |
@@ -45,40 +45,40 @@ |
||
45 | 45 | |
46 | 46 | class ViewHistory extends SugarView |
47 | 47 | { |
48 | - /** |
|
49 | - * @see SugarView::_getModuleTitleParams() |
|
50 | - */ |
|
51 | - protected function _getModuleTitleParams($browserTitle = false) |
|
52 | - { |
|
53 | - global $mod_strings; |
|
48 | + /** |
|
49 | + * @see SugarView::_getModuleTitleParams() |
|
50 | + */ |
|
51 | + protected function _getModuleTitleParams($browserTitle = false) |
|
52 | + { |
|
53 | + global $mod_strings; |
|
54 | 54 | |
55 | - return array( |
|
56 | - translate('LBL_MODULE_NAME','Administration'), |
|
57 | - ModuleBuilderController::getModuleTitle(), |
|
58 | - ); |
|
55 | + return array( |
|
56 | + translate('LBL_MODULE_NAME','Administration'), |
|
57 | + ModuleBuilderController::getModuleTitle(), |
|
58 | + ); |
|
59 | 59 | } |
60 | 60 | |
61 | - //STUDIO LABELS ONLY// |
|
62 | - //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
63 | - function display() |
|
64 | - { |
|
65 | - $root = new ExtNode('root', 'root', true); |
|
66 | - $sb = new StudioBrowser(); |
|
67 | - $sb->loadModules(); |
|
68 | - foreach($sb->modules as $name => $studioMod) { |
|
69 | - $root->add_node($this->buildStudioNode($studioMod)); |
|
70 | - } |
|
71 | - $json = getJSONobj(); |
|
72 | - echo($json->encode($root)); |
|
73 | - } |
|
61 | + //STUDIO LABELS ONLY// |
|
62 | + //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
63 | + function display() |
|
64 | + { |
|
65 | + $root = new ExtNode('root', 'root', true); |
|
66 | + $sb = new StudioBrowser(); |
|
67 | + $sb->loadModules(); |
|
68 | + foreach($sb->modules as $name => $studioMod) { |
|
69 | + $root->add_node($this->buildStudioNode($studioMod)); |
|
70 | + } |
|
71 | + $json = getJSONobj(); |
|
72 | + echo($json->encode($root)); |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * |
|
77 | - * @return ExtNode built from the passed StudioModule |
|
78 | - * @param $module StudioModule |
|
79 | - */ |
|
80 | - function buildStudioNode($module) { |
|
75 | + /** |
|
76 | + * |
|
77 | + * @return ExtNode built from the passed StudioModule |
|
78 | + * @param $module StudioModule |
|
79 | + */ |
|
80 | + function buildStudioNode($module) { |
|
81 | 81 | |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | } |
@@ -48,19 +48,19 @@ discard block |
||
48 | 48 | class ViewResetmodule extends SugarView |
49 | 49 | { |
50 | 50 | /** |
51 | - * @see SugarView::_getModuleTitleParams() |
|
52 | - */ |
|
53 | - protected function _getModuleTitleParams($browserTitle = false) |
|
54 | - { |
|
55 | - global $mod_strings; |
|
51 | + * @see SugarView::_getModuleTitleParams() |
|
52 | + */ |
|
53 | + protected function _getModuleTitleParams($browserTitle = false) |
|
54 | + { |
|
55 | + global $mod_strings; |
|
56 | 56 | |
57 | - return array( |
|
58 | - translate('LBL_MODULE_NAME','Administration'), |
|
59 | - ModuleBuilderController::getModuleTitle(), |
|
60 | - ); |
|
57 | + return array( |
|
58 | + translate('LBL_MODULE_NAME','Administration'), |
|
59 | + ModuleBuilderController::getModuleTitle(), |
|
60 | + ); |
|
61 | 61 | } |
62 | 62 | |
63 | - function display() |
|
63 | + function display() |
|
64 | 64 | { |
65 | 65 | $moduleName = $this->module = $_REQUEST['view_module']; |
66 | 66 | if (isset($_REQUEST['handle']) && $_REQUEST['handle'] == "execute") { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | array("name" => "fields", "label" => translate("LBL_REMOVE_FIELDS")), |
80 | 80 | array("name" => "layouts", "label" => translate("LBL_RESET_LAYOUTS")), |
81 | 81 | array("name" => "labels", "label" => translate("LBL_RESET_LABELS")), |
82 | - array("name" => "extensions", "label" => translate("LBL_CLEAR_EXTENSIONS")), |
|
82 | + array("name" => "extensions", "label" => translate("LBL_CLEAR_EXTENSIONS")), |
|
83 | 83 | )); |
84 | 84 | |
85 | 85 | $ajax->addSection ( |
@@ -104,10 +104,10 @@ discard block |
||
104 | 104 | if (!empty($_REQUEST['layouts'])) |
105 | 105 | $out .= $this->removeCustomLayouts(); |
106 | 106 | |
107 | - if (!empty($_REQUEST['labels'])) |
|
107 | + if (!empty($_REQUEST['labels'])) |
|
108 | 108 | $out .= $this->removeCustomLabels(); |
109 | 109 | |
110 | - if (!empty($_REQUEST['extensions'])) |
|
110 | + if (!empty($_REQUEST['extensions'])) |
|
111 | 111 | $out .= $this->removeCustomExtensions(); |
112 | 112 | |
113 | 113 | |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | $customFields = array(); |
149 | 149 | foreach($seed->field_defs as $def) { |
150 | 150 | if(isset($def['source']) && $def['source'] == 'custom_fields') { |
151 | - $field = $df->getFieldWidget($moduleName, $def['name']); |
|
152 | - $field->delete ( $df ) ; |
|
151 | + $field = $df->getFieldWidget($moduleName, $def['name']); |
|
152 | + $field->delete ( $df ) ; |
|
153 | 153 | |
154 | - $module->removeFieldFromLayouts( $def['name'] ); |
|
155 | - $customFields[] = $def['name']; |
|
154 | + $module->removeFieldFromLayouts( $def['name'] ); |
|
155 | + $customFields[] = $def['name']; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | $out = ""; |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | function removeCustomRelationships() |
198 | 198 | { |
199 | - require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; |
|
199 | + require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; |
|
200 | 200 | $out = ""; |
201 | 201 | $madeChanges = false; |
202 | 202 | $relationships = new DeployedRelationships ( $this->module ) ; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | } |
212 | 212 | if ($madeChanges) |
213 | - $relationships->save () ; |
|
213 | + $relationships->save () ; |
|
214 | 214 | |
215 | 215 | return $out; |
216 | 216 | } |
@@ -218,33 +218,33 @@ discard block |
||
218 | 218 | function removeCustomLabels() |
219 | 219 | { |
220 | 220 | $out = ""; |
221 | - $languageDir = "custom/modules/{$this->module}/language"; |
|
221 | + $languageDir = "custom/modules/{$this->module}/language"; |
|
222 | 222 | if (is_dir($languageDir)) { |
223 | 223 | $files = scandir($languageDir); |
224 | 224 | foreach ($files as $langFile) { |
225 | 225 | if (substr($langFile, 0 ,1) == '.') continue; |
226 | - $language = substr($langFile, 0, strlen($langFile) - 9); |
|
227 | - unlink($languageDir . "/" . $langFile); |
|
226 | + $language = substr($langFile, 0, strlen($langFile) - 9); |
|
227 | + unlink($languageDir . "/" . $langFile); |
|
228 | 228 | |
229 | - LanguageManager::clearLanguageCache ( $this->module, $language ) ; |
|
230 | - $out .= "Removed language file $langFile<br/>"; |
|
229 | + LanguageManager::clearLanguageCache ( $this->module, $language ) ; |
|
230 | + $out .= "Removed language file $langFile<br/>"; |
|
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | - return $out; |
|
234 | + return $out; |
|
235 | 235 | } |
236 | 236 | |
237 | - function removeCustomExtensions() |
|
238 | - { |
|
237 | + function removeCustomExtensions() |
|
238 | + { |
|
239 | 239 | $out = ""; |
240 | 240 | $extDir = "custom/Extension/modules/{$this->module}"; |
241 | 241 | if (is_dir($extDir)) { |
242 | - rmdir_recursive($extDir); |
|
243 | - require_once ('modules/Administration/QuickRepairAndRebuild.php') ; |
|
242 | + rmdir_recursive($extDir); |
|
243 | + require_once ('modules/Administration/QuickRepairAndRebuild.php') ; |
|
244 | 244 | $rac = new RepairAndClear ( ) ; |
245 | 245 | $rac->repairAndClearAll ( array ( 'clearAll' ), array ( $this->module ), true, false ) ; |
246 | - $rac->rebuildExtensions(); |
|
247 | - $out .= "Cleared extensions for {$this->module}<br/>"; |
|
246 | + $rac->rebuildExtensions(); |
|
247 | + $out .= "Cleared extensions for {$this->module}<br/>"; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return $out; |