@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | var $pageSize = 10 ; |
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 | - function display () |
|
62 | + function display () |
|
63 | 63 | { |
64 | 64 | $this->layout = strtolower ( $_REQUEST [ 'view' ] ) ; |
65 | 65 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | } |
136 | 136 | echo "<input type='button' name='close$sid' value='". translate ( 'LBL_BTN_CLOSE' )."' " . |
137 | 137 | "class='button' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.tabPanel.get(\"activeTab\"));' style='margin:5px;'>" . |
138 | - "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " . |
|
138 | + "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " . |
|
139 | 139 | "class='button' onclick='ModuleBuilder.history.revert(\"$this->module\",\"{$this->layout}\",\"$sid\"$subpanel);' style='margin:5px;'>" ; |
140 | 140 | $this->history->restoreByTimestamp ( $sid ) ; |
141 | 141 | $view ; |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | $view = new ViewSearchView ( ) ; |
150 | 150 | } else if ($this->layout == 'dashlet' || $this->layout == 'dashletsearch') |
151 | 151 | { |
152 | - require_once ("modules/ModuleBuilder/views/view.dashlet.php") ; |
|
153 | - $view = new ViewDashlet ( ) ; |
|
152 | + require_once ("modules/ModuleBuilder/views/view.dashlet.php") ; |
|
153 | + $view = new ViewDashlet ( ) ; |
|
154 | 154 | } else if ($this->layout == 'popuplist' || $this->layout == 'popupsearch') |
155 | 155 | { |
156 | - require_once ("modules/ModuleBuilder/views/view.popupview.php") ; |
|
157 | - $view = new ViewPopupview ( ) ; |
|
156 | + require_once ("modules/ModuleBuilder/views/view.popupview.php") ; |
|
157 | + $view = new ViewPopupview ( ) ; |
|
158 | 158 | } else |
159 | 159 | { |
160 | 160 | require_once ("modules/ModuleBuilder/views/view.layoutview.php") ; |
@@ -175,12 +175,12 @@ discard block |
||
175 | 175 | $this->history->restoreByTimestamp ( $sid ) ; |
176 | 176 | } |
177 | 177 | |
178 | - /** |
|
179 | - * Restores a layout to its current customized state. |
|
180 | - * Called when leaving a restored layout without saving. |
|
181 | - */ |
|
178 | + /** |
|
179 | + * Restores a layout to its current customized state. |
|
180 | + * Called when leaving a restored layout without saving. |
|
181 | + */ |
|
182 | 182 | function unrestore() |
183 | 183 | { |
184 | - $this->history->undoRestore () ; |
|
184 | + $this->history->undoRestore () ; |
|
185 | 185 | } |
186 | 186 | } |
@@ -48,73 +48,73 @@ discard block |
||
48 | 48 | class ViewLabels extends ViewModulefields |
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 | - //STUDIO LABELS ONLY// |
|
64 | - //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
65 | - function display() |
|
66 | - { |
|
67 | - $editModule = $_REQUEST['view_module']; |
|
68 | - $allLabels = (!empty($_REQUEST['labels']) && $_REQUEST['labels']== 'all'); |
|
63 | + //STUDIO LABELS ONLY// |
|
64 | + //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
65 | + function display() |
|
66 | + { |
|
67 | + $editModule = $_REQUEST['view_module']; |
|
68 | + $allLabels = (!empty($_REQUEST['labels']) && $_REQUEST['labels']== 'all'); |
|
69 | 69 | |
70 | - if (!isset($_REQUEST['MB'])) |
|
71 | - { |
|
72 | - global $app_list_strings; |
|
73 | - $moduleNames = array_change_key_case($app_list_strings['moduleList']); |
|
74 | - $translatedEditModule = $moduleNames[strtolower($editModule)]; |
|
75 | - } |
|
76 | - $selected_lang = (!empty($_REQUEST['selected_lang'])? $_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
|
77 | - if(empty($selected_lang)){ |
|
78 | - $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
79 | - } |
|
70 | + if (!isset($_REQUEST['MB'])) |
|
71 | + { |
|
72 | + global $app_list_strings; |
|
73 | + $moduleNames = array_change_key_case($app_list_strings['moduleList']); |
|
74 | + $translatedEditModule = $moduleNames[strtolower($editModule)]; |
|
75 | + } |
|
76 | + $selected_lang = (!empty($_REQUEST['selected_lang'])? $_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
|
77 | + if(empty($selected_lang)){ |
|
78 | + $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
79 | + } |
|
80 | 80 | |
81 | - $smarty = new Sugar_Smarty(); |
|
82 | - global $mod_strings; |
|
81 | + $smarty = new Sugar_Smarty(); |
|
82 | + global $mod_strings; |
|
83 | 83 | $smarty->assign('mod_strings', $mod_strings); |
84 | - $smarty->assign('available_languages',get_languages()); |
|
84 | + $smarty->assign('available_languages',get_languages()); |
|
85 | 85 | |
86 | 86 | |
87 | 87 | $objectName = BeanFactory::getObjectName($editModule); |
88 | 88 | VardefManager::loadVardef($editModule, $objectName); |
89 | 89 | global $dictionary; |
90 | 90 | $vnames = array(); |
91 | - //jchi 24557 . We should list all the lables in viewdefs(list,detail,edit,quickcreate) that the user can edit them. |
|
92 | - require_once 'modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' ; |
|
91 | + //jchi 24557 . We should list all the lables in viewdefs(list,detail,edit,quickcreate) that the user can edit them. |
|
92 | + require_once 'modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' ; |
|
93 | 93 | $parser = new ListLayoutMetaDataParser ( MB_LISTVIEW, $editModule ) ; |
94 | 94 | foreach ( $parser->getLayout() as $key => $def ) |
95 | 95 | { |
96 | - if(isset($def['label']) ) { |
|
97 | - $vnames[$def['label']] = $def['label']; |
|
98 | - } |
|
96 | + if(isset($def['label']) ) { |
|
97 | + $vnames[$def['label']] = $def['label']; |
|
98 | + } |
|
99 | 99 | } |
100 | 100 | |
101 | - require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ; |
|
101 | + require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ; |
|
102 | 102 | $variableMap = $this->getVariableMap($editModule); |
103 | 103 | foreach($variableMap as $key => $value){ |
104 | - $gridLayoutMetaDataParserTemp = new GridLayoutMetaDataParser ( $value, $editModule) ; |
|
105 | - foreach ( $gridLayoutMetaDataParserTemp->getLayout() as $panel) |
|
106 | - { |
|
107 | - foreach ( $panel as $row ) |
|
108 | - { |
|
109 | - foreach ( $row as $fieldArray ) |
|
110 | - { // fieldArray is an array('name'=>name,'label'=>label) |
|
111 | - if (isset ( $fieldArray [ 'label' ] )) |
|
112 | - { |
|
113 | - $vnames[$fieldArray [ 'label' ] ] = $fieldArray [ 'label' ] ; |
|
114 | - } |
|
115 | - } |
|
116 | - } |
|
117 | - } |
|
104 | + $gridLayoutMetaDataParserTemp = new GridLayoutMetaDataParser ( $value, $editModule) ; |
|
105 | + foreach ( $gridLayoutMetaDataParserTemp->getLayout() as $panel) |
|
106 | + { |
|
107 | + foreach ( $panel as $row ) |
|
108 | + { |
|
109 | + foreach ( $row as $fieldArray ) |
|
110 | + { // fieldArray is an array('name'=>name,'label'=>label) |
|
111 | + if (isset ( $fieldArray [ 'label' ] )) |
|
112 | + { |
|
113 | + $vnames[$fieldArray [ 'label' ] ] = $fieldArray [ 'label' ] ; |
|
114 | + } |
|
115 | + } |
|
116 | + } |
|
117 | + } |
|
118 | 118 | } |
119 | 119 | //end |
120 | 120 | |
@@ -122,23 +122,23 @@ discard block |
||
122 | 122 | require_once ('include/SubPanel/SubPanel.php') ; |
123 | 123 | $subList = SubPanel::getModuleSubpanels ( $editModule ); |
124 | 124 | foreach($subList as $subpanel => $titleLabel) { |
125 | - $vnames[$titleLabel] = $titleLabel; |
|
125 | + $vnames[$titleLabel] = $titleLabel; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | foreach($dictionary[$objectName]['fields'] as $name=>$def) { |
129 | - if(isset($def['vname'])) { |
|
130 | - $vnames[$def['vname']] = $def['vname']; |
|
131 | - } |
|
132 | - } |
|
133 | - $formatted_mod_strings = array(); |
|
129 | + if(isset($def['vname'])) { |
|
130 | + $vnames[$def['vname']] = $def['vname']; |
|
131 | + } |
|
132 | + } |
|
133 | + $formatted_mod_strings = array(); |
|
134 | 134 | |
135 | - //we shouldn't set the $refresh=true here, or will lost template language mod_strings. |
|
136 | - //return_module_language($selected_lang, $editModule,false) : the mod_strings will be included from cache files here. |
|
135 | + //we shouldn't set the $refresh=true here, or will lost template language mod_strings. |
|
136 | + //return_module_language($selected_lang, $editModule,false) : the mod_strings will be included from cache files here. |
|
137 | 137 | foreach(return_module_language($selected_lang, $editModule,false) as $name=>$label) { |
138 | - //#25294 |
|
139 | - if($allLabels || isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) { |
|
138 | + //#25294 |
|
139 | + if($allLabels || isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) { |
|
140 | 140 | $formatted_mod_strings[$name] = htmlentities($label, ENT_QUOTES, 'UTF-8'); |
141 | - } |
|
141 | + } |
|
142 | 142 | } |
143 | 143 | //Grab everything from the custom files |
144 | 144 | $mod_bak = $mod_strings; |
@@ -147,49 +147,49 @@ discard block |
||
147 | 147 | "custom/modules/$editModule/Ext/Language/$selected_lang.lang.ext.php" |
148 | 148 | ); |
149 | 149 | foreach($files as $langfile){ |
150 | - $mod_strings = array(); |
|
151 | - if (is_file($langfile)) |
|
152 | - { |
|
153 | - include($langfile); |
|
154 | - foreach($mod_strings as $key => $label) |
|
155 | - { |
|
150 | + $mod_strings = array(); |
|
151 | + if (is_file($langfile)) |
|
152 | + { |
|
153 | + include($langfile); |
|
154 | + foreach($mod_strings as $key => $label) |
|
155 | + { |
|
156 | 156 | $formatted_mod_strings[$key] = htmlentities($label, ENT_QUOTES, 'UTF-8'); |
157 | - } |
|
158 | - } |
|
157 | + } |
|
158 | + } |
|
159 | 159 | } |
160 | 160 | $mod_strings = $mod_bak; |
161 | 161 | ksort($formatted_mod_strings); |
162 | - $smarty->assign('MOD', $formatted_mod_strings); |
|
163 | - $smarty->assign('view_module', $editModule); |
|
164 | - $smarty->assign('APP', $GLOBALS['app_strings']); |
|
165 | - $smarty->assign('selected_lang', $selected_lang); |
|
166 | - $smarty->assign('defaultHelp', 'labelsBtn'); |
|
167 | - $smarty->assign('assistant', array('key'=>'labels', 'group'=>'module')); |
|
168 | - $smarty->assign('labels_choice', $mod_strings['labelTypes']); |
|
169 | - $smarty->assign('labels_current', $allLabels?"all":""); |
|
162 | + $smarty->assign('MOD', $formatted_mod_strings); |
|
163 | + $smarty->assign('view_module', $editModule); |
|
164 | + $smarty->assign('APP', $GLOBALS['app_strings']); |
|
165 | + $smarty->assign('selected_lang', $selected_lang); |
|
166 | + $smarty->assign('defaultHelp', 'labelsBtn'); |
|
167 | + $smarty->assign('assistant', array('key'=>'labels', 'group'=>'module')); |
|
168 | + $smarty->assign('labels_choice', $mod_strings['labelTypes']); |
|
169 | + $smarty->assign('labels_current', $allLabels?"all":""); |
|
170 | 170 | |
171 | - $ajax = new AjaxCompose(); |
|
172 | - $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")'); |
|
173 | - $ajax->addCrumb($translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module='.$editModule.'")'); |
|
174 | - $ajax->addCrumb($mod_strings['LBL_LABELS'], ''); |
|
171 | + $ajax = new AjaxCompose(); |
|
172 | + $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")'); |
|
173 | + $ajax->addCrumb($translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module='.$editModule.'")'); |
|
174 | + $ajax->addCrumb($mod_strings['LBL_LABELS'], ''); |
|
175 | 175 | |
176 | - $html = $smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl'); |
|
177 | - $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_SECTION_EDLABELS'], $html); |
|
178 | - echo $ajax->getJavascript(); |
|
179 | - } |
|
176 | + $html = $smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl'); |
|
177 | + $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_SECTION_EDLABELS'], $html); |
|
178 | + echo $ajax->getJavascript(); |
|
179 | + } |
|
180 | 180 | |
181 | 181 | // fixing bug #39749: Quick Create in Studio |
182 | 182 | function getVariableMap($module) |
183 | 183 | { |
184 | 184 | $variableMap = array(MB_EDITVIEW => 'EditView', |
185 | - MB_DETAILVIEW => 'DetailView', |
|
186 | - MB_QUICKCREATE => 'QuickCreate'); |
|
185 | + MB_DETAILVIEW => 'DetailView', |
|
186 | + MB_QUICKCREATE => 'QuickCreate'); |
|
187 | 187 | |
188 | 188 | $hideQuickCreateForModules = array('KBDocuments', |
189 | - 'ProjectTask', |
|
190 | - 'Campaigns', |
|
191 | - 'Quotes', |
|
192 | - 'ProductTemplates'); |
|
189 | + 'ProjectTask', |
|
190 | + 'Campaigns', |
|
191 | + 'Quotes', |
|
192 | + 'ProductTemplates'); |
|
193 | 193 | |
194 | 194 | if(in_array($module, $hideQuickCreateForModules)) |
195 | 195 | { |
@@ -43,20 +43,20 @@ discard block |
||
43 | 43 | class ViewModulefield extends SugarView |
44 | 44 | { |
45 | 45 | /** |
46 | - * @see SugarView::_getModuleTitleParams() |
|
47 | - */ |
|
48 | - protected function _getModuleTitleParams($browserTitle = false) |
|
49 | - { |
|
50 | - global $mod_strings; |
|
46 | + * @see SugarView::_getModuleTitleParams() |
|
47 | + */ |
|
48 | + protected function _getModuleTitleParams($browserTitle = false) |
|
49 | + { |
|
50 | + global $mod_strings; |
|
51 | 51 | |
52 | - return array( |
|
53 | - translate('LBL_MODULE_NAME','Administration'), |
|
54 | - ModuleBuilderController::getModuleTitle(), |
|
55 | - ); |
|
52 | + return array( |
|
53 | + translate('LBL_MODULE_NAME','Administration'), |
|
54 | + ModuleBuilderController::getModuleTitle(), |
|
55 | + ); |
|
56 | 56 | } |
57 | 57 | |
58 | - function display() |
|
59 | - { |
|
58 | + function display() |
|
59 | + { |
|
60 | 60 | $ac = $this->fetch(); |
61 | 61 | echo $ac->getJavascript(); |
62 | 62 | } |
@@ -76,21 +76,21 @@ discard block |
||
76 | 76 | $field_name = ''; |
77 | 77 | |
78 | 78 | $action = 'saveField'; // tyoung bug 17606: default action is to save as a dynamic field; but for standard OOB |
79 | - // fields we override this so don't create a new dynamic field instead of updating the existing field |
|
79 | + // fields we override this so don't create a new dynamic field instead of updating the existing field |
|
80 | 80 | |
81 | 81 | $isClone = false; |
82 | 82 | if(!empty($this->view_object_map['is_clone']) && $this->view_object_map['is_clone'] |
83 | 83 | && (strcmp($field_name, "name") != 0) // bug #35767, do not allow cloning of name field |
84 | 84 | ) |
85 | 85 | $isClone = true; |
86 | - /* |
|
86 | + /* |
|
87 | 87 | $field_types = array('varchar'=>'YourField', 'int'=>'Integer', 'float'=>'Decimal','bool'=>'Checkbox','enum'=>'DropDown', |
88 | 88 | 'date'=>'Date', 'phone' => 'Phone', 'currency' => 'Currency', 'html' => 'HTML', 'radioenum' => 'Radio', |
89 | 89 | 'relate' => 'Relate', 'address' => 'Address', 'text' => 'TextArea', 'url' => 'Link'); |
90 | 90 | */ |
91 | - $field_types = $GLOBALS['mod_strings']['fieldTypes']; |
|
92 | - if (isset($field_types['encrypt'])) |
|
93 | - unset($field_types['encrypt']); |
|
91 | + $field_types = $GLOBALS['mod_strings']['fieldTypes']; |
|
92 | + if (isset($field_types['encrypt'])) |
|
93 | + unset($field_types['encrypt']); |
|
94 | 94 | $field_name_exceptions = array( |
95 | 95 | //bug 22264: Field name must not be an SQL keyword. |
96 | 96 | //Taken from SQL Server's list of reserved keywords; http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx |
@@ -110,26 +110,26 @@ discard block |
||
110 | 110 | 'DROP','OPENROWSET','VIEW','DUMMY','OPENXML','WAITFOR','DUMP','OPTION','WHEN','ELSE','OR','WHERE', |
111 | 111 | 'END','ORDER','WHILE','ERRLVL','OUTER','WITH','ESCAPE','OVER','WRITETEXT', |
112 | 112 | //Mysql Keywords from http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html (those not in MSSQL's list) |
113 | - 'ANALYZE', 'ASENSITIVE', 'BEFORE', 'BIGINT', 'BINARY', 'BOTH', 'CALL', 'CHANGE', 'CHARACTER', |
|
114 | - 'CONDITION', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DELAYED', |
|
115 | - 'DESCRIBE', 'DETERMINISTIC', 'DISTINCTROW', 'DIV', 'DUAL', 'EACH', 'ELSEIF', 'ENCLOSED', 'ESCAPED', 'EXPLAIN', |
|
116 | - 'FALSE', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FORCE', 'FULLTEXT', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE', |
|
117 | - 'HOUR_SECOND', 'IGNORE', 'INFILE', 'INOUT', 'INSENSITIVE', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8', |
|
118 | - 'INTEGER', 'ITERATE', 'KEYS', 'LEADING', 'LEAVE', 'LIMIT', 'LINES', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK', |
|
119 | - 'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT', |
|
120 | - 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NO_WRITE_TO_BINLOG', 'NUMERIC', 'OPTIMIZE', |
|
121 | - 'OPTIONALLY', 'OUT', 'OUTFILE', 'PURGE', 'READS', 'REAL', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE', |
|
122 | - 'REQUIRE', 'RLIKE', 'SCHEMAS', 'SECOND_MICROSECOND', 'SENSITIVE', 'SEPARATOR', 'SHOW', 'SMALLINT', 'SONAME', |
|
123 | - 'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', |
|
124 | - 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'TERMINATED', 'TINYBLOB', 'TINYINT', 'TINYTEXT', |
|
125 | - 'TRAILING', 'TRUE', 'UNDO', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', |
|
126 | - 'VARBINARY', 'VARCHARACTER', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL', 'CONNECTION', 'LABEL', 'UPGRADE', |
|
127 | - //Oracle datatypes |
|
113 | + 'ANALYZE', 'ASENSITIVE', 'BEFORE', 'BIGINT', 'BINARY', 'BOTH', 'CALL', 'CHANGE', 'CHARACTER', |
|
114 | + 'CONDITION', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DELAYED', |
|
115 | + 'DESCRIBE', 'DETERMINISTIC', 'DISTINCTROW', 'DIV', 'DUAL', 'EACH', 'ELSEIF', 'ENCLOSED', 'ESCAPED', 'EXPLAIN', |
|
116 | + 'FALSE', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FORCE', 'FULLTEXT', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE', |
|
117 | + 'HOUR_SECOND', 'IGNORE', 'INFILE', 'INOUT', 'INSENSITIVE', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8', |
|
118 | + 'INTEGER', 'ITERATE', 'KEYS', 'LEADING', 'LEAVE', 'LIMIT', 'LINES', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK', |
|
119 | + 'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT', |
|
120 | + 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NO_WRITE_TO_BINLOG', 'NUMERIC', 'OPTIMIZE', |
|
121 | + 'OPTIONALLY', 'OUT', 'OUTFILE', 'PURGE', 'READS', 'REAL', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE', |
|
122 | + 'REQUIRE', 'RLIKE', 'SCHEMAS', 'SECOND_MICROSECOND', 'SENSITIVE', 'SEPARATOR', 'SHOW', 'SMALLINT', 'SONAME', |
|
123 | + 'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', |
|
124 | + 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'TERMINATED', 'TINYBLOB', 'TINYINT', 'TINYTEXT', |
|
125 | + 'TRAILING', 'TRUE', 'UNDO', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', |
|
126 | + 'VARBINARY', 'VARCHARACTER', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL', 'CONNECTION', 'LABEL', 'UPGRADE', |
|
127 | + //Oracle datatypes |
|
128 | 128 | 'DATE','VARCHAR','VARCHAR2','NVARCHAR2','CHAR','NCHAR','NUMBER','PLS_INTEGER','BINARY_INTEGER','LONG','TIMESTAMP', |
129 | - 'INTERVAL','RAW','ROWID','UROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','XMLTYPE', |
|
130 | - //SugarCRM reserved |
|
131 | - 'ID', 'ID_C', 'PARENT_NAME', 'PARENT_ID', |
|
132 | - ); |
|
129 | + 'INTERVAL','RAW','ROWID','UROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','XMLTYPE', |
|
130 | + //SugarCRM reserved |
|
131 | + 'ID', 'ID_C', 'PARENT_NAME', 'PARENT_ID', |
|
132 | + ); |
|
133 | 133 | |
134 | 134 | |
135 | 135 | //C.L. - Add support to mark related module id columns as reserved keywords |
@@ -173,14 +173,14 @@ discard block |
||
173 | 173 | $fv->ss->assign('hideLevel', 3); |
174 | 174 | } |
175 | 175 | if($isClone && isset($vardef['type']) && $vardef['type'] == 'datetime'){ |
176 | - $vardef['type'] = 'datetimecombo'; |
|
176 | + $vardef['type'] = 'datetimecombo'; |
|
177 | 177 | } |
178 | 178 | |
179 | - require_once ('modules/DynamicFields/FieldCases.php') ; |
|
179 | + require_once ('modules/DynamicFields/FieldCases.php') ; |
|
180 | 180 | $tf = get_widget ( empty($vardef [ 'type' ]) ? "" : $vardef [ 'type' ]) ; |
181 | 181 | $tf->module = $module; |
182 | 182 | $tf->populateFromRow($vardef); |
183 | - $vardef = array_merge($vardef, $tf->get_field_def()); |
|
183 | + $vardef = array_merge($vardef, $tf->get_field_def()); |
|
184 | 184 | |
185 | 185 | // $GLOBALS['log']->debug('vardefs after loading = '.print_r($vardef,true)); |
186 | 186 | |
@@ -190,10 +190,10 @@ discard block |
||
190 | 190 | $enumFields = array(); |
191 | 191 | foreach($module->field_defs as $field => $def) |
192 | 192 | { |
193 | - if (!empty($def['type']) && $def['type'] == "int" && !empty($def['auto_increment'])) { |
|
194 | - $allowAutoInc = false; |
|
195 | - continue; |
|
196 | - } |
|
193 | + if (!empty($def['type']) && $def['type'] == "int" && !empty($def['auto_increment'])) { |
|
194 | + $allowAutoInc = false; |
|
195 | + continue; |
|
196 | + } |
|
197 | 197 | if (!empty($def['type']) && $def['type'] == "enum" && $field != $vardef['name']) |
198 | 198 | { |
199 | 199 | if(!empty($def['studio']) && $def['studio'] == "false") continue; //bug51866 |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | $fv->ss->assign('module', $module); |
212 | 212 | if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent')) |
213 | - $field_types['parent'] = $GLOBALS['mod_strings']['parent']; |
|
213 | + $field_types['parent'] = $GLOBALS['mod_strings']['parent']; |
|
214 | 214 | |
215 | 215 | $edit_or_add = 'editField' ; |
216 | 216 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
247 | - require_once ('modules/DynamicFields/FieldCases.php') ; |
|
247 | + require_once ('modules/DynamicFields/FieldCases.php') ; |
|
248 | 248 | $tf = get_widget ( empty($vardef [ 'type' ]) ? "" : $vardef [ 'type' ]) ; |
249 | 249 | $tf->module = $module; |
250 | 250 | $tf->populateFromRow($vardef); |
@@ -258,8 +258,8 @@ discard block |
||
258 | 258 | |
259 | 259 | if(isset($vardef['vname'])) |
260 | 260 | $fv->ss->assign('lbl_value', htmlentities($module->getLabel('en_us',$vardef['vname']), ENT_QUOTES, 'UTF-8')); |
261 | - if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent')) |
|
262 | - $field_types['parent'] = $GLOBALS['mod_strings']['parent']; |
|
261 | + if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent')) |
|
262 | + $field_types['parent'] = $GLOBALS['mod_strings']['parent']; |
|
263 | 263 | |
264 | 264 | $enumFields = array(); |
265 | 265 | if (!empty($module->mbvardefs->vardefs['fields'])) |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | if($_REQUEST['action'] == 'RefreshField'){ |
283 | - require_once('modules/DynamicFields/FieldCases.php'); |
|
283 | + require_once('modules/DynamicFields/FieldCases.php'); |
|
284 | 284 | $field = get_widget($_POST['type']); |
285 | 285 | $field->populateFromPost(); |
286 | 286 | $vardef = $field->get_field_def(); |
@@ -289,16 +289,16 @@ discard block |
||
289 | 289 | } |
290 | 290 | |
291 | 291 | foreach(array("formula", "default", "comments", "help", "visiblityGrid") as $toEscape) |
292 | - { |
|
293 | - if (!empty($vardef[$toEscape]) && is_string($vardef[$toEscape])) { |
|
294 | - $vardef[$toEscape] = htmlentities($vardef[$toEscape], ENT_QUOTES, 'UTF-8'); |
|
295 | - } |
|
296 | - } |
|
292 | + { |
|
293 | + if (!empty($vardef[$toEscape]) && is_string($vardef[$toEscape])) { |
|
294 | + $vardef[$toEscape] = htmlentities($vardef[$toEscape], ENT_QUOTES, 'UTF-8'); |
|
295 | + } |
|
296 | + } |
|
297 | 297 | |
298 | 298 | if((!empty($vardef['studio']) && is_array($vardef['studio']) && !empty($vardef['studio']['no_duplicate']) && $vardef['studio']['no_duplicate'] == true) |
299 | 299 | || (strcmp($field_name, "name") == 0) || (isset($vardef['type']) && $vardef['type'] == 'name')) // bug #35767, do not allow cloning of name field |
300 | 300 | { |
301 | - $fv->ss->assign('no_duplicate', true); |
|
301 | + $fv->ss->assign('no_duplicate', true); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | $fv->ss->assign('action',$action); |
@@ -318,25 +318,25 @@ discard block |
||
318 | 318 | $existing_field_names = array () ; |
319 | 319 | foreach ( $module->mbvardefs->vardefs['fields'] as $field ) |
320 | 320 | { |
321 | - if ($field [ 'type' ] == 'enum' || $field [ 'type'] == 'multienum' ) |
|
322 | - { |
|
323 | - $triggers [] = $field [ 'name' ] ; |
|
324 | - } |
|
321 | + if ($field [ 'type' ] == 'enum' || $field [ 'type'] == 'multienum' ) |
|
322 | + { |
|
323 | + $triggers [] = $field [ 'name' ] ; |
|
324 | + } |
|
325 | 325 | |
326 | - if (!isset($field['source']) || $field['source'] != 'non-db') { |
|
327 | - if(preg_match('/^(.*?)(_c)?$/', $field['name'], $matches)) |
|
328 | - { |
|
329 | - $existing_field_names [] = strtoupper($matches[1]); |
|
330 | - } |
|
331 | - } |
|
326 | + if (!isset($field['source']) || $field['source'] != 'non-db') { |
|
327 | + if(preg_match('/^(.*?)(_c)?$/', $field['name'], $matches)) |
|
328 | + { |
|
329 | + $existing_field_names [] = strtoupper($matches[1]); |
|
330 | + } |
|
331 | + } |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | $fv->ss->assign('triggers',$triggers); |
335 | 335 | $fv->ss->assign('existing_field_names', $json->encode($existing_field_names)); |
336 | 336 | $fv->ss->assign('mod_strings',$GLOBALS['mod_strings']); |
337 | 337 | |
338 | - // jchi #24880 |
|
339 | - // end |
|
338 | + // jchi #24880 |
|
339 | + // end |
|
340 | 340 | |
341 | 341 | |
342 | 342 | $layout = $fv->getLayout($vardef); |
@@ -42,20 +42,20 @@ discard block |
||
42 | 42 | |
43 | 43 | class Viewdeletepackage extends SugarView |
44 | 44 | { |
45 | - /** |
|
46 | - * @see SugarView::_getModuleTitleParams() |
|
47 | - */ |
|
48 | - protected function _getModuleTitleParams($browserTitle = false) |
|
49 | - { |
|
50 | - global $mod_strings; |
|
45 | + /** |
|
46 | + * @see SugarView::_getModuleTitleParams() |
|
47 | + */ |
|
48 | + protected function _getModuleTitleParams($browserTitle = false) |
|
49 | + { |
|
50 | + global $mod_strings; |
|
51 | 51 | |
52 | - return array( |
|
53 | - translate('LBL_MODULE_NAME','Administration'), |
|
54 | - ModuleBuilderController::getModuleTitle(), |
|
55 | - ); |
|
52 | + return array( |
|
53 | + translate('LBL_MODULE_NAME','Administration'), |
|
54 | + ModuleBuilderController::getModuleTitle(), |
|
55 | + ); |
|
56 | 56 | } |
57 | 57 | |
58 | - function display() |
|
58 | + function display() |
|
59 | 59 | { |
60 | 60 | global $mod_strings; |
61 | 61 | |
@@ -63,5 +63,5 @@ discard block |
||
63 | 63 | $ajax->addSection('center', $mod_strings['LBL_PACKAGE_DELETED'], |
64 | 64 | str_replace('[[package]]',$_REQUEST['package'],$mod_strings['LBL_PACKAGE_WAS_DELETED'])); |
65 | 65 | echo $ajax->getJavascript(); |
66 | - } |
|
66 | + } |
|
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -40,51 +40,51 @@ |
||
40 | 40 | require_once('modules/ModuleBuilder/MB/AjaxCompose.php'); |
41 | 41 | class ViewHome 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; |
|
59 | - global $mod_strings; |
|
60 | - $smarty = new Sugar_Smarty(); |
|
61 | - $smarty->assign('title' , $mod_strings['LBL_DEVELOPER_TOOLS']); |
|
62 | - $smarty->assign('question', $mod_strings['LBL_QUESTION_EDITOR']); |
|
63 | - $smarty->assign('defaultHelp', 'mainHelp'); |
|
64 | - $this->generateHomeButtons(); |
|
65 | - $smarty->assign('buttons', $this->buttons); |
|
66 | - $assistant=array('group'=>'main', 'key'=>'welcome'); |
|
67 | - $smarty->assign('assistant',$assistant); |
|
68 | - //initialize Assistant's display property. |
|
69 | - $userPref = $current_user->getPreference('mb_assist', 'Assistant'); |
|
70 | - if(!$userPref) $userPref="na"; |
|
71 | - $smarty->assign('userPref',$userPref); |
|
72 | - $ajax = new AjaxCompose(); |
|
73 | - $ajax->addSection('center', $mod_strings['LBL_HOME'],$smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl')); |
|
74 | - echo $ajax->getJavascript(); |
|
75 | - } |
|
56 | + function display() |
|
57 | + { |
|
58 | + global $current_user; |
|
59 | + global $mod_strings; |
|
60 | + $smarty = new Sugar_Smarty(); |
|
61 | + $smarty->assign('title' , $mod_strings['LBL_DEVELOPER_TOOLS']); |
|
62 | + $smarty->assign('question', $mod_strings['LBL_QUESTION_EDITOR']); |
|
63 | + $smarty->assign('defaultHelp', 'mainHelp'); |
|
64 | + $this->generateHomeButtons(); |
|
65 | + $smarty->assign('buttons', $this->buttons); |
|
66 | + $assistant=array('group'=>'main', 'key'=>'welcome'); |
|
67 | + $smarty->assign('assistant',$assistant); |
|
68 | + //initialize Assistant's display property. |
|
69 | + $userPref = $current_user->getPreference('mb_assist', 'Assistant'); |
|
70 | + if(!$userPref) $userPref="na"; |
|
71 | + $smarty->assign('userPref',$userPref); |
|
72 | + $ajax = new AjaxCompose(); |
|
73 | + $ajax->addSection('center', $mod_strings['LBL_HOME'],$smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl')); |
|
74 | + echo $ajax->getJavascript(); |
|
75 | + } |
|
76 | 76 | |
77 | 77 | |
78 | - function generateHomeButtons() |
|
79 | - { |
|
80 | - global $current_user; |
|
78 | + function generateHomeButtons() |
|
79 | + { |
|
80 | + global $current_user; |
|
81 | 81 | if(displayStudioForCurrentUser() == true) { |
82 | - //$this->buttons['Application'] = array ('action' => '', 'imageTitle' => 'Application', 'size' => '128', 'help'=>'appBtn'); |
|
83 | - $this->buttons[$GLOBALS['mod_strings']['LBL_STUDIO']] = array ('action' => 'javascript:ModuleBuilder.main("studio")', 'imageTitle' => 'Studio', 'size' => '128', 'help'=>'studioBtn'); |
|
82 | + //$this->buttons['Application'] = array ('action' => '', 'imageTitle' => 'Application', 'size' => '128', 'help'=>'appBtn'); |
|
83 | + $this->buttons[$GLOBALS['mod_strings']['LBL_STUDIO']] = array ('action' => 'javascript:ModuleBuilder.main("studio")', 'imageTitle' => 'Studio', 'size' => '128', 'help'=>'studioBtn'); |
|
84 | 84 | } |
85 | 85 | if(is_admin($current_user)) { |
86 | - $this->buttons[$GLOBALS['mod_strings']['LBL_MODULEBUILDER']] = array ('action' => 'javascript:ModuleBuilder.main("mb")', 'imageTitle' => 'ModuleBuilder', 'size' => '128', 'help'=>'mbBtn'); |
|
86 | + $this->buttons[$GLOBALS['mod_strings']['LBL_MODULEBUILDER']] = array ('action' => 'javascript:ModuleBuilder.main("mb")', 'imageTitle' => 'ModuleBuilder', 'size' => '128', 'help'=>'mbBtn'); |
|
87 | 87 | } |
88 | - $this->buttons[$GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR']] = array ('action' => 'javascript:ModuleBuilder.main("dropdowns")', 'imageTitle' => $GLOBALS['mod_strings']['LBL_HOME_EDIT_DROPDOWNS'], 'imageName' => 'DropDownEditor', 'size' => '128', 'help'=>'dropDownEditorBtn'); |
|
89 | - } |
|
88 | + $this->buttons[$GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR']] = array ('action' => 'javascript:ModuleBuilder.main("dropdowns")', 'imageTitle' => $GLOBALS['mod_strings']['LBL_HOME_EDIT_DROPDOWNS'], 'imageName' => 'DropDownEditor', 'size' => '128', 'help'=>'dropDownEditorBtn'); |
|
89 | + } |
|
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | |
45 | 45 | class StandardField extends DynamicField |
46 | 46 | { |
47 | - var $custom_def = array(); |
|
48 | - var $base_def = array(); |
|
49 | - var $baseField; |
|
47 | + var $custom_def = array(); |
|
48 | + var $base_def = array(); |
|
49 | + var $baseField; |
|
50 | 50 | |
51 | 51 | |
52 | 52 | function __construct($module = '') { |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | protected function loadCustomDef($field){ |
57 | - global $beanList; |
|
58 | - if (!empty($beanList[$this->module]) && is_file("custom/Extension/modules/{$this->module}/Ext/Vardefs/sugarfield_$field.php")) |
|
59 | - { |
|
57 | + global $beanList; |
|
58 | + if (!empty($beanList[$this->module]) && is_file("custom/Extension/modules/{$this->module}/Ext/Vardefs/sugarfield_$field.php")) |
|
59 | + { |
|
60 | 60 | $bean_name = get_valid_bean_name($this->module); |
61 | 61 | $dictionary = array($bean_name => array("fields" => array($field => array()))); |
62 | 62 | include("$this->base_path/sugarfield_$field.php"); |
63 | 63 | if (!empty($dictionary[$bean_name]) && isset($dictionary[$bean_name]["fields"][$field])) |
64 | 64 | $this->custom_def = $dictionary[$bean_name]["fields"][$field]; |
65 | - } |
|
65 | + } |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | protected function loadBaseDef($field){ |
@@ -118,24 +118,24 @@ discard block |
||
118 | 118 | $this->baseField = get_widget ( $field->type) ; |
119 | 119 | foreach ($field->vardef_map as $property => $fmd_col){ |
120 | 120 | |
121 | - if ($property == "action" || $property == "label_value" || $property == "label" |
|
122 | - || ((substr($property, 0,3) == 'ext' && strlen($property) == 4)) |
|
121 | + if ($property == "action" || $property == "label_value" || $property == "label" |
|
122 | + || ((substr($property, 0,3) == 'ext' && strlen($property) == 4)) |
|
123 | 123 | ) |
124 | - continue; |
|
124 | + continue; |
|
125 | 125 | |
126 | 126 | // Bug 37043 - Avoid writing out vardef defintions that are the default value. |
127 | 127 | if (isset($newDef[$property]) && |
128 | - ((!isset($currdef[$property]) && !$this->isDefaultValue($property,$newDef[$property], $this->baseField)) |
|
129 | - || (isset($currdef[$property]) && $currdef[$property] != $newDef[$property]) |
|
130 | - ) |
|
128 | + ((!isset($currdef[$property]) && !$this->isDefaultValue($property,$newDef[$property], $this->baseField)) |
|
129 | + || (isset($currdef[$property]) && $currdef[$property] != $newDef[$property]) |
|
130 | + ) |
|
131 | 131 | ){ |
132 | - $this->custom_def[$property] = |
|
132 | + $this->custom_def[$property] = |
|
133 | 133 | is_string($newDef[$property]) ? htmlspecialchars_decode($newDef[$property], ENT_QUOTES) : $newDef[$property]; |
134 | 134 | } |
135 | 135 | |
136 | 136 | //Remove any orphaned entries |
137 | 137 | if (isset($this->custom_def[$property]) && !isset($newDef[$property])) |
138 | - unset($this->custom_def[$property]); |
|
138 | + unset($this->custom_def[$property]); |
|
139 | 139 | |
140 | 140 | //Handle overrides of out of the box definitions with empty |
141 | 141 | if (!empty($this->base_def[$property]) && !isset($newDef[$property])) |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | if (isset($this->custom_def["duplicate_merge_dom_value"]) && !isset($this->custom_def["duplicate_merge"])) |
156 | - unset($this->custom_def["duplicate_merge_dom_value"]); |
|
156 | + unset($this->custom_def["duplicate_merge_dom_value"]); |
|
157 | 157 | |
158 | 158 | $this->writeVardefExtension($bean_name, $field, $this->custom_def); |
159 | 159 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public static $definitionKeys = array ( |
60 | 60 | // atttributes of this relationship - here in the definition so they are preserved across saves and loads |
61 | 61 | 'for_activities', |
62 | - 'is_custom', |
|
62 | + 'is_custom', |
|
63 | 63 | 'from_studio', |
64 | 64 | 'readonly' , // a readonly relationship cannot be Built by subclasses of AbstractRelationships |
65 | 65 | 'deleted' , // a deleted relationship will not be built, and if it had been built previously the built relationship will be removed |
@@ -221,48 +221,48 @@ discard block |
||
221 | 221 | $labelDefinitions = array ( ) ; |
222 | 222 | if (!$this->relationship_only) |
223 | 223 | { |
224 | - if(!$this->is_custom && $update && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){ |
|
225 | - include("modules/{$this->rhs_module}/metadata/subpaneldefs.php"); |
|
226 | - if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){ |
|
227 | - $rightSysLabel = $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key']; |
|
228 | - } |
|
229 | - $layout_defs = array(); |
|
230 | - } |
|
231 | - if(!$this->is_custom && $update && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){ |
|
232 | - include("modules/{$this->lhs_module}/metadata/subpaneldefs.php"); |
|
233 | - if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){ |
|
234 | - $leftSysLabel = $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key']; |
|
235 | - } |
|
236 | - $layout_defs = array(); |
|
237 | - } |
|
238 | - $labelDefinitions [] = array ( |
|
239 | - 'module' => $this->rhs_module , |
|
240 | - 'system_label' => isset($rightSysLabel)?$rightSysLabel : 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getLeftModuleSystemLabel() ) . '_TITLE' , |
|
241 | - 'display_label' => ($update && !empty($_REQUEST [ 'lhs_label' ] ))?$_REQUEST [ 'lhs_label' ] :(empty($this->lhs_label) ? translate ( $this->lhs_module ) : $this->lhs_label), |
|
242 | - ) ; |
|
224 | + if(!$this->is_custom && $update && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){ |
|
225 | + include("modules/{$this->rhs_module}/metadata/subpaneldefs.php"); |
|
226 | + if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){ |
|
227 | + $rightSysLabel = $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key']; |
|
228 | + } |
|
229 | + $layout_defs = array(); |
|
230 | + } |
|
231 | + if(!$this->is_custom && $update && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){ |
|
232 | + include("modules/{$this->lhs_module}/metadata/subpaneldefs.php"); |
|
233 | + if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){ |
|
234 | + $leftSysLabel = $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key']; |
|
235 | + } |
|
236 | + $layout_defs = array(); |
|
237 | + } |
|
238 | + $labelDefinitions [] = array ( |
|
239 | + 'module' => $this->rhs_module , |
|
240 | + 'system_label' => isset($rightSysLabel)?$rightSysLabel : 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getLeftModuleSystemLabel() ) . '_TITLE' , |
|
241 | + 'display_label' => ($update && !empty($_REQUEST [ 'lhs_label' ] ))?$_REQUEST [ 'lhs_label' ] :(empty($this->lhs_label) ? translate ( $this->lhs_module ) : $this->lhs_label), |
|
242 | + ) ; |
|
243 | 243 | $labelDefinitions [] = array ( |
244 | - 'module' => $this->lhs_module , |
|
245 | - 'system_label' => isset($leftSysLabel)?$leftSysLabel :'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel() ) . '_TITLE' , |
|
246 | - 'display_label' => ($update && !empty($_REQUEST [ 'rhs_label' ] ))?$_REQUEST [ 'rhs_label' ] :(empty($this->rhs_label) ? translate ( $this->rhs_module ) : $this->rhs_label), |
|
244 | + 'module' => $this->lhs_module , |
|
245 | + 'system_label' => isset($leftSysLabel)?$leftSysLabel :'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel() ) . '_TITLE' , |
|
246 | + 'display_label' => ($update && !empty($_REQUEST [ 'rhs_label' ] ))?$_REQUEST [ 'rhs_label' ] :(empty($this->rhs_label) ? translate ( $this->rhs_module ) : $this->rhs_label), |
|
247 | 247 | ) ; |
248 | 248 | } |
249 | 249 | return $labelDefinitions ; |
250 | 250 | } |
251 | 251 | |
252 | - function getLeftModuleSystemLabel() |
|
252 | + function getLeftModuleSystemLabel() |
|
253 | 253 | { |
254 | - if($this->lhs_module == $this->rhs_module){ |
|
255 | - return $this->lhs_module.'_L'; |
|
256 | - } |
|
257 | - return $this->lhs_module; |
|
254 | + if($this->lhs_module == $this->rhs_module){ |
|
255 | + return $this->lhs_module.'_L'; |
|
256 | + } |
|
257 | + return $this->lhs_module; |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | function getRightModuleSystemLabel() |
261 | 261 | { |
262 | - if($this->lhs_module == $this->rhs_module){ |
|
263 | - return $this->rhs_module.'_R'; |
|
264 | - } |
|
265 | - return $this->rhs_module; |
|
262 | + if($this->lhs_module == $this->rhs_module){ |
|
263 | + return $this->rhs_module.'_R'; |
|
264 | + } |
|
265 | + return $this->rhs_module; |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
@@ -298,24 +298,24 @@ discard block |
||
298 | 298 | protected function getSubpanelDefinition ($relationshipName , $sourceModule , $subpanelName, $titleKeyName = '', $source = "") |
299 | 299 | { |
300 | 300 | if (empty($source)) |
301 | - $source = $this->getValidDBName($relationshipName); |
|
302 | - $subpanelDefinition = array ( ) ; |
|
301 | + $source = $this->getValidDBName($relationshipName); |
|
302 | + $subpanelDefinition = array ( ) ; |
|
303 | 303 | $subpanelDefinition [ 'order' ] = 100 ; |
304 | 304 | $subpanelDefinition [ 'module' ] = $sourceModule ; |
305 | 305 | $subpanelDefinition [ 'subpanel_name' ] = $subpanelName ; |
306 | 306 | // following two lines are required for the subpanel pagination code in ListView.php->processUnionBeans() to correctly determine the relevant field for sorting |
307 | 307 | $subpanelDefinition [ 'sort_order' ] = 'asc' ; |
308 | 308 | $subpanelDefinition [ 'sort_by' ] = 'id' ; |
309 | - if(!empty($titleKeyName)){ |
|
310 | - $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $titleKeyName ) . '_TITLE' ; |
|
311 | - }else{ |
|
312 | - $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
313 | - } |
|
309 | + if(!empty($titleKeyName)){ |
|
310 | + $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $titleKeyName ) . '_TITLE' ; |
|
311 | + }else{ |
|
312 | + $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
313 | + } |
|
314 | 314 | $subpanelDefinition [ 'get_subpanel_data' ] = $source ; |
315 | 315 | $subpanelDefinition [ 'top_buttons' ] = array( |
316 | - array('widget_class' => "SubPanelTopButtonQuickCreate"), |
|
317 | - array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect') |
|
318 | - ); |
|
316 | + array('widget_class' => "SubPanelTopButtonQuickCreate"), |
|
317 | + array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect') |
|
318 | + ); |
|
319 | 319 | |
320 | 320 | return array ( $subpanelDefinition ); |
321 | 321 | } |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | $vardef [ 'module' ] = $sourceModule ; |
340 | 340 | $vardef [ 'bean_name' ] = BeanFactory::getObjectName($sourceModule) ; |
341 | 341 | if ($right_side) |
342 | - $vardef [ 'side' ] = 'right' ; |
|
342 | + $vardef [ 'side' ] = 'right' ; |
|
343 | 343 | if (!empty($vname)) |
344 | 344 | $vardef [ 'vname' ] = $vname; |
345 | 345 | if (!empty($id_name)) |
@@ -364,11 +364,11 @@ discard block |
||
364 | 364 | $vardef [ 'type' ] = 'link' ; |
365 | 365 | $vardef [ 'relationship' ] = $relationshipName ; |
366 | 366 | $vardef [ 'source' ] = 'non-db' ; |
367 | - $vardef ['reportable'] = false; |
|
367 | + $vardef ['reportable'] = false; |
|
368 | 368 | if ($right_side) |
369 | - $vardef [ 'side' ] = 'right' ; |
|
369 | + $vardef [ 'side' ] = 'right' ; |
|
370 | 370 | else |
371 | - $vardef [ 'side' ] = 'left' ; |
|
371 | + $vardef [ 'side' ] = 'left' ; |
|
372 | 372 | if (!empty($vname)) |
373 | 373 | $vardef [ 'vname' ] = $vname; |
374 | 374 | |
@@ -389,11 +389,11 @@ discard block |
||
389 | 389 | $vardef [ 'type' ] = 'relate' ; |
390 | 390 | |
391 | 391 | $vardef [ 'source' ] = 'non-db' ; |
392 | - if(!empty($vnameLabel)){ |
|
393 | - $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $vnameLabel ) . '_TITLE' ; |
|
394 | - }else{ |
|
395 | - $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
396 | - } |
|
392 | + if(!empty($vnameLabel)){ |
|
393 | + $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $vnameLabel ) . '_TITLE' ; |
|
394 | + }else{ |
|
395 | + $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
396 | + } |
|
397 | 397 | |
398 | 398 | $vardef [ 'save' ] = true; // the magic value to tell SugarBean to save this relate field even though it is not listed in the $relationship_fields array |
399 | 399 | |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | if (in_array( 'file' , array_keys ( $module->config [ 'templates' ] ) ) ){ |
422 | 422 | $vardef [ 'rname' ] = 'document_name' ; |
423 | 423 | }elseif(in_array ( 'person' , array_keys ( $module->config [ 'templates' ] ) ) ){ |
424 | - $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ; |
|
424 | + $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ; |
|
425 | 425 | } |
426 | 426 | } |
427 | 427 | else |
@@ -450,11 +450,11 @@ discard block |
||
450 | 450 | require_once ( $GLOBALS ['beanFiles'] [ $object ] ); |
451 | 451 | $bean = new $object(); |
452 | 452 | if ( isset ( $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){ |
453 | - if(in_array ( 'file' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){ |
|
454 | - $vardef [ 'rname' ] = 'document_name' ; |
|
455 | - }elseif(in_array ( 'person' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){ |
|
456 | - $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ; |
|
457 | - } |
|
453 | + if(in_array ( 'file' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){ |
|
454 | + $vardef [ 'rname' ] = 'document_name' ; |
|
455 | + }elseif(in_array ( 'person' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){ |
|
456 | + $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ; |
|
457 | + } |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | function getJoinKeyLHS() |
635 | 635 | { |
636 | 636 | if (!isset($this->joinKeyLHS)) |
637 | - $this->joinKeyLHS = $this->getValidDBName ( $this->relationship_name . $this->lhs_module . "_ida" , true) ; |
|
637 | + $this->joinKeyLHS = $this->getValidDBName ( $this->relationship_name . $this->lhs_module . "_ida" , true) ; |
|
638 | 638 | |
639 | 639 | return $this->joinKeyLHS; |
640 | 640 | } |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | function getJoinKeyRHS() |
643 | 643 | { |
644 | 644 | if (!isset($this->joinKeyRHS)) |
645 | - $this->joinKeyRHS = $this->getValidDBName ( $this->relationship_name . $this->rhs_module . "_idb" , true) ; |
|
645 | + $this->joinKeyRHS = $this->getValidDBName ( $this->relationship_name . $this->rhs_module . "_idb" , true) ; |
|
646 | 646 | |
647 | 647 | return $this->joinKeyRHS; |
648 | 648 | } |
@@ -674,32 +674,32 @@ discard block |
||
674 | 674 | } |
675 | 675 | |
676 | 676 | public function getTitleKey($left=false){ |
677 | - if(!$this->is_custom && !$left && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){ |
|
678 | - include("modules/{$this->rhs_module}/metadata/subpaneldefs.php"); |
|
679 | - if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){ |
|
680 | - return $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key']; |
|
681 | - } |
|
682 | - }else if(!$this->is_custom && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){ |
|
683 | - include("modules/{$this->lhs_module}/metadata/subpaneldefs.php"); |
|
684 | - if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){ |
|
685 | - return $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key']; |
|
686 | - } |
|
687 | - } |
|
677 | + if(!$this->is_custom && !$left && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){ |
|
678 | + include("modules/{$this->rhs_module}/metadata/subpaneldefs.php"); |
|
679 | + if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){ |
|
680 | + return $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key']; |
|
681 | + } |
|
682 | + }else if(!$this->is_custom && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){ |
|
683 | + include("modules/{$this->lhs_module}/metadata/subpaneldefs.php"); |
|
684 | + if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){ |
|
685 | + return $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key']; |
|
686 | + } |
|
687 | + } |
|
688 | 688 | |
689 | - if($left){ |
|
690 | - $titleKeyName = $this->getRightModuleSystemLabel(); |
|
691 | - $sourceModule = $this->rhs_module; |
|
692 | - }else{ |
|
693 | - $titleKeyName = $this->getLeftModuleSystemLabel(); |
|
694 | - $sourceModule = $this->lhs_module; |
|
695 | - } |
|
689 | + if($left){ |
|
690 | + $titleKeyName = $this->getRightModuleSystemLabel(); |
|
691 | + $sourceModule = $this->rhs_module; |
|
692 | + }else{ |
|
693 | + $titleKeyName = $this->getLeftModuleSystemLabel(); |
|
694 | + $sourceModule = $this->lhs_module; |
|
695 | + } |
|
696 | 696 | |
697 | - if(!empty($titleKeyName)){ |
|
698 | - $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $titleKeyName ) . '_TITLE' ; |
|
699 | - }else{ |
|
700 | - $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
701 | - } |
|
697 | + if(!empty($titleKeyName)){ |
|
698 | + $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $titleKeyName ) . '_TITLE' ; |
|
699 | + }else{ |
|
700 | + $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $sourceModule ) . '_TITLE' ; |
|
701 | + } |
|
702 | 702 | |
703 | - return $title_key; |
|
704 | - } |
|
703 | + return $title_key; |
|
704 | + } |
|
705 | 705 | } |
706 | 706 | \ No newline at end of file |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | // have different actual relationship names other than <relationshipName> |
67 | 67 | // e.g $dictionary[ 'quotes_accounts' ] has two relationships: quotes_billto_accounts, quotes_shipto_accounts |
68 | 68 | protected $specialCaseBaseNames = array( 'quotes_accounts', |
69 | - 'quotes_contacts', |
|
70 | - 'emails_beans', |
|
71 | - 'linked_documents', |
|
72 | - 'project_relation', |
|
73 | - 'prospect_lists_prospects', |
|
74 | - 'queues_beans', |
|
75 | - 'queues_queue', |
|
76 | - 'tracker_sessions' |
|
77 | - ); |
|
69 | + 'quotes_contacts', |
|
70 | + 'emails_beans', |
|
71 | + 'linked_documents', |
|
72 | + 'project_relation', |
|
73 | + 'prospect_lists_prospects', |
|
74 | + 'queues_beans', |
|
75 | + 'queues_queue', |
|
76 | + 'tracker_sessions' |
|
77 | + ); |
|
78 | 78 | /* |
79 | 79 | * Find all deployed modules that can participate in a relationship |
80 | 80 | * Return a list of modules with associated subpanels |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | protected function build ($basepath , $installDefPrefix , $relationships ) |
334 | 334 | { |
335 | 335 | global $sugar_config; |
336 | - // keep the relationships data separate from any other build data by ading /relationships to the basepath |
|
336 | + // keep the relationships data separate from any other build data by ading /relationships to the basepath |
|
337 | 337 | $basepath .= '/relationships' ; |
338 | 338 | |
339 | 339 | $installDefs = array ( ) ; |
@@ -393,34 +393,34 @@ discard block |
||
393 | 393 | { |
394 | 394 | global $sugar_config; |
395 | 395 | |
396 | - mkdir_recursive ( "$basepath/language" ) ; |
|
396 | + mkdir_recursive ( "$basepath/language" ) ; |
|
397 | 397 | |
398 | - $headerString = "<?php\n//THIS FILE IS AUTO GENERATED, DO NOT MODIFY\n" ; |
|
398 | + $headerString = "<?php\n//THIS FILE IS AUTO GENERATED, DO NOT MODIFY\n" ; |
|
399 | 399 | $installDefs = array ( ) ; |
400 | 400 | foreach ( $labelDefinitions as $definition ) |
401 | 401 | { |
402 | - $mod_strings = array(); |
|
403 | - $app_list_strings = array(); |
|
402 | + $mod_strings = array(); |
|
403 | + $app_list_strings = array(); |
|
404 | 404 | |
405 | - $out = $headerString; |
|
405 | + $out = $headerString; |
|
406 | 406 | |
407 | - $filename = "{$basepath}/language/{$definition['module']}.php" ; |
|
407 | + $filename = "{$basepath}/language/{$definition['module']}.php" ; |
|
408 | 408 | |
409 | - if (file_exists ( $filename )) |
|
410 | - include ($filename); |
|
409 | + if (file_exists ( $filename )) |
|
410 | + include ($filename); |
|
411 | 411 | |
412 | 412 | |
413 | 413 | //Check for app strings |
414 | 414 | $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->saveLabels(): saving the following to {$filename}" |
415 | - . print_r ( $definition, true ) ) ; |
|
415 | + . print_r ( $definition, true ) ) ; |
|
416 | 416 | if ($definition['module'] == 'application') { |
417 | - $app_list_strings[$definition [ 'system_label' ]] = $definition [ 'display_label' ]; |
|
418 | - foreach ($app_list_strings as $key => $val) |
|
419 | - $out .= override_value_to_string_recursive2('app_list_strings', $key, $val); |
|
417 | + $app_list_strings[$definition [ 'system_label' ]] = $definition [ 'display_label' ]; |
|
418 | + foreach ($app_list_strings as $key => $val) |
|
419 | + $out .= override_value_to_string_recursive2('app_list_strings', $key, $val); |
|
420 | 420 | } else { |
421 | - $mod_strings[ $definition [ 'system_label' ]] = $definition [ 'display_label' ]; |
|
422 | - foreach ($mod_strings as $key => $val) |
|
423 | - $out .= override_value_to_string_recursive2('mod_strings', $key, $val); |
|
421 | + $mod_strings[ $definition [ 'system_label' ]] = $definition [ 'display_label' ]; |
|
422 | + foreach ($mod_strings as $key => $val) |
|
423 | + $out .= override_value_to_string_recursive2('mod_strings', $key, $val); |
|
424 | 424 | } |
425 | 425 | |
426 | 426 | $fh = fopen ( $filename, 'w' ) ; |
@@ -430,17 +430,17 @@ discard block |
||
430 | 430 | |
431 | 431 | foreach($sugar_config['languages'] as $lk => $lv) |
432 | 432 | { |
433 | - $installDefs [ $definition [ 'module' ] . "_$lk" ] = array ( |
|
434 | - 'from' => "{$installDefPrefix}/relationships/language/{$definition [ 'module' ]}.php" , |
|
435 | - 'to_module' => $definition [ 'module' ] , |
|
436 | - 'language' => $lk |
|
437 | - ) ; |
|
433 | + $installDefs [ $definition [ 'module' ] . "_$lk" ] = array ( |
|
434 | + 'from' => "{$installDefPrefix}/relationships/language/{$definition [ 'module' ]}.php" , |
|
435 | + 'to_module' => $definition [ 'module' ] , |
|
436 | + 'language' => $lk |
|
437 | + ) ; |
|
438 | 438 | } |
439 | 439 | |
440 | 440 | /* do not use the following write_array_to_file method to write the label file - |
441 | 441 | * module installer appends each of the label files together (as it does for all files) |
442 | 442 | * into a combined label file and so the last $mod_strings is the only one received by the application */ |
443 | - // write_array_to_file ( 'mod_strings', array ( $definition [ 'system_label' ] => $definition [ 'display_label' ] ), $filename, "a" ) ; |
|
443 | + // write_array_to_file ( 'mod_strings', array ( $definition [ 'system_label' ] => $definition [ 'display_label' ] ), $filename, "a" ) ; |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | return $installDefs ; |
@@ -534,11 +534,11 @@ discard block |
||
534 | 534 | $relName = $moduleName; |
535 | 535 | foreach ( $definitions as $definition ) |
536 | 536 | { |
537 | - if (!empty($definition['relationship'])) |
|
538 | - { |
|
539 | - $relName = $definition['relationship']; |
|
540 | - break; |
|
541 | - } |
|
537 | + if (!empty($definition['relationship'])) |
|
538 | + { |
|
539 | + $relName = $definition['relationship']; |
|
540 | + break; |
|
541 | + } |
|
542 | 542 | } |
543 | 543 | |
544 | 544 | $filename = "$basepath/vardefs/{$relName}_{$moduleName}.php" ; |
@@ -547,14 +547,14 @@ discard block |
||
547 | 547 | foreach ( $definitions as $definition ) |
548 | 548 | { |
549 | 549 | $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->saveVardefs(): saving the following to {$filename}" . print_r ( $definition, true ) ) ; |
550 | - $out .= '$dictionary["' . $object . '"]["fields"]["' . $definition [ 'name' ] . '"] = ' |
|
551 | - . var_export_helper($definition) . ";\n"; |
|
550 | + $out .= '$dictionary["' . $object . '"]["fields"]["' . $definition [ 'name' ] . '"] = ' |
|
551 | + . var_export_helper($definition) . ";\n"; |
|
552 | 552 | } |
553 | 553 | file_put_contents($filename, $out); |
554 | 554 | |
555 | 555 | $installDefs [ $moduleName ] = array ( |
556 | - 'from' => "{$installDefPrefix}/relationships/vardefs/{$relName}_{$moduleName}.php" , |
|
557 | - 'to_module' => $moduleName |
|
556 | + 'from' => "{$installDefPrefix}/relationships/vardefs/{$relName}_{$moduleName}.php" , |
|
557 | + 'to_module' => $moduleName |
|
558 | 558 | ) ; |
559 | 559 | } |
560 | 560 |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | } |
285 | 285 | $module->setAppListStrings ( 'en_us', $appStrings ) ; |
286 | 286 | $module->save () ; |
287 | - //Bug42170================================ |
|
288 | - } |
|
287 | + //Bug42170================================ |
|
288 | + } |
|
289 | 289 | |
290 | 290 | // use an installDefPrefix of <basepath>/SugarModules for compatibility with the rest of ModuleBuilder |
291 | 291 | $this->installDefs = parent::build ( $basepath, "<basepath>/SugarModules", $relationships ) ; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $fieldsToAdd [$deployedModuleName] = $fieldName; |
419 | 419 | } |
420 | 420 | } |
421 | - } |
|
421 | + } |
|
422 | 422 | } |
423 | 423 | return array(array('additional_fields' => $fieldsToAdd)); |
424 | 424 | } |