@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 4 | 4 | |
| 5 | 5 | class Jjwg_MarkersViewMarker_Detail_Map extends SugarView { |
| 6 | 6 | |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 13 | 13 | */ |
| 14 | - function Jjwg_MarkersViewMarker_Detail_Map(){ |
|
| 14 | + function Jjwg_MarkersViewMarker_Detail_Map() { |
|
| 15 | 15 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 16 | - if(isset($GLOBALS['log'])) { |
|
| 16 | + if (isset($GLOBALS['log'])) { |
|
| 17 | 17 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 18 | 18 | } |
| 19 | 19 | else { |
@@ -43,7 +43,9 @@ discard block |
||
| 43 | 43 | * Date: 06/03/15 |
| 44 | 44 | * Comments |
| 45 | 45 | */ |
| 46 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 46 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 47 | + die('Not A Valid Entry Point'); |
|
| 48 | +} |
|
| 47 | 49 | |
| 48 | 50 | class CasesController extends SugarController { |
| 49 | 51 | |
@@ -90,8 +92,7 @@ discard block |
||
| 90 | 92 | $count++; |
| 91 | 93 | } |
| 92 | 94 | echo '</table>'; |
| 93 | - } |
|
| 94 | - else { |
|
| 95 | + } else { |
|
| 95 | 96 | echo $mod_strings['LBL_NO_SUGGESTIONS']; |
| 96 | 97 | } |
| 97 | 98 | die(); |
@@ -37,9 +37,9 @@ |
||
| 37 | 37 | /** |
| 38 | 38 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 39 | 39 | */ |
| 40 | - function jjwg_Markers_sugar(){ |
|
| 40 | + function jjwg_Markers_sugar() { |
|
| 41 | 41 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 42 | - if(isset($GLOBALS['log'])) { |
|
| 42 | + if (isset($GLOBALS['log'])) { |
|
| 43 | 43 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 44 | 44 | } |
| 45 | 45 | else { |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 24 | 24 | if(isset($GLOBALS['log'])) { |
| 25 | 25 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 26 | - } |
|
| 27 | - else { |
|
| 26 | + } else { |
|
| 28 | 27 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 29 | 28 | } |
| 30 | 29 | self::__construct($seed, $module, $subPanel, $options); |
@@ -15,9 +15,9 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 17 | 17 | */ |
| 18 | - function ProjectJjwg_MapsLogicHook(){ |
|
| 18 | + function ProjectJjwg_MapsLogicHook() { |
|
| 19 | 19 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 20 | - if(isset($GLOBALS['log'])) { |
|
| 20 | + if (isset($GLOBALS['log'])) { |
|
| 21 | 21 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 22 | 22 | } |
| 23 | 23 | else { |
@@ -1,7 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (!defined('sugarEntry') || !sugarEntry) |
|
| 3 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
| 4 | 4 | die('Not A Valid Entry Point'); |
| 5 | +} |
|
| 5 | 6 | |
| 6 | 7 | class OpportunitiesJjwg_MapsLogicHook { |
| 7 | 8 | |
@@ -17,8 +18,7 @@ discard block |
||
| 17 | 18 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 18 | 19 | if(isset($GLOBALS['log'])) { |
| 19 | 20 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 20 | - } |
|
| 21 | - else { |
|
| 21 | + } else { |
|
| 22 | 22 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 23 | 23 | } |
| 24 | 24 | self::__construct(); |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 16 | 16 | */ |
| 17 | - function ProjectListViewSmarty(){ |
|
| 17 | + function ProjectListViewSmarty() { |
|
| 18 | 18 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 19 | - if(isset($GLOBALS['log'])) { |
|
| 19 | + if (isset($GLOBALS['log'])) { |
|
| 20 | 20 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 21 | 21 | } |
| 22 | 22 | else { |
@@ -33,24 +33,24 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | if (preg_match('/^6\.[2-4]/', $sugar_config['sugar_version'])) { // Older v6.2-6.4 |
| 35 | 35 | |
| 36 | - $script = "<a href='#' style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' " . |
|
| 37 | - "onmouseout='unhiliteItem(this);' onclick=\"return sListView.send_form(true, '{$_REQUEST['module']}', " . |
|
| 38 | - "'index.php?entryPoint=export','{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_EXPORT']}</a>" . |
|
| 39 | - "<a href='#' style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' " . |
|
| 40 | - "onmouseout='unhiliteItem(this);' onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . |
|
| 41 | - "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . |
|
| 36 | + $script = "<a href='#' style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' ". |
|
| 37 | + "onmouseout='unhiliteItem(this);' onclick=\"return sListView.send_form(true, '{$_REQUEST['module']}', ". |
|
| 38 | + "'index.php?entryPoint=export','{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_EXPORT']}</a>". |
|
| 39 | + "<a href='#' style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' ". |
|
| 40 | + "onmouseout='unhiliteItem(this);' onclick=\"return sListView.send_form(true, 'jjwg_Maps', ". |
|
| 41 | + "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', ". |
|
| 42 | 42 | "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>"; |
| 43 | 43 | |
| 44 | 44 | } else { // Newer v6.5+ |
| 45 | 45 | |
| 46 | 46 | $script = "<a href='javascript:void(0)' id='export_listview_top' ". |
| 47 | - "onclick=\"return sListView.send_form(true, '{$_REQUEST['module']}', " . |
|
| 48 | - "'index.php?entryPoint=export', " . |
|
| 49 | - "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_EXPORT']}</a>" . |
|
| 50 | - "</li><li>". // List item hack |
|
| 51 | - "<a href='javascript:void(0)' id='map_listview_top' " . |
|
| 52 | - " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . |
|
| 53 | - "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . |
|
| 47 | + "onclick=\"return sListView.send_form(true, '{$_REQUEST['module']}', ". |
|
| 48 | + "'index.php?entryPoint=export', ". |
|
| 49 | + "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_EXPORT']}</a>". |
|
| 50 | + "</li><li>".// List item hack |
|
| 51 | + "<a href='javascript:void(0)' id='map_listview_top' ". |
|
| 52 | + " onclick=\"return sListView.send_form(true, 'jjwg_Maps', ". |
|
| 53 | + "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', ". |
|
| 54 | 54 | "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>"; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 24 | 24 | if(isset($GLOBALS['log'])) { |
| 25 | 25 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 26 | - } |
|
| 27 | - else { |
|
| 26 | + } else { |
|
| 28 | 27 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 29 | 28 | } |
| 30 | 29 | self::__construct($seed, $module, $subPanel, $options); |
@@ -119,9 +119,9 @@ discard block |
||
| 119 | 119 | /** |
| 120 | 120 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 121 | 121 | */ |
| 122 | - public function EmailTemplate(){ |
|
| 122 | + public function EmailTemplate() { |
|
| 123 | 123 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 124 | - if(isset($GLOBALS['log'])) { |
|
| 124 | + if (isset($GLOBALS['log'])) { |
|
| 125 | 125 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 126 | 126 | } |
| 127 | 127 | else { |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | } |
| 367 | 367 | if (!empty($tracker_url) && !empty($template_text) && !empty($matches[0][$i][0]) && !empty($tracked_urls[$matches[0][$i][0]])) { |
| 368 | 368 | $template_text = substr_replace($template_text, $tracker_url, $matches[0][$i][1], strlen($matches[0][$i][0])); |
| 369 | - $template_text = str_replace($sugar_config['site_url'] . '/' . $sugar_config['site_url'], $sugar_config['site_url'], $template_text); |
|
| 369 | + $template_text = str_replace($sugar_config['site_url'].'/'.$sugar_config['site_url'], $sugar_config['site_url'], $template_text); |
|
| 370 | 370 | } |
| 371 | 371 | } |
| 372 | 372 | } |
@@ -418,10 +418,10 @@ discard block |
||
| 418 | 418 | if ($beanList[$focus_name] == 'User') { |
| 419 | 419 | $pattern_prefix = '$contact_user_'; |
| 420 | 420 | } else { |
| 421 | - $pattern_prefix = '$' . strtolower($beanList[$focus_name]) . '_'; |
|
| 421 | + $pattern_prefix = '$'.strtolower($beanList[$focus_name]).'_'; |
|
| 422 | 422 | } |
| 423 | 423 | $pattern_prefix_length = strlen($pattern_prefix); |
| 424 | - $pattern = '/\\' . $pattern_prefix . '[A-Za-z_0-9]*/'; |
|
| 424 | + $pattern = '/\\'.$pattern_prefix.'[A-Za-z_0-9]*/'; |
|
| 425 | 425 | |
| 426 | 426 | $return_array = array(); |
| 427 | 427 | foreach ($template_text_array as $key => $template_text) { |
@@ -519,16 +519,16 @@ discard block |
||
| 519 | 519 | $translated = translate($field_def['options'], 'Users', $user->$fieldName); |
| 520 | 520 | |
| 521 | 521 | if (isset($translated) && !is_array($translated)) { |
| 522 | - $repl_arr["contact_user_" . $fieldName] = $translated; |
|
| 522 | + $repl_arr["contact_user_".$fieldName] = $translated; |
|
| 523 | 523 | } else { // unset enum field, make sure we have a match string to replace with "" |
| 524 | - $repl_arr["contact_user_" . $fieldName] = ''; |
|
| 524 | + $repl_arr["contact_user_".$fieldName] = ''; |
|
| 525 | 525 | } |
| 526 | 526 | } else { |
| 527 | 527 | if (isset($user->$fieldName)) { |
| 528 | 528 | // bug 47647 - allow for fields to translate before adding to template |
| 529 | - $repl_arr["contact_user_" . $fieldName] = self::_convertToType($field_def['type'], $user->$fieldName); |
|
| 529 | + $repl_arr["contact_user_".$fieldName] = self::_convertToType($field_def['type'], $user->$fieldName); |
|
| 530 | 530 | } else { |
| 531 | - $repl_arr["contact_user_" . $fieldName] = ""; |
|
| 531 | + $repl_arr["contact_user_".$fieldName] = ""; |
|
| 532 | 532 | } |
| 533 | 533 | } |
| 534 | 534 | } |
@@ -554,8 +554,8 @@ discard block |
||
| 554 | 554 | continue; |
| 555 | 555 | } |
| 556 | 556 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 557 | - 'contact_' . $field_def['name'] => '', |
|
| 558 | - 'contact_account_' . $field_def['name'] => '', |
|
| 557 | + 'contact_'.$field_def['name'] => '', |
|
| 558 | + 'contact_account_'.$field_def['name'] => '', |
|
| 559 | 559 | )); |
| 560 | 560 | } |
| 561 | 561 | foreach ($prospect->field_defs as $field_def) { |
@@ -563,8 +563,8 @@ discard block |
||
| 563 | 563 | continue; |
| 564 | 564 | } |
| 565 | 565 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 566 | - 'contact_' . $field_def['name'] => '', |
|
| 567 | - 'contact_account_' . $field_def['name'] => '', |
|
| 566 | + 'contact_'.$field_def['name'] => '', |
|
| 567 | + 'contact_account_'.$field_def['name'] => '', |
|
| 568 | 568 | )); |
| 569 | 569 | } |
| 570 | 570 | foreach ($contact->field_defs as $field_def) { |
@@ -572,8 +572,8 @@ discard block |
||
| 572 | 572 | continue; |
| 573 | 573 | } |
| 574 | 574 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 575 | - 'contact_' . $field_def['name'] => '', |
|
| 576 | - 'contact_account_' . $field_def['name'] => '', |
|
| 575 | + 'contact_'.$field_def['name'] => '', |
|
| 576 | + 'contact_account_'.$field_def['name'] => '', |
|
| 577 | 577 | )); |
| 578 | 578 | } |
| 579 | 579 | foreach ($acct->field_defs as $field_def) { |
@@ -581,8 +581,8 @@ discard block |
||
| 581 | 581 | continue; |
| 582 | 582 | } |
| 583 | 583 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 584 | - 'account_' . $field_def['name'] => '', |
|
| 585 | - 'account_contact_' . $field_def['name'] => '', |
|
| 584 | + 'account_'.$field_def['name'] => '', |
|
| 585 | + 'account_contact_'.$field_def['name'] => '', |
|
| 586 | 586 | )); |
| 587 | 587 | } |
| 588 | 588 | // cn: end bug 9277 fix |
@@ -607,21 +607,21 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | if (isset($translated) && !is_array($translated)) { |
| 609 | 609 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 610 | - 'account_' . $fieldName => $translated, |
|
| 611 | - 'contact_account_' . $fieldName => $translated, |
|
| 610 | + 'account_'.$fieldName => $translated, |
|
| 611 | + 'contact_account_'.$fieldName => $translated, |
|
| 612 | 612 | )); |
| 613 | 613 | } else { // unset enum field, make sure we have a match string to replace with "" |
| 614 | 614 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 615 | - 'account_' . $fieldName => '', |
|
| 616 | - 'contact_account_' . $fieldName => '', |
|
| 615 | + 'account_'.$fieldName => '', |
|
| 616 | + 'contact_account_'.$fieldName => '', |
|
| 617 | 617 | )); |
| 618 | 618 | } |
| 619 | 619 | } else { |
| 620 | 620 | // bug 47647 - allow for fields to translate before adding to template |
| 621 | 621 | $translated = self::_convertToType($field_def['type'], $acct->$fieldName); |
| 622 | 622 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 623 | - 'account_' . $fieldName => $translated, |
|
| 624 | - 'contact_account_' . $fieldName => $translated, |
|
| 623 | + 'account_'.$fieldName => $translated, |
|
| 624 | + 'contact_account_'.$fieldName => $translated, |
|
| 625 | 625 | )); |
| 626 | 626 | } |
| 627 | 627 | } |
@@ -652,13 +652,13 @@ discard block |
||
| 652 | 652 | |
| 653 | 653 | if (isset($translated) && !is_array($translated)) { |
| 654 | 654 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 655 | - 'contact_' . $fieldName => $translated, |
|
| 656 | - 'contact_account_' . $fieldName => $translated, |
|
| 655 | + 'contact_'.$fieldName => $translated, |
|
| 656 | + 'contact_account_'.$fieldName => $translated, |
|
| 657 | 657 | )); |
| 658 | 658 | } else { // unset enum field, make sure we have a match string to replace with "" |
| 659 | 659 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 660 | - 'contact_' . $fieldName => '', |
|
| 661 | - 'contact_account_' . $fieldName => '', |
|
| 660 | + 'contact_'.$fieldName => '', |
|
| 661 | + 'contact_account_'.$fieldName => '', |
|
| 662 | 662 | )); |
| 663 | 663 | } |
| 664 | 664 | } else { |
@@ -666,8 +666,8 @@ discard block |
||
| 666 | 666 | // bug 47647 - allow for fields to translate before adding to template |
| 667 | 667 | $translated = self::_convertToType($field_def['type'], $contact->$fieldName); |
| 668 | 668 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 669 | - 'contact_' . $fieldName => $translated, |
|
| 670 | - 'contact_account_' . $fieldName => $translated, |
|
| 669 | + 'contact_'.$fieldName => $translated, |
|
| 670 | + 'contact_account_'.$fieldName => $translated, |
|
| 671 | 671 | )); |
| 672 | 672 | } // if |
| 673 | 673 | } |
@@ -688,27 +688,27 @@ discard block |
||
| 688 | 688 | |
| 689 | 689 | if (isset($translated) && !is_array($translated)) { |
| 690 | 690 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 691 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => $translated, |
|
| 691 | + strtolower($beanList[$bean_name])."_".$fieldName => $translated, |
|
| 692 | 692 | )); |
| 693 | 693 | } else { // unset enum field, make sure we have a match string to replace with "" |
| 694 | 694 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 695 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => '', |
|
| 695 | + strtolower($beanList[$bean_name])."_".$fieldName => '', |
|
| 696 | 696 | )); |
| 697 | 697 | } |
| 698 | 698 | } else { |
| 699 | 699 | // bug 47647 - translate currencies to appropriate values |
| 700 | 700 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 701 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => self::_convertToType($field_def['type'], $focus->$fieldName), |
|
| 701 | + strtolower($beanList[$bean_name])."_".$fieldName => self::_convertToType($field_def['type'], $focus->$fieldName), |
|
| 702 | 702 | )); |
| 703 | 703 | } |
| 704 | 704 | } else { |
| 705 | 705 | if ($fieldName == 'full_name') { |
| 706 | 706 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 707 | - strtolower($beanList[$bean_name]) . '_full_name' => $focus->get_summary_text(), |
|
| 707 | + strtolower($beanList[$bean_name]).'_full_name' => $focus->get_summary_text(), |
|
| 708 | 708 | )); |
| 709 | 709 | } else { |
| 710 | 710 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
| 711 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => '', |
|
| 711 | + strtolower($beanList[$bean_name])."_".$fieldName => '', |
|
| 712 | 712 | )); |
| 713 | 713 | } |
| 714 | 714 | } |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | { |
| 760 | 760 | foreach ($bean_arr as $bean_name => $bean_id) { |
| 761 | 761 | |
| 762 | - $focus = BeanFactory::getBean($bean_name,$bean_id); |
|
| 762 | + $focus = BeanFactory::getBean($bean_name, $bean_id); |
|
| 763 | 763 | |
| 764 | 764 | if ($bean_name == 'Leads' || $bean_name == 'Prospects') { |
| 765 | 765 | $bean_name = 'Contacts'; |
@@ -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. |
@@ -123,8 +125,7 @@ discard block |
||
| 123 | 125 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 124 | 126 | if(isset($GLOBALS['log'])) { |
| 125 | 127 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 126 | - } |
|
| 127 | - else { |
|
| 128 | + } else { |
|
| 128 | 129 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 129 | 130 | } |
| 130 | 131 | self::__construct(); |
@@ -192,8 +193,9 @@ discard block |
||
| 192 | 193 | break; |
| 193 | 194 | } |
| 194 | 195 | } |
| 195 | - if ($dup) |
|
| 196 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 196 | + if ($dup) { |
|
| 197 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 198 | + } |
|
| 197 | 199 | } |
| 198 | 200 | } |
| 199 | 201 | } |
@@ -266,8 +268,9 @@ discard block |
||
| 266 | 268 | break; |
| 267 | 269 | } |
| 268 | 270 | } |
| 269 | - if ($dup) |
|
| 270 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 271 | + if ($dup) { |
|
| 272 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 273 | + } |
|
| 271 | 274 | } |
| 272 | 275 | } |
| 273 | 276 | } |
@@ -328,8 +331,9 @@ discard block |
||
| 328 | 331 | function parse_tracker_urls($template_text_array, $url_template, $tracked_urls, $removeme_url_template) |
| 329 | 332 | { |
| 330 | 333 | global $beanFiles, $beanList, $app_list_strings, $sugar_config; |
| 331 | - if (!isset($this->parsed_urls)) |
|
| 332 | - $this->parsed_urls = array(); |
|
| 334 | + if (!isset($this->parsed_urls)) { |
|
| 335 | + $this->parsed_urls = array(); |
|
| 336 | + } |
|
| 333 | 337 | |
| 334 | 338 | $return_array = $template_text_array; |
| 335 | 339 | if (count($tracked_urls) > 0) { |
@@ -410,8 +414,9 @@ discard block |
||
| 410 | 414 | $user->retrieve($focus->assigned_user_id); |
| 411 | 415 | } |
| 412 | 416 | |
| 413 | - if (!isset($this->parsed_entities)) |
|
| 414 | - $this->parsed_entities = array(); |
|
| 417 | + if (!isset($this->parsed_entities)) { |
|
| 418 | + $this->parsed_entities = array(); |
|
| 419 | + } |
|
| 415 | 420 | |
| 416 | 421 | //parse the template and find all the dynamic strings that need replacement. |
| 417 | 422 | // Bug #48111 It's strange why prefix for User module is contact_user (see self::generateFieldDefsJS method) |
@@ -788,8 +793,9 @@ discard block |
||
| 788 | 793 | $template = new EmailTemplate(); |
| 789 | 794 | $optionKey = $template->field_defs['type']['options']; |
| 790 | 795 | $options = $GLOBALS['app_list_strings'][$optionKey]; |
| 791 | - if (!is_admin($GLOBALS['current_user']) && isset($options['workflow'])) |
|
| 792 | - unset($options['workflow']); |
|
| 796 | + if (!is_admin($GLOBALS['current_user']) && isset($options['workflow'])) { |
|
| 797 | + unset($options['workflow']); |
|
| 798 | + } |
|
| 793 | 799 | |
| 794 | 800 | return $options; |
| 795 | 801 | } |
@@ -43,16 +43,16 @@ |
||
| 43 | 43 | require_once('modules/FP_Event_Locations/FP_Event_Locations_sugar.php'); |
| 44 | 44 | class FP_Event_Locations extends FP_Event_Locations_sugar { |
| 45 | 45 | |
| 46 | - function __construct(){ |
|
| 46 | + function __construct() { |
|
| 47 | 47 | parent::__construct(); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 52 | 52 | */ |
| 53 | - function FP_Event_Locations(){ |
|
| 53 | + function FP_Event_Locations() { |
|
| 54 | 54 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 55 | - if(isset($GLOBALS['log'])) { |
|
| 55 | + if (isset($GLOBALS['log'])) { |
|
| 56 | 56 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 57 | 57 | } |
| 58 | 58 | else { |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 24 | 24 | if(isset($GLOBALS['log'])) { |
| 25 | 25 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 26 | - } |
|
| 27 | - else { |
|
| 26 | + } else { |
|
| 28 | 27 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 29 | 28 | } |
| 30 | 29 | self::__construct($seed, $module, $subPanel, $options); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | var $object_name = 'FP_Event_Locations'; |
| 51 | 51 | var $table_name = 'fp_event_locations'; |
| 52 | 52 | var $importable = false; |
| 53 | - var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
| 53 | + var $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
| 54 | 54 | var $id; |
| 55 | 55 | var $name; |
| 56 | 56 | var $date_entered; |
@@ -67,16 +67,16 @@ discard block |
||
| 67 | 67 | var $assigned_user_name; |
| 68 | 68 | var $assigned_user_link; |
| 69 | 69 | |
| 70 | - function __construct(){ |
|
| 70 | + function __construct() { |
|
| 71 | 71 | parent::__construct(); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 76 | 76 | */ |
| 77 | - function FP_Event_Locations_sugar(){ |
|
| 77 | + function FP_Event_Locations_sugar() { |
|
| 78 | 78 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 79 | - if(isset($GLOBALS['log'])) { |
|
| 79 | + if (isset($GLOBALS['log'])) { |
|
| 80 | 80 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 81 | 81 | } |
| 82 | 82 | else { |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
| 89 | - function bean_implements($interface){ |
|
| 90 | - switch($interface){ |
|
| 89 | + function bean_implements($interface) { |
|
| 90 | + switch ($interface) { |
|
| 91 | 91 | case 'ACL': return true; |
| 92 | 92 | } |
| 93 | 93 | return false; |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 24 | 24 | if(isset($GLOBALS['log'])) { |
| 25 | 25 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 26 | - } |
|
| 27 | - else { |
|
| 26 | + } else { |
|
| 28 | 27 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 29 | 28 | } |
| 30 | 29 | self::__construct($seed, $module, $subPanel, $options); |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 53 | 53 | */ |
| 54 | - function ViewProperty(){ |
|
| 54 | + function ViewProperty() { |
|
| 55 | 55 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 56 | - if(isset($GLOBALS['log'])) { |
|
| 56 | + if (isset($GLOBALS['log'])) { |
|
| 57 | 57 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 58 | 58 | } |
| 59 | 59 | else { |
@@ -71,45 +71,45 @@ discard block |
||
| 71 | 71 | global $mod_strings; |
| 72 | 72 | |
| 73 | 73 | return array( |
| 74 | - translate('LBL_MODULE_NAME','Administration'), |
|
| 74 | + translate('LBL_MODULE_NAME', 'Administration'), |
|
| 75 | 75 | ModuleBuilderController::getModuleTitle(), |
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | |
| 80 | - function init () // pseduo-constuctor - given a well-known name to allow subclasses to call this classes constructor |
|
| 80 | + function init() // pseduo-constuctor - given a well-known name to allow subclasses to call this classes constructor |
|
| 81 | 81 | { |
| 82 | - $this->editModule = (! empty($_REQUEST['view_module'])) ? $_REQUEST['view_module'] : null; |
|
| 83 | - $this->editPackage = (! empty($_REQUEST['view_package'])) ? $_REQUEST['view_package'] : null; |
|
| 84 | - $this->id = (! empty($_REQUEST['id'])) ? $_REQUEST['id'] : null; |
|
| 85 | - $this->subpanel = (! empty($_REQUEST['subpanel'])) ? $_REQUEST['subpanel'] : ""; |
|
| 82 | + $this->editModule = (!empty($_REQUEST['view_module'])) ? $_REQUEST['view_module'] : null; |
|
| 83 | + $this->editPackage = (!empty($_REQUEST['view_package'])) ? $_REQUEST['view_package'] : null; |
|
| 84 | + $this->id = (!empty($_REQUEST['id'])) ? $_REQUEST['id'] : null; |
|
| 85 | + $this->subpanel = (!empty($_REQUEST['subpanel'])) ? $_REQUEST['subpanel'] : ""; |
|
| 86 | 86 | $this->properties = array(); |
| 87 | - foreach($_REQUEST as $key=>$value) |
|
| 87 | + foreach ($_REQUEST as $key=>$value) |
|
| 88 | 88 | { |
| 89 | - if (substr($key,0,4) == 'name') |
|
| 89 | + if (substr($key, 0, 4) == 'name') |
|
| 90 | 90 | { |
| 91 | - $this->properties[substr($key,5)]['name'] = $value; |
|
| 91 | + $this->properties[substr($key, 5)]['name'] = $value; |
|
| 92 | 92 | } |
| 93 | - if (substr($key,0,2) == 'id') |
|
| 93 | + if (substr($key, 0, 2) == 'id') |
|
| 94 | 94 | { |
| 95 | - $this->properties[substr($key,3)]['id'] = $value; |
|
| 95 | + $this->properties[substr($key, 3)]['id'] = $value; |
|
| 96 | 96 | } |
| 97 | - if (substr($key,0,5) == 'value') |
|
| 97 | + if (substr($key, 0, 5) == 'value') |
|
| 98 | 98 | { |
| 99 | - $this->properties[substr($key,6)]['value'] = $value; |
|
| 99 | + $this->properties[substr($key, 6)]['value'] = $value; |
|
| 100 | 100 | // tyoung - now a nasty hack to disable editing of labels which contain Smarty functions - this is envisaged to be a temporary fix to prevent admins modifying these functions then being unable to restore the original complicated value if they regret it |
| 101 | - if (substr($key,6) == 'label') |
|
| 101 | + if (substr($key, 6) == 'label') |
|
| 102 | 102 | { |
| 103 | 103 | //#29796 , we disable the edit function for sub panel label |
| 104 | - if (preg_match('/\{.*\}/',$value) || !empty($this->subpanel)) |
|
| 104 | + if (preg_match('/\{.*\}/', $value) || !empty($this->subpanel)) |
|
| 105 | 105 | { |
| 106 | - $this->properties[substr($key,6)]['hidden'] = 1; |
|
| 106 | + $this->properties[substr($key, 6)]['hidden'] = 1; |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | - if (substr($key,0,5) == 'title') |
|
| 110 | + if (substr($key, 0, 5) == 'title') |
|
| 111 | 111 | { |
| 112 | - $this->properties[substr($key,6)]['title'] = $value; |
|
| 112 | + $this->properties[substr($key, 6)]['title'] = $value; |
|
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | } |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | $smarty->assign("view_package", $_REQUEST['view_package']); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
|
| 129 | - if(empty($selected_lang)){ |
|
| 128 | + $selected_lang = (!empty($_REQUEST['selected_lang']) ? $_REQUEST['selected_lang'] : $_SESSION['authenticated_user_language']); |
|
| 129 | + if (empty($selected_lang)) { |
|
| 130 | 130 | $selected_lang = $GLOBALS['sugar_config']['default_language']; |
| 131 | 131 | } |
| 132 | 132 | $smarty->assign('available_languages', get_languages()); |
@@ -134,10 +134,10 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | ksort($this->properties); |
| 136 | 136 | |
| 137 | - $smarty->assign("properties",$this->properties); |
|
| 137 | + $smarty->assign("properties", $this->properties); |
|
| 138 | 138 | // $smarty->assign("id",$this->id); |
| 139 | 139 | |
| 140 | - $smarty->assign("mod_strings",$mod_strings); |
|
| 140 | + $smarty->assign("mod_strings", $mod_strings); |
|
| 141 | 141 | $smarty->assign('APP', $GLOBALS['app_strings']); |
| 142 | 142 | $smarty->assign("view_module", $this->editModule); |
| 143 | 143 | $smarty->assign("subpanel", $this->subpanel); |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 56 | 56 | if(isset($GLOBALS['log'])) { |
| 57 | 57 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 58 | - } |
|
| 59 | - else { |
|
| 58 | + } else { |
|
| 60 | 59 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 61 | 60 | } |
| 62 | 61 | self::__construct(); |
@@ -141,8 +140,9 @@ discard block |
||
| 141 | 140 | $smarty->assign('APP', $GLOBALS['app_strings']); |
| 142 | 141 | $smarty->assign("view_module", $this->editModule); |
| 143 | 142 | $smarty->assign("subpanel", $this->subpanel); |
| 144 | - if (isset($this->editPackage)) |
|
| 145 | - $smarty->assign("view_package", $this->editPackage); |
|
| 143 | + if (isset($this->editPackage)) { |
|
| 144 | + $smarty->assign("view_package", $this->editPackage); |
|
| 145 | + } |
|
| 146 | 146 | |
| 147 | 147 | $ajax->addSection('east', translate('LBL_SECTION_PROPERTIES', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/editProperty.tpl')); |
| 148 | 148 | echo $ajax->getJavascript(); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | class ViewDisplaydeployresult extends SugarView |
| 43 | 43 | { |
| 44 | - function __construct(){ |
|
| 44 | + function __construct() { |
|
| 45 | 45 | $this->show_header = false; |
| 46 | 46 | $this->show_title = false; |
| 47 | 47 | $this->show_subpanels = false; |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | /** |
| 55 | 55 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
| 56 | 56 | */ |
| 57 | - function ViewDisplaydeployresult(){ |
|
| 57 | + function ViewDisplaydeployresult() { |
|
| 58 | 58 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 59 | - if(isset($GLOBALS['log'])) { |
|
| 59 | + if (isset($GLOBALS['log'])) { |
|
| 60 | 60 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 61 | 61 | } |
| 62 | 62 | else { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | global $mod_strings; |
| 75 | 75 | |
| 76 | 76 | return array( |
| 77 | - translate('LBL_MODULE_NAME','Administration'), |
|
| 77 | + translate('LBL_MODULE_NAME', 'Administration'), |
|
| 78 | 78 | ModuleBuilderController::getModuleTitle(), |
| 79 | 79 | ); |
| 80 | 80 | } |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 24 | 24 | if(isset($GLOBALS['log'])) { |
| 25 | 25 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 26 | - } |
|
| 27 | - else { |
|
| 26 | + } else { |
|
| 28 | 27 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 29 | 28 | } |
| 30 | 29 | self::__construct($seed, $module, $subPanel, $options); |