@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | if (isset($GLOBALS['sugar_config']['show_download_tab'])) { |
160 | 160 | $enable_download_tab = $GLOBALS['sugar_config']['show_download_tab']; |
161 | - }else{ |
|
161 | + } else{ |
|
162 | 162 | $enable_download_tab = true; |
163 | 163 | } |
164 | 164 | |
@@ -175,8 +175,7 @@ discard block |
||
175 | 175 | if ($this->bean->id == $current_user->id) { |
176 | 176 | $reset_pref_warning = translate('LBL_RESET_PREFERENCES_WARNING','Users'); |
177 | 177 | $reset_home_warning = translate('LBL_RESET_HOMEPAGE_WARNING','Users'); |
178 | - } |
|
179 | - else { |
|
178 | + } else { |
|
180 | 179 | $reset_pref_warning = translate('LBL_RESET_PREFERENCES_WARNING_USER','Users'); |
181 | 180 | $reset_home_warning = translate('LBL_RESET_HOMEPAGE_WARNING_USER','Users'); |
182 | 181 | } |
@@ -193,8 +192,12 @@ discard block |
||
193 | 192 | $buttons_footer[]="<input type='button' class='button' id='reset_homepage_footer' onclick='if(confirm(\"{$reset_home_warning}\"))window.location=\"".$_SERVER['PHP_SELF'] .'?'.$the_query_string."&reset_homepage=true\";' value='".translate('LBL_RESET_HOMEPAGE','Users')."' />"; |
194 | 193 | |
195 | 194 | } |
196 | - if (isset($buttons_header)) $this->ss->assign("BUTTONS_HEADER", $buttons_header); |
|
197 | - if (isset($buttons_footer)) $this->ss->assign("BUTTONS_FOOTER", $buttons_footer); |
|
195 | + if (isset($buttons_header)) { |
|
196 | + $this->ss->assign("BUTTONS_HEADER", $buttons_header); |
|
197 | + } |
|
198 | + if (isset($buttons_footer)) { |
|
199 | + $this->ss->assign("BUTTONS_FOOTER", $buttons_footer); |
|
200 | + } |
|
198 | 201 | |
199 | 202 | |
200 | 203 | |
@@ -388,7 +391,9 @@ discard block |
||
388 | 391 | |
389 | 392 | $this->ss->assign('EXPORT_DELIMITER', $this->bean->getPreference('export_delimiter')); |
390 | 393 | |
391 | - if($this->bean->receive_notifications ||(!isset($this->bean->id) && $admin->settings['notify_send_by_default'])) $this->ss->assign("RECEIVE_NOTIFICATIONS", "checked"); |
|
394 | + if($this->bean->receive_notifications ||(!isset($this->bean->id) && $admin->settings['notify_send_by_default'])) { |
|
395 | + $this->ss->assign("RECEIVE_NOTIFICATIONS", "checked"); |
|
396 | + } |
|
392 | 397 | |
393 | 398 | //jc:12293 - modifying to use the accessor method which will translate the |
394 | 399 | //available character sets using the translation files |
@@ -479,7 +484,7 @@ discard block |
||
479 | 484 | $this->ss->assign('EXTERNAL_AUTH_CLASS_1', $sugar_config['authenticationClass']); |
480 | 485 | $this->ss->assign('EXTERNAL_AUTH_CLASS', $sugar_config['authenticationClass']); |
481 | 486 | $authclass = $sugar_config['authenticationClass']; |
482 | - }else{ |
|
487 | + } else{ |
|
483 | 488 | if(!empty($GLOBALS['system_config']->settings['system_ldap_enabled'])){ |
484 | 489 | $this->ss->assign('EXTERNAL_AUTH_CLASS_1', translate('LBL_LDAP','Users')); |
485 | 490 | $this->ss |
@@ -772,12 +777,10 @@ discard block |
||
772 | 777 | if ($user->is_admin) |
773 | 778 | { |
774 | 779 | $user->user_type = 'Administrator'; |
775 | - } |
|
776 | - else if ($user->is_group) |
|
780 | + } else if ($user->is_group) |
|
777 | 781 | { |
778 | 782 | $user->user_type = 'GROUP'; |
779 | - } |
|
780 | - else |
|
783 | + } else |
|
781 | 784 | { |
782 | 785 | $user->user_type = 'RegularUser'; |
783 | 786 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -89,7 +91,9 @@ discard block |
||
89 | 91 | $out = "<select name=\"$name\">"; |
90 | 92 | foreach($options as $key => $value) { |
91 | 93 | $selected = ''; |
92 | - if($key==$default) $selected = ' selected="selected"'; |
|
94 | + if($key==$default) { |
|
95 | + $selected = ' selected="selected"'; |
|
96 | + } |
|
93 | 97 | $out .= "<option label=\"$value\" value=\"$key\"$selected>$value</option>"; |
94 | 98 | } |
95 | 99 | $out .= "</select>"; |
@@ -275,8 +279,7 @@ discard block |
||
275 | 279 | if(!empty($value)) { |
276 | 280 | if(!empty($value['required'])) { |
277 | 281 | $form .= "<span class=\"required\">*</span>"; |
278 | - } |
|
279 | - else { |
|
282 | + } else { |
|
280 | 283 | } |
281 | 284 | if(!empty($_SESSION[$name])) { |
282 | 285 | $sessval = $_SESSION[$name]; |
@@ -295,7 +298,7 @@ discard block |
||
295 | 298 | //if the type is password, set a hidden field to capture the value. This is so that we can properly encode special characters, which is a limitation with password fields |
296 | 299 | if($type=='password'){ |
297 | 300 | $form .= "</div><div class=\"install_block\"><label>{$mod_strings['LBL_DBCONF_TITLE_PSWD_INFO_LABEL']}</label><span> </span><input type='$type' name='{$name}_entry' id='{$name}_entry' value='".urldecode($sessval)."'><input type='hidden' name='$name' id='$name' value='".urldecode($sessval)."'></div><div class=\"install_block\">"; |
298 | - }else{ |
|
301 | + } else{ |
|
299 | 302 | $form .= "<input type='$type' name='$name' id='$name' value='$sessval'>"; |
300 | 303 | } |
301 | 304 | |
@@ -559,7 +562,9 @@ discard block |
||
559 | 562 | $notify_allow_default_outbound_checked = empty($_SESSION['notify_allow_default_outbound']) ? '' : ' checked="checked" '; |
560 | 563 | |
561 | 564 | // set default smtp toggle buttons selected value |
562 | - if(empty($_SESSION['smtp_tab_selected'])) $_SESSION['smtp_tab_selected'] = 'smtp_tab_other'; |
|
565 | + if(empty($_SESSION['smtp_tab_selected'])) { |
|
566 | + $_SESSION['smtp_tab_selected'] = 'smtp_tab_other'; |
|
567 | + } |
|
563 | 568 | |
564 | 569 | $out .= <<<EOQ |
565 | 570 | <div class="floatbox full" id="fb2"> |
@@ -1705,28 +1710,37 @@ discard block |
||
1705 | 1710 | |
1706 | 1711 | |
1707 | 1712 | if( is_file("config.php") ){ |
1708 | - if(!empty($sugar_config['default_theme'])) |
|
1709 | - $_SESSION['site_default_theme'] = $sugar_config['default_theme']; |
|
1713 | + if(!empty($sugar_config['default_theme'])) { |
|
1714 | + $_SESSION['site_default_theme'] = $sugar_config['default_theme']; |
|
1715 | + } |
|
1710 | 1716 | |
1711 | - if(!empty($sugar_config['disable_persistent_connections'])) |
|
1712 | - $_SESSION['disable_persistent_connections'] = |
|
1717 | + if(!empty($sugar_config['disable_persistent_connections'])) { |
|
1718 | + $_SESSION['disable_persistent_connections'] = |
|
1713 | 1719 | $sugar_config['disable_persistent_connections']; |
1714 | - if(!empty($sugar_config['default_language'])) |
|
1715 | - $_SESSION['default_language'] = $sugar_config['default_language']; |
|
1716 | - if(!empty($sugar_config['translation_string_prefix'])) |
|
1717 | - $_SESSION['translation_string_prefix'] = $sugar_config['translation_string_prefix']; |
|
1718 | - if(!empty($sugar_config['default_charset'])) |
|
1719 | - $_SESSION['default_charset'] = $sugar_config['default_charset']; |
|
1720 | - |
|
1721 | - if(!empty($sugar_config['default_currency_name'])) |
|
1722 | - $_SESSION['default_currency_name'] = $sugar_config['default_currency_name']; |
|
1723 | - if(!empty($sugar_config['default_currency_symbol'])) |
|
1724 | - $_SESSION['default_currency_symbol'] = $sugar_config['default_currency_symbol']; |
|
1725 | - if(!empty($sugar_config['default_currency_iso4217'])) |
|
1726 | - $_SESSION['default_currency_iso4217'] = $sugar_config['default_currency_iso4217']; |
|
1727 | - |
|
1728 | - if(!empty($sugar_config['rss_cache_time'])) |
|
1729 | - $_SESSION['rss_cache_time'] = $sugar_config['rss_cache_time']; |
|
1720 | + } |
|
1721 | + if(!empty($sugar_config['default_language'])) { |
|
1722 | + $_SESSION['default_language'] = $sugar_config['default_language']; |
|
1723 | + } |
|
1724 | + if(!empty($sugar_config['translation_string_prefix'])) { |
|
1725 | + $_SESSION['translation_string_prefix'] = $sugar_config['translation_string_prefix']; |
|
1726 | + } |
|
1727 | + if(!empty($sugar_config['default_charset'])) { |
|
1728 | + $_SESSION['default_charset'] = $sugar_config['default_charset']; |
|
1729 | + } |
|
1730 | + |
|
1731 | + if(!empty($sugar_config['default_currency_name'])) { |
|
1732 | + $_SESSION['default_currency_name'] = $sugar_config['default_currency_name']; |
|
1733 | + } |
|
1734 | + if(!empty($sugar_config['default_currency_symbol'])) { |
|
1735 | + $_SESSION['default_currency_symbol'] = $sugar_config['default_currency_symbol']; |
|
1736 | + } |
|
1737 | + if(!empty($sugar_config['default_currency_iso4217'])) { |
|
1738 | + $_SESSION['default_currency_iso4217'] = $sugar_config['default_currency_iso4217']; |
|
1739 | + } |
|
1740 | + |
|
1741 | + if(!empty($sugar_config['rss_cache_time'])) { |
|
1742 | + $_SESSION['rss_cache_time'] = $sugar_config['rss_cache_time']; |
|
1743 | + } |
|
1730 | 1744 | if(!empty($sugar_config['languages'])) |
1731 | 1745 | { |
1732 | 1746 | // We need to encode the languages in a way that can be retrieved later. |
@@ -86,8 +86,9 @@ discard block |
||
86 | 86 | |
87 | 87 | $form2 = "<table class='tabForm' width='100%' cellpadding='0' cellspacing='0' width='100%' border='0'>"; |
88 | 88 | $form2 .= $error_html; |
89 | - if(!$isAlive) |
|
90 | - $form2 .= "<tr><td><span id='span_display_html'>".$header_text."</span></td></tr>"; |
|
89 | + if(!$isAlive) { |
|
90 | + $form2 .= "<tr><td><span id='span_display_html'>".$header_text."</span></td></tr>"; |
|
91 | + } |
|
91 | 92 | $form2 .= "</table>"; |
92 | 93 | |
93 | 94 | $tree = null; |
@@ -101,14 +102,14 @@ discard block |
||
101 | 102 | $form2 .= "<tr><td></td><td align='left'>"; |
102 | 103 | if($isAlive){ |
103 | 104 | $form2 .= "<input type='button' id='modifCredentialsBtn' class='button' onClick='PackageManager.showLoginDialog(true);' value='".$mod_strings['LBL_MODIFY_CREDENTIALS']."'>"; |
104 | - }else{ |
|
105 | + } else{ |
|
105 | 106 | $form2 .= "<input type='button' id='modifCredentialsBtn' class='button' onClick='PackageManager.showLoginDialog(true);' value='".$mod_strings['LBL_MODIFY_CREDENTIALS']."'style='display:none;'>"; |
106 | 107 | } |
107 | 108 | $form2 .= "</td><td align='left'><div id='workingStatusDiv' style='display:none;'>".SugarThemeRegistry::current()->getImage("sqsWait","border='0' align='bottom'",null,null,'.gif',"Loading")."</div></td><td align='right'>"; |
108 | 109 | |
109 | 110 | if($isAlive){ |
110 | 111 | $form2 .= "<slot><a class=\"listViewTdToolsS1\" id='href_animate' onClick=\"PackageManager.toggleDiv('span_animate_server_div', 'catview');\"><span id='span_animate_server_div'><img src='".SugarThemeRegistry::current()->getImageURL('basic_search.gif')."' width='8' height='8' border='0'> Collapse</span></a></slot>"; |
111 | - }else{ |
|
112 | + } else{ |
|
112 | 113 | $form2 .= "<slot><a class=\"listViewTdToolsS1\" id='href_animate' onClick=\"PackageManager.toggleDiv('span_animate_server_div', 'catview');\"><span id='span_animate_server_div' style='display:none;'><img src='".SugarThemeRegistry::current()->getImageURL('basic_search.gif')."' width='8' height='8' border='0'> Collapse</span></a></slot>"; |
113 | 114 | } |
114 | 115 | $form2 .= "</td></tr></table>"; |
@@ -123,8 +124,7 @@ discard block |
||
123 | 124 | if (UploadStream::getSuhosinStatus() == false) |
124 | 125 | { |
125 | 126 | $ss->assign('ERR_SUHOSIN', true); |
126 | - } |
|
127 | - else |
|
127 | + } else |
|
128 | 128 | { |
129 | 129 | $ss->assign('scripts', PackageManagerDisplay::getDisplayScript($install)); |
130 | 130 | } |
@@ -168,8 +168,9 @@ discard block |
||
168 | 168 | $display = 'block'; |
169 | 169 | //} |
170 | 170 | $form2 = "<table class='tabForm' width='100%' cellpadding='0' cellspacing='0' width='100%' border='0'>"; |
171 | - if(!$isAlive) |
|
172 | - $form2 .= "<tr><td><span id='span_display_html'>".$header_text."</span></td></tr>"; |
|
171 | + if(!$isAlive) { |
|
172 | + $form2 .= "<tr><td><span id='span_display_html'>".$header_text."</span></td></tr>"; |
|
173 | + } |
|
173 | 174 | $form2 .= "</table>"; |
174 | 175 | $form2 .= "<table width='100%'><tr><td align='left'>"; |
175 | 176 | if($show_login){ |
@@ -182,8 +183,9 @@ discard block |
||
182 | 183 | $form2 .= "<div id='selectView' style='display:".$selectViewStyle."'>"; |
183 | 184 | $form2 .= " <div id='patch_downloads' class='ygrid-mso' style='height:205px; display: ".$display.";'></div>"; |
184 | 185 | $form2 .= "</div>"; |
185 | - if(!$show_login) |
|
186 | - $loginViewStyle = 'none'; |
|
186 | + if(!$show_login) { |
|
187 | + $loginViewStyle = 'none'; |
|
188 | + } |
|
187 | 189 | //$form2 .= "<div id='loginView' style='display:".$loginViewStyle."'>"; |
188 | 190 | //$form2 .= PackageManagerDisplay::buildLoginPanel($mod_strings, $isAlive); |
189 | 191 | //$form2 .= "</div>"; |
@@ -199,8 +201,9 @@ discard block |
||
199 | 201 | $type_str = '"'; |
200 | 202 | foreach($types as $type){ |
201 | 203 | $type_str .= "'".$type."'"; |
202 | - if($index < $count) |
|
203 | - $type_str .= ","; |
|
204 | + if($index < $count) { |
|
205 | + $type_str .= ","; |
|
206 | + } |
|
204 | 207 | $index++; |
205 | 208 | } |
206 | 209 | $type_str .= '"'; |
@@ -286,8 +289,9 @@ discard block |
||
286 | 289 | $output .= "</td></tr></table>"; |
287 | 290 | // } |
288 | 291 | $output .= "</div>"; |
289 | - if(!$show_login) |
|
290 | - $loginViewStyle = 'none'; |
|
292 | + if(!$show_login) { |
|
293 | + $loginViewStyle = 'none'; |
|
294 | + } |
|
291 | 295 | // $output .= "<div id='loginView' style='display:".$loginViewStyle."'>"; |
292 | 296 | // jchi ,#24296 :commented code because we are currently not using depot, in the future this may change so you can put this code back in. |
293 | 297 | //$output .= PackageManagerDisplay::buildLoginPanel($mod_strings, $display); |
@@ -307,8 +311,9 @@ discard block |
||
307 | 311 | static function buildTreeView($div_id, $isAlive = true){ |
308 | 312 | $tree = new Tree($div_id); |
309 | 313 | $nodes = array(); |
310 | - if($isAlive) |
|
311 | - $nodes = PackageManager::getCategories(''); |
|
314 | + if($isAlive) { |
|
315 | + $nodes = PackageManager::getCategories(''); |
|
316 | + } |
|
312 | 317 | |
313 | 318 | foreach($nodes as $arr_node){ |
314 | 319 | $node = new Node($arr_node['id'], $arr_node['label']); |
@@ -399,7 +404,7 @@ discard block |
||
399 | 404 | $patches = PackageManagerDisplay::createJavascriptPackageArray($releases); |
400 | 405 | $ss->assign('PATCHES', $patches); |
401 | 406 | $ss->assign('GRID_TYPE', implode(',', $types)); |
402 | - }else{ |
|
407 | + } else{ |
|
403 | 408 | $pm = new PackageManager(); |
404 | 409 | $releases = $pm->getPackagesInStaging(); |
405 | 410 | $patches = PackageManagerDisplay::createJavascriptModuleArray($releases); |
@@ -410,8 +415,9 @@ discard block |
||
410 | 415 | $ss->assign('UPGARDE_WIZARD_URL', 'index.php?module=UpgradeWizard&action=index'); |
411 | 416 | $ss->assign('module_load', 'true'); |
412 | 417 | } |
413 | - if(!empty($GLOBALS['ML_STATUS_MESSAGE'])) |
|
414 | - $ss->assign('ML_STATUS_MESSAGE',$GLOBALS['ML_STATUS_MESSAGE']); |
|
418 | + if(!empty($GLOBALS['ML_STATUS_MESSAGE'])) { |
|
419 | + $ss->assign('ML_STATUS_MESSAGE',$GLOBALS['ML_STATUS_MESSAGE']); |
|
420 | + } |
|
415 | 421 | |
416 | 422 | //Bug 24064. Checking and Defining labels since these might not be cached during Upgrade |
417 | 423 | if(!isset($mod_strings['LBL_ML_INSTALL']) || empty($mod_strings['LBL_ML_INSTALL'])){ |
@@ -467,8 +473,9 @@ discard block |
||
467 | 473 | $output .= "["; |
468 | 474 | $output .= "'".$release['description']."', '".$release['version']."', '".$release['build_number']."', '".$release['id']."'"; |
469 | 475 | $output .= "]"; |
470 | - if($index < $count) |
|
471 | - $output .= ","; |
|
476 | + if($index < $count) { |
|
477 | + $output .= ","; |
|
478 | + } |
|
472 | 479 | $index++; |
473 | 480 | } |
474 | 481 | } |
@@ -484,13 +491,15 @@ discard block |
||
484 | 491 | foreach($modules as $module){ |
485 | 492 | $output .= "["; |
486 | 493 | $output .= "'".$module['name']."', '".$module['file_install']."', '".$module['file']."', '"; |
487 | - if(!empty($module['enabled'])) |
|
488 | - $output .= $module['enabled'].'_'.$module['file']."', '"; |
|
494 | + if(!empty($module['enabled'])) { |
|
495 | + $output .= $module['enabled'].'_'.$module['file']."', '"; |
|
496 | + } |
|
489 | 497 | |
490 | 498 | $description = js_escape($module['description']); |
491 | 499 | $output .= $module['type']."', '".$module['version']."', '".$module['published_date']."', '".$module['uninstallable']."', '".$description."'".(isset($module['upload_file'])?" , '".$module['upload_file']."']":"]"); |
492 | - if($index < $count) |
|
493 | - $output .= ","; |
|
500 | + if($index < $count) { |
|
501 | + $output .= ","; |
|
502 | + } |
|
494 | 503 | $index++; |
495 | 504 | } |
496 | 505 | |
@@ -529,16 +538,15 @@ discard block |
||
529 | 538 | if(!function_exists('curl_init') && $show_login){ |
530 | 539 | $header_text = "<font color='red'><b>".$mod_strings['ERR_ENABLE_CURL']."</b></font>"; |
531 | 540 | $show_login = false; |
532 | - }else{ |
|
541 | + } else{ |
|
533 | 542 | $credentials = PackageManager::getCredentials(); |
534 | 543 | if(empty($credentials['username']) || empty($credentials['password'])){ |
535 | 544 | //$header_text = "<font color='red'><b>".$mod_strings['ERR_CREDENTIALS_MISSING']."</b></font>"; |
536 | - } |
|
537 | - else{ |
|
545 | + } else{ |
|
538 | 546 | $result = PackageManagerComm::login(); |
539 | 547 | if((is_array($result) && !empty($result['faultcode'])) || $result == false){ |
540 | 548 | $header_text = "<font color='red'><b>".$result['faultstring']."</b></font>"; |
541 | - }else{ |
|
549 | + } else{ |
|
542 | 550 | $header_text = PackageManager::getPromotion(); |
543 | 551 | $isAlive = true; |
544 | 552 | } |
@@ -576,8 +584,7 @@ discard block |
||
576 | 584 | && is_file($filename) && !empty($manifest['is_uninstallable'])) |
577 | 585 | { |
578 | 586 | $link = urlencode( $filename ); |
579 | - } |
|
580 | - else |
|
587 | + } else |
|
581 | 588 | { |
582 | 589 | $link = 'false'; |
583 | 590 | } |
@@ -607,8 +614,7 @@ discard block |
||
607 | 614 | $manifest_copy_files_from_dir = isset($manifest['copy_files']['from_dir']) ? clean_path($manifest['copy_files']['from_dir']) : ""; |
608 | 615 | $manifest_icon = clean_path($manifest['icon']); |
609 | 616 | $icon = "<img src=\"" . $manifest_copy_files_to_dir . ($manifest_copy_files_from_dir != "" ? substr($manifest_icon, strlen($manifest_copy_files_from_dir)+1) : $manifest_icon ) . "\">"; |
610 | - } |
|
611 | - else |
|
617 | + } else |
|
612 | 618 | { |
613 | 619 | $icon = getImageForType( $manifest['type'] ); |
614 | 620 | } |
@@ -107,25 +107,29 @@ discard block |
||
107 | 107 | require('sugar_version.php'); |
108 | 108 | require('config.php'); |
109 | 109 | $credentials = PackageManager::getCredentials(); |
110 | - if(empty($license))loadLicense(); |
|
110 | + if(empty($license)) { |
|
111 | + loadLicense(); |
|
112 | + } |
|
111 | 113 | $info = sugarEncode('2813', serialize(getSystemInfo(true))); |
112 | 114 | $pm = new PackageManager(); |
113 | 115 | $installed = $pm->buildInstalledReleases(); |
114 | 116 | $installed = base64_encode(serialize($installed)); |
115 | 117 | $params = array('installed_modules' => $installed, 'terms_checked' => $terms_checked, 'system_name' => $credentials['system_name']); |
116 | 118 | $terms_version = (!empty($_SESSION['SugarDepot_TermsVersion']) ? $_SESSION['SugarDepot_TermsVersion'] : ''); |
117 | - if(!empty($terms_version)) |
|
118 | - $params['terms_version'] = $terms_version; |
|
119 | + if(!empty($terms_version)) { |
|
120 | + $params['terms_version'] = $terms_version; |
|
121 | + } |
|
119 | 122 | |
120 | 123 | $result = $GLOBALS['SugarDepot']->call('depotLogin', array(array('user_name' => $credentials['username'], 'password' => $credentials['password']),'info'=>$info, 'params' => $params)); |
121 | 124 | PackageManagerComm::errorCheck(); |
122 | - if(!is_array($result)) |
|
123 | - $_SESSION['SugarDepotSessionID'] = $result; |
|
125 | + if(!is_array($result)) { |
|
126 | + $_SESSION['SugarDepotSessionID'] = $result; |
|
127 | + } |
|
124 | 128 | $GLOBALS['log']->debug("End SugarDepot Login"); |
125 | 129 | return $result; |
130 | + } else { |
|
131 | + return $_SESSION['SugarDepotSessionID']; |
|
126 | 132 | } |
127 | - else |
|
128 | - return $_SESSION['SugarDepotSessionID']; |
|
129 | 133 | } |
130 | 134 | |
131 | 135 | /** |
@@ -301,7 +305,7 @@ discard block |
||
301 | 305 | $status = $GLOBALS['SugarDepot']->call('sugarPing', array()); |
302 | 306 | if(empty($status) || $GLOBALS['SugarDepot']->getError() || $status != ACTIVE_STATUS){ |
303 | 307 | return false; |
304 | - }else{ |
|
308 | + } else{ |
|
305 | 309 | return true; |
306 | 310 | } |
307 | 311 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | - if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | + if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | + } |
|
3 | 5 | |
4 | 6 | $suitecrm_version = '7.5.1'; |
5 | 7 | $suitecrm_timestamp = '2015-01-26 17:00'; |
@@ -1,6 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | - if(!defined('sugarEntry'))define('sugarEntry', true); |
|
3 | -/********************************************************************************* |
|
2 | + if(!defined('sugarEntry')) { |
|
3 | + define('sugarEntry', true); |
|
4 | + } |
|
5 | + /********************************************************************************* |
|
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
6 | 8 | |
@@ -193,8 +195,7 @@ discard block |
||
193 | 195 | $detectedType = exif_imagetype($_FILES['company_logo']['tmp_name']); |
194 | 196 | if(!in_array($detectedType, $allowedTypes)) { |
195 | 197 | $errors[] = $mod_strings['ERR_UPLOAD_FILETYPE']; |
196 | - } |
|
197 | - else { |
|
198 | + } else { |
|
198 | 199 | // uploaded image stored in the /custom path instead of put into the original theme directory.. |
199 | 200 | |
200 | 201 | mkdir_recursive('custom/' . SugarThemeRegistry::current()->getDefaultImagePath(), true); |
@@ -202,8 +203,7 @@ discard block |
||
202 | 203 | $destFile = 'custom/' . $tmpvar[0]; |
203 | 204 | if (!move_uploaded_file($_FILES['company_logo']['tmp_name'], $destFile)) { |
204 | 205 | $errors[] = $mod_strings['ERR_LANG_UPLOAD_1']; |
205 | - } |
|
206 | - else { |
|
206 | + } else { |
|
207 | 207 | $filepath = $destFile; |
208 | 208 | } |
209 | 209 | } |
@@ -253,7 +253,9 @@ discard block |
||
253 | 253 | |
254 | 254 | if(isset($_REQUEST['storeConfig']) && ($_REQUEST['storeConfig'])){ |
255 | 255 | // store configuration by form to session |
256 | - if(!isset($_SESSION)) session_start(); |
|
256 | + if(!isset($_SESSION)) { |
|
257 | + session_start(); |
|
258 | + } |
|
257 | 259 | $_SESSION = array_merge($_SESSION, $_POST); |
258 | 260 | |
259 | 261 | // TODO--low: don't forget the custom type install settings! validate here.. |
@@ -330,7 +332,7 @@ discard block |
||
330 | 332 | //define web root, which will be used as default for site_url |
331 | 333 | if($_SERVER['SERVER_PORT']=='80'){ |
332 | 334 | $web_root = $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; |
333 | -}else{ |
|
335 | +} else{ |
|
334 | 336 | $web_root = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['PHP_SELF']; |
335 | 337 | } |
336 | 338 | $web_root = str_replace("/install.php", "", $web_root); |
@@ -475,8 +477,7 @@ discard block |
||
475 | 477 | |
476 | 478 | <p>{$mod_strings['LBL_DISABLED_HELP_1']} <a href="{$mod_strings['LBL_DISABLED_HELP_LNK']}" target="_blank">{$mod_strings['LBL_DISABLED_HELP_2']}</a>.</p> |
477 | 479 | EOQ; |
478 | -} |
|
479 | -else{ |
|
480 | +} else{ |
|
480 | 481 | $validation_errors = array(); |
481 | 482 | // process the data posted |
482 | 483 | if($next_clicked) { |
@@ -562,27 +563,27 @@ discard block |
||
562 | 563 | $_SESSION['setup_site_custom_session_path'] = get_boolean_from_request('setup_site_custom_session_path'); |
563 | 564 | if($_SESSION['setup_site_custom_session_path']){ |
564 | 565 | $_SESSION['setup_site_session_path'] = $_REQUEST['setup_site_session_path']; |
565 | - }else{ |
|
566 | + } else{ |
|
566 | 567 | $_SESSION['setup_site_session_path'] = ''; |
567 | 568 | } |
568 | 569 | |
569 | 570 | $_SESSION['setup_site_custom_log_dir'] = get_boolean_from_request('setup_site_custom_log_dir'); |
570 | 571 | if($_SESSION['setup_site_custom_log_dir']){ |
571 | 572 | $_SESSION['setup_site_log_dir'] = $_REQUEST['setup_site_log_dir']; |
572 | - }else{ |
|
573 | + } else{ |
|
573 | 574 | $_SESSION['setup_site_log_dir'] = '.'; |
574 | 575 | } |
575 | 576 | |
576 | 577 | $_SESSION['setup_site_specify_guid'] = get_boolean_from_request('setup_site_specify_guid'); |
577 | 578 | if($_SESSION['setup_site_specify_guid']){ |
578 | 579 | $_SESSION['setup_site_guid'] = $_REQUEST['setup_site_guid']; |
579 | - }else{ |
|
580 | + } else{ |
|
580 | 581 | $_SESSION['setup_site_guid'] = ''; |
581 | 582 | } |
582 | 583 | $_SESSION['siteConfig_submitted'] = true; |
583 | 584 | if(isset($_REQUEST['setup_site_sugarbeet_anonymous_stats'])){ |
584 | 585 | $_SESSION['setup_site_sugarbeet_anonymous_stats'] = get_boolean_from_request('setup_site_sugarbeet_anonymous_stats'); |
585 | - }else{ |
|
586 | + } else{ |
|
586 | 587 | $_SESSION['setup_site_sugarbeet_anonymous_stats'] = 0; |
587 | 588 | } |
588 | 589 | |
@@ -597,13 +598,12 @@ discard block |
||
597 | 598 | |
598 | 599 | if($next_step == 9999) { |
599 | 600 | $the_file = 'SilentInstall'; |
600 | -}else if($next_step == 9191) { |
|
601 | +} else if($next_step == 9191) { |
|
601 | 602 | $_SESSION['oc_server_url'] = $_REQUEST['oc_server_url']; |
602 | 603 | $_SESSION['oc_username'] = $_REQUEST['oc_username']; |
603 | 604 | $_SESSION['oc_password'] = $_REQUEST['oc_password']; |
604 | 605 | $the_file = 'oc_convert.php'; |
605 | -} |
|
606 | -else{ |
|
606 | +} else{ |
|
607 | 607 | $the_file = $workflow[$next_step]; |
608 | 608 | |
609 | 609 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |