@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /********************************************************************************* |
| 4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | parent::__construct($id, $def); |
| 58 | 58 | |
| 59 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOK_KnowledgeBase'); |
|
| 59 | + if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOK_KnowledgeBase'); |
|
| 60 | 60 | |
| 61 | 61 | $this->searchFields = $dashletData['AOK_KnowledgeBaseDashlet']['searchFields']; |
| 62 | 62 | $this->columns = $dashletData['AOK_KnowledgeBaseDashlet']['columns']; |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * @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 |
| 69 | 69 | */ |
| 70 | - function AOK_KnowledgeBaseDashlet($id, $def = null){ |
|
| 70 | + function AOK_KnowledgeBaseDashlet($id, $def = null) { |
|
| 71 | 71 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 72 | - if(isset($GLOBALS['log'])) { |
|
| 72 | + if (isset($GLOBALS['log'])) { |
|
| 73 | 73 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 74 | 74 | } |
| 75 | 75 | else { |
@@ -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. |
@@ -56,7 +58,9 @@ discard block |
||
| 56 | 58 | |
| 57 | 59 | parent::__construct($id, $def); |
| 58 | 60 | |
| 59 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOK_KnowledgeBase'); |
|
| 61 | + if(empty($def['title'])) { |
|
| 62 | + $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOK_KnowledgeBase'); |
|
| 63 | + } |
|
| 60 | 64 | |
| 61 | 65 | $this->searchFields = $dashletData['AOK_KnowledgeBaseDashlet']['searchFields']; |
| 62 | 66 | $this->columns = $dashletData['AOK_KnowledgeBaseDashlet']['columns']; |
@@ -71,8 +75,7 @@ discard block |
||
| 71 | 75 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 72 | 76 | if(isset($GLOBALS['log'])) { |
| 73 | 77 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 74 | - } |
|
| 75 | - else { |
|
| 78 | + } else { |
|
| 76 | 79 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 77 | 80 | } |
| 78 | 81 | self::__construct($id, $def); |
@@ -1,19 +1,19 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | |
| 4 | 4 | require_once('include/MVC/View/views/view.detail.php'); |
| 5 | 5 | |
| 6 | 6 | class AOS_PDF_TemplatesViewDetail extends ViewDetail { |
| 7 | - function __construct(){ |
|
| 7 | + function __construct() { |
|
| 8 | 8 | parent::__construct(); |
| 9 | 9 | } |
| 10 | 10 | |
| 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 AOS_PDF_TemplatesViewDetail(){ |
|
| 14 | + function AOS_PDF_TemplatesViewDetail() { |
|
| 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 { |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | - function display(){ |
|
| 26 | + function display() { |
|
| 27 | 27 | $this->setDecodeHTML(); |
| 28 | 28 | parent::display(); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - function setDecodeHTML(){ |
|
| 32 | - $this->bean->pdfheader = html_entity_decode(str_replace(' ',' ',$this->bean->pdfheader)); |
|
| 33 | - $this->bean->description = html_entity_decode(str_replace(' ',' ',$this->bean->description)); |
|
| 34 | - $this->bean->pdffooter = html_entity_decode(str_replace(' ',' ',$this->bean->pdffooter)); |
|
| 31 | + function setDecodeHTML() { |
|
| 32 | + $this->bean->pdfheader = html_entity_decode(str_replace(' ', ' ', $this->bean->pdfheader)); |
|
| 33 | + $this->bean->description = html_entity_decode(str_replace(' ', ' ', $this->bean->description)); |
|
| 34 | + $this->bean->pdffooter = html_entity_decode(str_replace(' ', ' ', $this->bean->pdffooter)); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | ?> |
@@ -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(); |
@@ -1,19 +1,19 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | |
| 4 | 4 | require_once('include/MVC/View/views/view.edit.php'); |
| 5 | 5 | |
| 6 | 6 | class AOS_PDF_TemplatesViewEdit extends ViewEdit { |
| 7 | - function __construct(){ |
|
| 7 | + function __construct() { |
|
| 8 | 8 | parent::__construct(); |
| 9 | 9 | } |
| 10 | 10 | |
| 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 AOS_PDF_TemplatesViewEdit(){ |
|
| 14 | + function AOS_PDF_TemplatesViewEdit() { |
|
| 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 { |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | - function display(){ |
|
| 26 | + function display() { |
|
| 27 | 27 | $this->setFields(); |
| 28 | 28 | parent::display(); |
| 29 | 29 | $this->displayTMCE(); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - function setFields(){ |
|
| 32 | + function setFields() { |
|
| 33 | 33 | global $app_list_strings, $mod_strings, $beanList; |
| 34 | 34 | |
| 35 | 35 | //Loading Sample Files |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | if ($handle = opendir('modules/AOS_PDF_Templates/samples')) { |
| 39 | 39 | $sample_options_array[] = ' '; |
| 40 | 40 | while (false !== ($file = readdir($handle))) { |
| 41 | - if($value = ltrim(rtrim($file,'.php'),'smpl_')){ |
|
| 41 | + if ($value = ltrim(rtrim($file, '.php'), 'smpl_')) { |
|
| 42 | 42 | require_once('modules/AOS_PDF_Templates/samples/'.$file); |
| 43 | - $file = rtrim($file,'.php'); |
|
| 43 | + $file = rtrim($file, '.php'); |
|
| 44 | 44 | $file = new $file(); |
| 45 | 45 | $fileArray = |
| 46 | 46 | array( |
@@ -54,84 +54,84 @@ discard block |
||
| 54 | 54 | $sample_options_array[$fileArray] = $value; |
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | - $samples = get_select_options($sample_options_array,''); |
|
| 57 | + $samples = get_select_options($sample_options_array, ''); |
|
| 58 | 58 | closedir($handle); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - $this->ss->assign('CUSTOM_SAMPLE','<select id="sample" name="sample" onchange="insertSample(this.options[this.selectedIndex].value)">'. |
|
| 61 | + $this->ss->assign('CUSTOM_SAMPLE', '<select id="sample" name="sample" onchange="insertSample(this.options[this.selectedIndex].value)">'. |
|
| 62 | 62 | $samples. |
| 63 | 63 | '</select>'); |
| 64 | 64 | |
| 65 | 65 | |
| 66 | - $insert_fields_js ="<script>var moduleOptions = {\n"; |
|
| 67 | - $insert_fields_js2 ="<script>var regularOptions = {\n"; |
|
| 66 | + $insert_fields_js = "<script>var moduleOptions = {\n"; |
|
| 67 | + $insert_fields_js2 = "<script>var regularOptions = {\n"; |
|
| 68 | 68 | $modules = $app_list_strings['pdf_template_type_dom']; |
| 69 | 69 | |
| 70 | - foreach($modules as $moduleName => $value) { |
|
| 70 | + foreach ($modules as $moduleName => $value) { |
|
| 71 | 71 | |
| 72 | 72 | $options_array = array(''=>''); |
| 73 | 73 | $mod_options_array = array(); |
| 74 | 74 | |
| 75 | 75 | //Getting Fields |
| 76 | - if(!$beanList[$moduleName]){ |
|
| 76 | + if (!$beanList[$moduleName]) { |
|
| 77 | 77 | continue; |
| 78 | 78 | } |
| 79 | 79 | $module = new $beanList[$moduleName](); |
| 80 | 80 | |
| 81 | - foreach($module->field_defs as $name => $arr){ |
|
| 82 | - if(!((isset($arr['dbType']) && strtolower($arr['dbType']) == 'id') || (isset($arr['type']) && $arr['type'] == 'id') || (isset($arr['type']) && $arr['type'] == 'link'))){ |
|
| 83 | - if(!isset($arr['reportable']) || $arr['reportable']){ |
|
| 84 | - $options_array['$'.$module->table_name.'_'.$name] = translate($arr['vname'],$module->module_dir); |
|
| 81 | + foreach ($module->field_defs as $name => $arr) { |
|
| 82 | + if (!((isset($arr['dbType']) && strtolower($arr['dbType']) == 'id') || (isset($arr['type']) && $arr['type'] == 'id') || (isset($arr['type']) && $arr['type'] == 'link'))) { |
|
| 83 | + if (!isset($arr['reportable']) || $arr['reportable']) { |
|
| 84 | + $options_array['$'.$module->table_name.'_'.$name] = translate($arr['vname'], $module->module_dir); |
|
| 85 | 85 | |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | } //End loop. |
| 89 | 89 | |
| 90 | 90 | $options = json_encode($options_array); |
| 91 | - $mod_options_array[$module->module_dir] = translate('LBL_MODULE_NAME',$module->module_dir); |
|
| 92 | - $insert_fields_js2 .="'$moduleName':$options,\n"; |
|
| 91 | + $mod_options_array[$module->module_dir] = translate('LBL_MODULE_NAME', $module->module_dir); |
|
| 92 | + $insert_fields_js2 .= "'$moduleName':$options,\n"; |
|
| 93 | 93 | $firstOptions = $options; |
| 94 | 94 | |
| 95 | 95 | $fmod_options_array = array(); |
| 96 | - foreach($module->field_defs as $module_name => $module_arr){ |
|
| 96 | + foreach ($module->field_defs as $module_name => $module_arr) { |
|
| 97 | 97 | |
| 98 | - if(isset($module_arr['type']) && $module_arr['type'] == 'relate' && isset($module_arr['source']) && $module_arr['source'] == 'non-db'){ |
|
| 98 | + if (isset($module_arr['type']) && $module_arr['type'] == 'relate' && isset($module_arr['source']) && $module_arr['source'] == 'non-db') { |
|
| 99 | 99 | |
| 100 | 100 | $options_array = array(''=>''); |
| 101 | - if(isset($module_arr['module']) && $module_arr['module'] != '' && $module_arr['module'] != 'EmailAddress'){ |
|
| 101 | + if (isset($module_arr['module']) && $module_arr['module'] != '' && $module_arr['module'] != 'EmailAddress') { |
|
| 102 | 102 | $relate_module_name = $beanList[$module_arr['module']]; |
| 103 | 103 | $relate_module = new $relate_module_name(); |
| 104 | 104 | |
| 105 | - foreach($relate_module->field_defs as $relate_name => $relate_arr){ |
|
| 106 | - if(!((isset($relate_arr['dbType']) && strtolower($relate_arr['dbType']) == 'id') || $relate_arr['type'] == 'id' || $relate_arr['type'] == 'link')){ |
|
| 107 | - if((!isset($relate_arr['reportable']) || $relate_arr['reportable']) && isset($relate_arr['vname'])){ |
|
| 108 | - $options_array['$'.$module_arr['name'].'_'.$relate_name] = translate($relate_arr['vname'],$relate_module->module_dir); |
|
| 105 | + foreach ($relate_module->field_defs as $relate_name => $relate_arr) { |
|
| 106 | + if (!((isset($relate_arr['dbType']) && strtolower($relate_arr['dbType']) == 'id') || $relate_arr['type'] == 'id' || $relate_arr['type'] == 'link')) { |
|
| 107 | + if ((!isset($relate_arr['reportable']) || $relate_arr['reportable']) && isset($relate_arr['vname'])) { |
|
| 108 | + $options_array['$'.$module_arr['name'].'_'.$relate_name] = translate($relate_arr['vname'], $relate_module->module_dir); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | } //End loop. |
| 112 | 112 | |
| 113 | 113 | $options = json_encode($options_array); |
| 114 | 114 | |
| 115 | - if($module_arr['vname'] != 'LBL_DELETED'){ |
|
| 116 | - $options_array['$'.$module->table_name.'_'.$name] = translate($module_arr['vname'],$module->module_dir); |
|
| 117 | - $fmod_options_array[$module_arr['vname']] = translate($relate_module->module_dir).' : '.translate($module_arr['vname'],$module->module_dir); |
|
| 115 | + if ($module_arr['vname'] != 'LBL_DELETED') { |
|
| 116 | + $options_array['$'.$module->table_name.'_'.$name] = translate($module_arr['vname'], $module->module_dir); |
|
| 117 | + $fmod_options_array[$module_arr['vname']] = translate($relate_module->module_dir).' : '.translate($module_arr['vname'], $module->module_dir); |
|
| 118 | 118 | } |
| 119 | 119 | $test = $module_arr['vname']; |
| 120 | - $insert_fields_js2 .="'$test':$options,\n"; |
|
| 120 | + $insert_fields_js2 .= "'$test':$options,\n"; |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | //LINE ITEMS CODE! |
| 126 | - if(isset($module->lineItems) && $module->lineItems){ |
|
| 126 | + if (isset($module->lineItems) && $module->lineItems) { |
|
| 127 | 127 | |
| 128 | 128 | //add group fields |
| 129 | 129 | $options_array = array(''=>''); |
| 130 | 130 | $group_quote = new AOS_Line_Item_Groups(); |
| 131 | - foreach($group_quote->field_defs as $line_name => $line_arr){ |
|
| 132 | - if(!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')){ |
|
| 133 | - if((!isset($line_arr['reportable']) || $line_arr['reportable']) ){//&& $line_arr['vname'] != 'LBL_NAME' |
|
| 134 | - $options_array['$'.$group_quote->table_name.'_'.$line_name] = translate($line_arr['vname'],$group_quote->module_dir); |
|
| 131 | + foreach ($group_quote->field_defs as $line_name => $line_arr) { |
|
| 132 | + if (!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')) { |
|
| 133 | + if ((!isset($line_arr['reportable']) || $line_arr['reportable'])) {//&& $line_arr['vname'] != 'LBL_NAME' |
|
| 134 | + $options_array['$'.$group_quote->table_name.'_'.$line_name] = translate($line_arr['vname'], $group_quote->module_dir); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | } |
@@ -139,26 +139,26 @@ discard block |
||
| 139 | 139 | $options = json_encode($options_array); |
| 140 | 140 | |
| 141 | 141 | $line_module_name = $beanList['AOS_Line_Item_Groups']; |
| 142 | - $fmod_options_array[$line_module_name] = translate('LBL_LINE_ITEMS','AOS_Quotes').' : '.translate('LBL_MODULE_NAME','AOS_Line_Item_Groups'); |
|
| 143 | - $insert_fields_js2 .="'$line_module_name':$options,\n"; |
|
| 142 | + $fmod_options_array[$line_module_name] = translate('LBL_LINE_ITEMS', 'AOS_Quotes').' : '.translate('LBL_MODULE_NAME', 'AOS_Line_Item_Groups'); |
|
| 143 | + $insert_fields_js2 .= "'$line_module_name':$options,\n"; |
|
| 144 | 144 | |
| 145 | 145 | //PRODUCTS |
| 146 | 146 | $options_array = array(''=>''); |
| 147 | 147 | |
| 148 | 148 | $product_quote = new AOS_Products_Quotes(); |
| 149 | - foreach($product_quote->field_defs as $line_name => $line_arr){ |
|
| 150 | - if(!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')){ |
|
| 151 | - if(!isset($line_arr['reportable']) || $line_arr['reportable']){ |
|
| 152 | - $options_array['$'.$product_quote->table_name.'_'.$line_name] = translate($line_arr['vname'],$product_quote->module_dir); |
|
| 149 | + foreach ($product_quote->field_defs as $line_name => $line_arr) { |
|
| 150 | + if (!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')) { |
|
| 151 | + if (!isset($line_arr['reportable']) || $line_arr['reportable']) { |
|
| 152 | + $options_array['$'.$product_quote->table_name.'_'.$line_name] = translate($line_arr['vname'], $product_quote->module_dir); |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | $product_quote = new AOS_Products(); |
| 158 | - foreach($product_quote->field_defs as $line_name => $line_arr){ |
|
| 159 | - if(!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')){ |
|
| 160 | - if((!isset($line_arr['reportable']) || $line_arr['reportable']) && $line_arr['vname'] != 'LBL_NAME'){ |
|
| 161 | - $options_array['$'.$product_quote->table_name.'_'.$line_name] = translate($line_arr['vname'],$product_quote->module_dir); |
|
| 158 | + foreach ($product_quote->field_defs as $line_name => $line_arr) { |
|
| 159 | + if (!((isset($line_arr['dbType']) && strtolower($line_arr['dbType']) == 'id') || $line_arr['type'] == 'id' || $line_arr['type'] == 'link')) { |
|
| 160 | + if ((!isset($line_arr['reportable']) || $line_arr['reportable']) && $line_arr['vname'] != 'LBL_NAME') { |
|
| 161 | + $options_array['$'.$product_quote->table_name.'_'.$line_name] = translate($line_arr['vname'], $product_quote->module_dir); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -166,41 +166,41 @@ discard block |
||
| 166 | 166 | $options = json_encode($options_array); |
| 167 | 167 | |
| 168 | 168 | $line_module_name = $beanList['AOS_Products_Quotes']; |
| 169 | - $fmod_options_array[$line_module_name] = translate('LBL_LINE_ITEMS','AOS_Quotes').' : '.translate('LBL_MODULE_NAME','AOS_Products'); |
|
| 170 | - $insert_fields_js2 .="'$line_module_name':$options,\n"; |
|
| 169 | + $fmod_options_array[$line_module_name] = translate('LBL_LINE_ITEMS', 'AOS_Quotes').' : '.translate('LBL_MODULE_NAME', 'AOS_Products'); |
|
| 170 | + $insert_fields_js2 .= "'$line_module_name':$options,\n"; |
|
| 171 | 171 | |
| 172 | 172 | //Services |
| 173 | 173 | $options_array = array(''=>''); |
| 174 | - $options_array['$aos_services_quotes_name'] = translate('LBL_SERVICE_NAME','AOS_Quotes'); |
|
| 175 | - $options_array['$aos_services_quotes_number'] = translate('LBL_LIST_NUM','AOS_Products_Quotes'); |
|
| 176 | - $options_array['$aos_services_quotes_service_list_price'] = translate('LBL_SERVICE_LIST_PRICE','AOS_Quotes'); |
|
| 177 | - $options_array['$aos_services_quotes_service_discount'] = translate('LBL_SERVICE_DISCOUNT','AOS_Quotes'); |
|
| 178 | - $options_array['$aos_services_quotes_service_unit_price'] = translate('LBL_SERVICE_PRICE','AOS_Quotes'); |
|
| 179 | - $options_array['$aos_services_quotes_vat_amt'] = translate('LBL_VAT_AMT','AOS_Quotes'); |
|
| 180 | - $options_array['$aos_services_quotes_vat'] = translate('LBL_VAT','AOS_Quotes'); |
|
| 181 | - $options_array['$aos_services_quotes_service_total_price'] = translate('LBL_TOTAL_PRICE','AOS_Quotes'); |
|
| 174 | + $options_array['$aos_services_quotes_name'] = translate('LBL_SERVICE_NAME', 'AOS_Quotes'); |
|
| 175 | + $options_array['$aos_services_quotes_number'] = translate('LBL_LIST_NUM', 'AOS_Products_Quotes'); |
|
| 176 | + $options_array['$aos_services_quotes_service_list_price'] = translate('LBL_SERVICE_LIST_PRICE', 'AOS_Quotes'); |
|
| 177 | + $options_array['$aos_services_quotes_service_discount'] = translate('LBL_SERVICE_DISCOUNT', 'AOS_Quotes'); |
|
| 178 | + $options_array['$aos_services_quotes_service_unit_price'] = translate('LBL_SERVICE_PRICE', 'AOS_Quotes'); |
|
| 179 | + $options_array['$aos_services_quotes_vat_amt'] = translate('LBL_VAT_AMT', 'AOS_Quotes'); |
|
| 180 | + $options_array['$aos_services_quotes_vat'] = translate('LBL_VAT', 'AOS_Quotes'); |
|
| 181 | + $options_array['$aos_services_quotes_service_total_price'] = translate('LBL_TOTAL_PRICE', 'AOS_Quotes'); |
|
| 182 | 182 | |
| 183 | 183 | $options = json_encode($options_array); |
| 184 | 184 | |
| 185 | 185 | $s_line_module_name = 'AOS_Service_Quotes'; |
| 186 | - $fmod_options_array[$s_line_module_name] = translate('LBL_LINE_ITEMS','AOS_Quotes').' : '.translate('LBL_SERVICE_MODULE_NAME','AOS_Products_Quotes'); |
|
| 187 | - $insert_fields_js2 .="'$s_line_module_name':$options,\n"; |
|
| 186 | + $fmod_options_array[$s_line_module_name] = translate('LBL_LINE_ITEMS', 'AOS_Quotes').' : '.translate('LBL_SERVICE_MODULE_NAME', 'AOS_Products_Quotes'); |
|
| 187 | + $insert_fields_js2 .= "'$s_line_module_name':$options,\n"; |
|
| 188 | 188 | |
| 189 | 189 | |
| 190 | 190 | $options_array = array(''=>''); |
| 191 | 191 | $currencies = new currency(); |
| 192 | - foreach($currencies->field_defs as $name => $arr){ |
|
| 193 | - if(!((isset($arr['dbType']) && strtolower($arr['dbType']) == 'id') || $arr['type'] == 'id' || $arr['type'] == 'link' || $arr['type'] == 'bool' || $arr['type'] == 'datetime' || (isset($arr['link_type']) && $arr['link_type'] == 'relationship_info'))){ |
|
| 194 | - if(isset($arr['vname']) && $arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_CURRENCIES_HASH' && $arr['vname'] != 'LBL_LIST_ACCEPT_STATUS' && $arr['vname'] != 'LBL_AUTHENTICATE_ID' && $arr['vname'] != 'LBL_MODIFIED_BY' && $arr['name'] != 'created_by_name'){ |
|
| 195 | - $options_array['$currencies_'.$name] = translate($arr['vname'],'Currencies'); |
|
| 192 | + foreach ($currencies->field_defs as $name => $arr) { |
|
| 193 | + if (!((isset($arr['dbType']) && strtolower($arr['dbType']) == 'id') || $arr['type'] == 'id' || $arr['type'] == 'link' || $arr['type'] == 'bool' || $arr['type'] == 'datetime' || (isset($arr['link_type']) && $arr['link_type'] == 'relationship_info'))) { |
|
| 194 | + if (isset($arr['vname']) && $arr['vname'] != 'LBL_DELETED' && $arr['vname'] != 'LBL_CURRENCIES_HASH' && $arr['vname'] != 'LBL_LIST_ACCEPT_STATUS' && $arr['vname'] != 'LBL_AUTHENTICATE_ID' && $arr['vname'] != 'LBL_MODIFIED_BY' && $arr['name'] != 'created_by_name') { |
|
| 195 | + $options_array['$currencies_'.$name] = translate($arr['vname'], 'Currencies'); |
|
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | $options = json_encode($options_array); |
| 200 | 200 | |
| 201 | 201 | $line_module_name = $beanList['Currencies']; |
| 202 | - $fmod_options_array[$line_module_name] = translate('LBL_MODULE_NAME','Currencies').' : '.translate('LBL_MODULE_NAME','Currencies'); |
|
| 203 | - $insert_fields_js2 .="'$line_module_name':$options,\n"; |
|
| 202 | + $fmod_options_array[$line_module_name] = translate('LBL_MODULE_NAME', 'Currencies').' : '.translate('LBL_MODULE_NAME', 'Currencies'); |
|
| 203 | + $insert_fields_js2 .= "'$line_module_name':$options,\n"; |
|
| 204 | 204 | |
| 205 | 205 | } |
| 206 | 206 | array_multisort($fmod_options_array, SORT_ASC, $fmod_options_array); |
@@ -208,17 +208,17 @@ discard block |
||
| 208 | 208 | $module_options = json_encode($mod_options_array); |
| 209 | 209 | |
| 210 | 210 | |
| 211 | - $insert_fields_js .="'$moduleName':$module_options,\n"; |
|
| 212 | - $moduleOptions[$moduleName] = array("module" => $module_options,"option" => $firstOptions); |
|
| 211 | + $insert_fields_js .= "'$moduleName':$module_options,\n"; |
|
| 212 | + $moduleOptions[$moduleName] = array("module" => $module_options, "option" => $firstOptions); |
|
| 213 | 213 | } //End loop. |
| 214 | 214 | |
| 215 | 215 | //Sets options to original options on load. |
| 216 | 216 | $insert_fields_js .= "} ;</script>"; |
| 217 | 217 | $insert_fields_js2 .= "} ;</script>"; |
| 218 | 218 | //echo $this->bean->type; |
| 219 | - if($this->bean->type=='') { |
|
| 219 | + if ($this->bean->type == '') { |
|
| 220 | 220 | $type = key($app_list_strings['pdf_template_type_dom']); |
| 221 | - }else{ |
|
| 221 | + } else { |
|
| 222 | 222 | $type = $this->bean->type; |
| 223 | 223 | } |
| 224 | 224 | |
@@ -241,17 +241,17 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | HTML; |
| 243 | 243 | |
| 244 | - $this->ss->assign('INSERT_FIELDS',$insert_fields); |
|
| 244 | + $this->ss->assign('INSERT_FIELDS', $insert_fields); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | - function displayTMCE(){ |
|
| 247 | + function displayTMCE() { |
|
| 248 | 248 | require_once("include/SugarTinyMCE.php"); |
| 249 | 249 | global $locale; |
| 250 | 250 | |
| 251 | 251 | $tiny = new SugarTinyMCE(); |
| 252 | 252 | $tinyMCE = $tiny->getConfig(); |
| 253 | 253 | |
| 254 | - $js =<<<JS |
|
| 254 | + $js = <<<JS |
|
| 255 | 255 | <script language="javascript" type="text/javascript"> |
| 256 | 256 | $tinyMCE |
| 257 | 257 | var df = '{$locale->getPrecedentPreference('default_date_format')}'; |
@@ -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 | |
| 5 | 7 | require_once('include/Dashlets/Dashlet.php'); |
@@ -48,8 +50,7 @@ discard block |
||
| 48 | 50 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 49 | 51 | if(isset($GLOBALS['log'])) { |
| 50 | 52 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 51 | - } |
|
| 52 | - else { |
|
| 53 | + } else { |
|
| 53 | 54 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 54 | 55 | } |
| 55 | 56 | self::__construct($id, $def); |
@@ -77,7 +78,7 @@ discard block |
||
| 77 | 78 | if(!empty($this->report->id)) { |
| 78 | 79 | //return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_CHARTJS); |
| 79 | 80 | return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_RGRAPH); |
| 80 | - }else{ |
|
| 81 | + } else{ |
|
| 81 | 82 | return ''; |
| 82 | 83 | } |
| 83 | 84 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /** |
| 4 | 4 | * Products, Quotations & Invoices modules. |
| 5 | 5 | * Extensions to SugarCRM |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | parent::__construct($id, $def); |
| 45 | 45 | |
| 46 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_PDF_Templates'); |
|
| 46 | + if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_PDF_Templates'); |
|
| 47 | 47 | |
| 48 | 48 | $this->searchFields = $dashletData['AOS_PDF_TemplatesDashlet']['searchFields']; |
| 49 | 49 | $this->columns = $dashletData['AOS_PDF_TemplatesDashlet']['columns']; |
@@ -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 AOS_PDF_TemplatesDashlet($id, $def = null){ |
|
| 57 | + function AOS_PDF_TemplatesDashlet($id, $def = null) { |
|
| 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 { |
@@ -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 | * Products, Quotations & Invoices modules. |
| 5 | 7 | * Extensions to SugarCRM |
@@ -43,7 +45,9 @@ discard block |
||
| 43 | 45 | |
| 44 | 46 | parent::__construct($id, $def); |
| 45 | 47 | |
| 46 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_PDF_Templates'); |
|
| 48 | + if(empty($def['title'])) { |
|
| 49 | + $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_PDF_Templates'); |
|
| 50 | + } |
|
| 47 | 51 | |
| 48 | 52 | $this->searchFields = $dashletData['AOS_PDF_TemplatesDashlet']['searchFields']; |
| 49 | 53 | $this->columns = $dashletData['AOS_PDF_TemplatesDashlet']['columns']; |
@@ -58,8 +62,7 @@ discard block |
||
| 58 | 62 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 59 | 63 | if(isset($GLOBALS['log'])) { |
| 60 | 64 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 61 | - } |
|
| 62 | - else { |
|
| 65 | + } else { |
|
| 63 | 66 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 64 | 67 | } |
| 65 | 68 | self::__construct($id, $def); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /********************************************************************************* |
| 4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | class Group extends User { |
| 45 | 45 | // User attribute overrides |
| 46 | - var $status = 'Group'; |
|
| 47 | - var $password = ''; // to disallow logins |
|
| 46 | + var $status = 'Group'; |
|
| 47 | + var $password = ''; // to disallow logins |
|
| 48 | 48 | var $default_team; |
| 49 | 49 | var $importable = false; |
| 50 | 50 | |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | /** |
| 57 | 57 | * @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 |
| 58 | 58 | */ |
| 59 | - function Group(){ |
|
| 59 | + function Group() { |
|
| 60 | 60 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 61 | - if(isset($GLOBALS['log'])) { |
|
| 61 | + if (isset($GLOBALS['log'])) { |
|
| 62 | 62 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 63 | 63 | } |
| 64 | 64 | else { |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | $query = "SELECT users.*"; |
| 81 | 81 | $query .= " FROM users "; |
| 82 | 82 | $where_auto = " users.deleted = 0"; |
| 83 | - if($where != "") |
|
| 84 | - $query .= " WHERE $where AND " . $where_auto; |
|
| 83 | + if ($where != "") |
|
| 84 | + $query .= " WHERE $where AND ".$where_auto; |
|
| 85 | 85 | else |
| 86 | - $query .= " WHERE " . $where_auto; |
|
| 87 | - if($order_by != "") |
|
| 86 | + $query .= " WHERE ".$where_auto; |
|
| 87 | + if ($order_by != "") |
|
| 88 | 88 | $query .= " ORDER BY $order_by"; |
| 89 | 89 | else |
| 90 | 90 | $query .= " ORDER BY users.user_name"; |
@@ -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. |
@@ -60,8 +62,7 @@ discard block |
||
| 60 | 62 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 61 | 63 | if(isset($GLOBALS['log'])) { |
| 62 | 64 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 63 | - } |
|
| 64 | - else { |
|
| 65 | + } else { |
|
| 65 | 66 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 66 | 67 | } |
| 67 | 68 | self::__construct(); |
@@ -80,14 +81,16 @@ discard block |
||
| 80 | 81 | $query = "SELECT users.*"; |
| 81 | 82 | $query .= " FROM users "; |
| 82 | 83 | $where_auto = " users.deleted = 0"; |
| 83 | - if($where != "") |
|
| 84 | - $query .= " WHERE $where AND " . $where_auto; |
|
| 85 | - else |
|
| 86 | - $query .= " WHERE " . $where_auto; |
|
| 87 | - if($order_by != "") |
|
| 88 | - $query .= " ORDER BY $order_by"; |
|
| 89 | - else |
|
| 90 | - $query .= " ORDER BY users.user_name"; |
|
| 84 | + if($where != "") { |
|
| 85 | + $query .= " WHERE $where AND " . $where_auto; |
|
| 86 | + } else { |
|
| 87 | + $query .= " WHERE " . $where_auto; |
|
| 88 | + } |
|
| 89 | + if($order_by != "") { |
|
| 90 | + $query .= " ORDER BY $order_by"; |
|
| 91 | + } else { |
|
| 92 | + $query .= " ORDER BY users.user_name"; |
|
| 93 | + } |
|
| 91 | 94 | return $query; |
| 92 | 95 | } |
| 93 | 96 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /** |
| 4 | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | 5 | * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
@@ -25,16 +25,16 @@ discard block |
||
| 25 | 25 | class AM_ProjectTemplatesViewDetail extends ViewDetail { |
| 26 | 26 | |
| 27 | 27 | |
| 28 | - function __construct(){ |
|
| 28 | + function __construct() { |
|
| 29 | 29 | parent::__construct(); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @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 |
| 34 | 34 | */ |
| 35 | - function AM_ProjectTemplatesViewDetail(){ |
|
| 35 | + function AM_ProjectTemplatesViewDetail() { |
|
| 36 | 36 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 37 | - if(isset($GLOBALS['log'])) { |
|
| 37 | + if (isset($GLOBALS['log'])) { |
|
| 38 | 38 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 39 | 39 | } |
| 40 | 40 | else { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | - function display(){ |
|
| 47 | + function display() { |
|
| 48 | 48 | global $app_strings, $mod_strings; |
| 49 | 49 | parent::display(); |
| 50 | 50 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | addToValidate("project_form", "p_name", "name", true,"'.$mod_strings['LBL_PROJECT_NAME'].'" ); |
| 86 | 86 | addToValidate("project_form", "start_date", "date", false,"'.$mod_strings['LBL_START_DATE'].'" ); |
| 87 | 87 | </script> |
| 88 | - <input type="hidden" name="template_id" value="'.$this->bean->id .'" /> |
|
| 88 | + <input type="hidden" name="template_id" value="'.$this->bean->id.'" /> |
|
| 89 | 89 | </fieldset> |
| 90 | 90 | </form> |
| 91 | 91 | </p> |
@@ -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(); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /********************************************************************************* |
| 4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | parent::__construct($id, $def); |
| 55 | 55 | |
| 56 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AM_ProjectTemplates'); |
|
| 56 | + if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AM_ProjectTemplates'); |
|
| 57 | 57 | |
| 58 | 58 | $this->searchFields = $dashletData['AM_ProjectTemplatesDashlet']['searchFields']; |
| 59 | 59 | $this->columns = $dashletData['AM_ProjectTemplatesDashlet']['columns']; |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * @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 |
| 66 | 66 | */ |
| 67 | - function AM_ProjectTemplatesDashlet($id, $def = null){ |
|
| 67 | + function AM_ProjectTemplatesDashlet($id, $def = null) { |
|
| 68 | 68 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 69 | - if(isset($GLOBALS['log'])) { |
|
| 69 | + if (isset($GLOBALS['log'])) { |
|
| 70 | 70 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 71 | 71 | } |
| 72 | 72 | else { |
@@ -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. |
@@ -53,7 +55,9 @@ discard block |
||
| 53 | 55 | |
| 54 | 56 | parent::__construct($id, $def); |
| 55 | 57 | |
| 56 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AM_ProjectTemplates'); |
|
| 58 | + if(empty($def['title'])) { |
|
| 59 | + $this->title = translate('LBL_HOMEPAGE_TITLE', 'AM_ProjectTemplates'); |
|
| 60 | + } |
|
| 57 | 61 | |
| 58 | 62 | $this->searchFields = $dashletData['AM_ProjectTemplatesDashlet']['searchFields']; |
| 59 | 63 | $this->columns = $dashletData['AM_ProjectTemplatesDashlet']['columns']; |
@@ -68,8 +72,7 @@ discard block |
||
| 68 | 72 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 69 | 73 | if(isset($GLOBALS['log'])) { |
| 70 | 74 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 71 | - } |
|
| 72 | - else { |
|
| 75 | + } else { |
|
| 73 | 76 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 74 | 77 | } |
| 75 | 78 | self::__construct($id, $def); |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * @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 |
| 79 | 79 | */ |
| 80 | - function AOW_Condition(){ |
|
| 80 | + function AOW_Condition() { |
|
| 81 | 81 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 82 | - if(isset($GLOBALS['log'])) { |
|
| 82 | + if (isset($GLOBALS['log'])) { |
|
| 83 | 83 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 84 | 84 | } |
| 85 | 85 | else { |
@@ -99,33 +99,33 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | require_once('modules/AOW_WorkFlow/aow_utils.php'); |
| 101 | 101 | |
| 102 | - $line_count = count($post_data[$key . 'field']); |
|
| 102 | + $line_count = count($post_data[$key.'field']); |
|
| 103 | 103 | $j = 0; |
| 104 | 104 | for ($i = 0; $i < $line_count; ++$i) { |
| 105 | 105 | |
| 106 | - if ($post_data[$key . 'deleted'][$i] == 1) { |
|
| 107 | - $this->mark_deleted($post_data[$key . 'id'][$i]); |
|
| 106 | + if ($post_data[$key.'deleted'][$i] == 1) { |
|
| 107 | + $this->mark_deleted($post_data[$key.'id'][$i]); |
|
| 108 | 108 | } else { |
| 109 | 109 | $condition = new AOW_Condition(); |
| 110 | 110 | foreach ($this->field_defs as $field_def) { |
| 111 | 111 | $field_name = $field_def['name']; |
| 112 | - if (isset($post_data[$key . $field_name][$i])) { |
|
| 113 | - if (is_array($post_data[$key . $field_name][$i])) { |
|
| 112 | + if (isset($post_data[$key.$field_name][$i])) { |
|
| 113 | + if (is_array($post_data[$key.$field_name][$i])) { |
|
| 114 | 114 | if ($field_name == 'module_path') { |
| 115 | - $post_data[$key . $field_name][$i] = base64_encode(serialize($post_data[$key . $field_name][$i])); |
|
| 115 | + $post_data[$key.$field_name][$i] = base64_encode(serialize($post_data[$key.$field_name][$i])); |
|
| 116 | 116 | } else { |
| 117 | 117 | switch ($condition->value_type) { |
| 118 | 118 | case 'Date': |
| 119 | - $post_data[$key . $field_name][$i] = base64_encode(serialize($post_data[$key . $field_name][$i])); |
|
| 119 | + $post_data[$key.$field_name][$i] = base64_encode(serialize($post_data[$key.$field_name][$i])); |
|
| 120 | 120 | break; |
| 121 | 121 | default: |
| 122 | - $post_data[$key . $field_name][$i] = encodeMultienumValue($post_data[$key . $field_name][$i]); |
|
| 122 | + $post_data[$key.$field_name][$i] = encodeMultienumValue($post_data[$key.$field_name][$i]); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | - } else if ($field_name === 'value' && $post_data[$key . 'value_type'][$i] === 'Value') { |
|
| 126 | - $post_data[$key . $field_name][$i] = fixUpFormatting($_REQUEST['flow_module'], $condition->field, $post_data[$key . $field_name][$i]); |
|
| 125 | + } else if ($field_name === 'value' && $post_data[$key.'value_type'][$i] === 'Value') { |
|
| 126 | + $post_data[$key.$field_name][$i] = fixUpFormatting($_REQUEST['flow_module'], $condition->field, $post_data[$key.$field_name][$i]); |
|
| 127 | 127 | } |
| 128 | - $condition->$field_name = $post_data[$key . $field_name][$i]; |
|
| 128 | + $condition->$field_name = $post_data[$key.$field_name][$i]; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | } |
@@ -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); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 3 | 3 | /********************************************************************************* |
| 4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -72,9 +72,9 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * @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 |
| 74 | 74 | */ |
| 75 | - function Popup_Picker(){ |
|
| 75 | + function Popup_Picker() { |
|
| 76 | 76 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 77 | - if(isset($GLOBALS['log'])) { |
|
| 77 | + if (isset($GLOBALS['log'])) { |
|
| 78 | 78 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 79 | 79 | } |
| 80 | 80 | else { |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | global $audit; |
| 102 | 102 | global $current_language; |
| 103 | 103 | |
| 104 | - $audit_list = Audit::get_audit_list(); |
|
| 105 | - $xtpl=new XTemplate ('modules/Audit/Popup_picker.html'); |
|
| 104 | + $audit_list = Audit::get_audit_list(); |
|
| 105 | + $xtpl = new XTemplate('modules/Audit/Popup_picker.html'); |
|
| 106 | 106 | |
| 107 | 107 | $xtpl->assign('MOD', $mod_strings); |
| 108 | 108 | $xtpl->assign('APP', $app_strings); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $params[] = translate('LBL_MODULE_NAME', $focus->module_dir); |
| 126 | 126 | $params[] = $focus->get_summary_text(); |
| 127 | 127 | $params[] = translate('LBL_CHANGE_LOG', 'Audit'); |
| 128 | - echo str_replace('</div>',"<span class='utils'>$titleExtra</span></div>",getClassicModuleTitle($focus->module_dir, $params, false)); |
|
| 128 | + echo str_replace('</div>', "<span class='utils'>$titleExtra</span></div>", getClassicModuleTitle($focus->module_dir, $params, false)); |
|
| 129 | 129 | |
| 130 | 130 | $oddRow = true; |
| 131 | 131 | $audited_fields = $focus->getAuditEnabledFieldDefinitions(); |
@@ -135,20 +135,20 @@ discard block |
||
| 135 | 135 | $start_tag = "<table><tr><td >"; |
| 136 | 136 | $end_tag = "</td></tr></table>"; |
| 137 | 137 | |
| 138 | - if($field_count > 0) |
|
| 138 | + if ($field_count > 0) |
|
| 139 | 139 | { |
| 140 | 140 | $index = 0; |
| 141 | - foreach($audited_fields as $key=>$value) |
|
| 141 | + foreach ($audited_fields as $key=>$value) |
|
| 142 | 142 | { |
| 143 | 143 | $index++; |
| 144 | 144 | $vname = ''; |
| 145 | - if(isset($value['vname'])) |
|
| 145 | + if (isset($value['vname'])) |
|
| 146 | 146 | $vname = $value['vname']; |
| 147 | - else if(isset($value['label'])) |
|
| 147 | + else if (isset($value['label'])) |
|
| 148 | 148 | $vname = $value['label']; |
| 149 | 149 | $fields .= str_replace(':', '', translate($vname, $focus->module_dir)); |
| 150 | 150 | |
| 151 | - if($index < $field_count) |
|
| 151 | + if ($index < $field_count) |
|
| 152 | 152 | { |
| 153 | 153 | $fields .= ", "; |
| 154 | 154 | } |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | echo $start_tag.translate('LBL_AUDITED_FIELDS', 'Audit').$end_tag; |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - foreach($audit_list as $audit) |
|
| 164 | + foreach ($audit_list as $audit) |
|
| 165 | 165 | { |
| 166 | - if(empty($audit['before_value_string']) && empty($audit['after_value_string'])) |
|
| 166 | + if (empty($audit['before_value_string']) && empty($audit['after_value_string'])) |
|
| 167 | 167 | { |
| 168 | 168 | $before_value = $audit['before_value_text']; |
| 169 | 169 | $after_value = $audit['after_value_text']; |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | // Let's run the audit data through the sugar field system |
| 177 | - if(isset($audit['data_type'])){ |
|
| 177 | + if (isset($audit['data_type'])) { |
|
| 178 | 178 | require_once('include/SugarFields/SugarFieldHandler.php'); |
| 179 | - $vardef = array('name'=>'audit_field','type'=>$audit['data_type']); |
|
| 179 | + $vardef = array('name'=>'audit_field', 'type'=>$audit['data_type']); |
|
| 180 | 180 | $field = SugarFieldHandler::getSugarField($audit['data_type']); |
| 181 | 181 | $before_value = $field->getChangeLogSmarty(array($vardef['name']=>$before_value), $vardef, array(), $vardef['name']); |
| 182 | 182 | $after_value = $field->getChangeLogSmarty(array($vardef['name']=>$after_value), $vardef, array(), $vardef['name']); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | $xtpl->assign("ACTIVITY", $activity_fields); |
| 195 | 195 | |
| 196 | - if($oddRow) |
|
| 196 | + if ($oddRow) |
|
| 197 | 197 | { |
| 198 | 198 | //todo move to themes |
| 199 | 199 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
@@ -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. |
@@ -76,8 +78,7 @@ discard block |
||
| 76 | 78 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
| 77 | 79 | if(isset($GLOBALS['log'])) { |
| 78 | 80 | $GLOBALS['log']->deprecated($deprecatedMessage); |
| 79 | - } |
|
| 80 | - else { |
|
| 81 | + } else { |
|
| 81 | 82 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
| 82 | 83 | } |
| 83 | 84 | self::__construct(); |
@@ -142,10 +143,11 @@ discard block |
||
| 142 | 143 | { |
| 143 | 144 | $index++; |
| 144 | 145 | $vname = ''; |
| 145 | - if(isset($value['vname'])) |
|
| 146 | - $vname = $value['vname']; |
|
| 147 | - else if(isset($value['label'])) |
|
| 148 | - $vname = $value['label']; |
|
| 146 | + if(isset($value['vname'])) { |
|
| 147 | + $vname = $value['vname']; |
|
| 148 | + } else if(isset($value['label'])) { |
|
| 149 | + $vname = $value['label']; |
|
| 150 | + } |
|
| 149 | 151 | $fields .= str_replace(':', '', translate($vname, $focus->module_dir)); |
| 150 | 152 | |
| 151 | 153 | if($index < $field_count) |
@@ -155,8 +157,7 @@ discard block |
||
| 155 | 157 | } |
| 156 | 158 | |
| 157 | 159 | echo $start_tag.translate('LBL_AUDITED_FIELDS', 'Audit').$fields.$end_tag; |
| 158 | - } |
|
| 159 | - else |
|
| 160 | + } else |
|
| 160 | 161 | { |
| 161 | 162 | echo $start_tag.translate('LBL_AUDITED_FIELDS', 'Audit').$end_tag; |
| 162 | 163 | } |
@@ -167,8 +168,7 @@ discard block |
||
| 167 | 168 | { |
| 168 | 169 | $before_value = $audit['before_value_text']; |
| 169 | 170 | $after_value = $audit['after_value_text']; |
| 170 | - } |
|
| 171 | - else { |
|
| 171 | + } else { |
|
| 172 | 172 | $before_value = $audit['before_value_string']; |
| 173 | 173 | $after_value = $audit['after_value_string']; |
| 174 | 174 | } |
@@ -198,8 +198,7 @@ discard block |
||
| 198 | 198 | //todo move to themes |
| 199 | 199 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
| 200 | 200 | $xtpl->assign("BG_COLOR", $odd_bg); |
| 201 | - } |
|
| 202 | - else |
|
| 201 | + } else |
|
| 203 | 202 | { |
| 204 | 203 | //todo move to themes |
| 205 | 204 | $xtpl->assign("ROW_COLOR", 'evenListRow'); |