Completed
Push — develop ( 695bbe )
by Adam
37:32 queued 21:39
created
include/Smarty/plugins/function.sugar_button_slider.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
    	  	foreach($buttons as $val => $button){
44 44
    	  		$str .= smarty_function_sugar_button(array('module' => $module, 'id' => $button, 'view' => $view), $smarty);
45 45
    	  	}
46
-   	  }else{
46
+   	  } else{
47 47
    	  	$str  = '<div id="buttonSlide" class="yui-module">';
48 48
    	  	$str .= '<table border="0">';
49 49
    	  	$str .='<tr><td>';
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.default.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,11 +21,12 @@
 block discarded – undo
21 21
  */
22 22
 function smarty_modifier_default($string, $default = '')
23 23
 {
24
-    if (!isset($string) || $string === '')
25
-        return $default;
26
-    else
27
-        return $string;
28
-}
24
+    if (!isset($string) || $string === '') {
25
+            return $default;
26
+    } else {
27
+            return $string;
28
+    }
29
+    }
29 30
 
30 31
 /* vim: set expandtab: */
31 32
 
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.count_characters.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
  */
22 22
 function smarty_modifier_count_characters($string, $include_spaces = false)
23 23
 {
24
-    if ($include_spaces)
25
-       return(strlen($string));
24
+    if ($include_spaces) {
25
+           return(strlen($string));
26
+    }
26 27
 
27 28
     return preg_match_all("/[^\s]/",$string, $match);
28 29
 }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_translate.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,11 +69,12 @@
 block discarded – undo
69 69
 
70 70
 	$module = (isset($params['module']))? $params['module']: '';
71 71
     if(isset($params['select'])){
72
-    	if(empty($params['select']))
73
-		    $value = "";
74
-		else
75
-		    $value = translate($params['label'] , $module, $params['select']);
76
-	}else{
72
+    	if(empty($params['select'])) {
73
+    			    $value = "";
74
+    	} else {
75
+				    $value = translate($params['label'] , $module, $params['select']);
76
+		}
77
+	} else{
77 78
 		$value = translate($params['label'] , $module);
78 79
     }
79 80
     if (!empty($params['for_js']) && $params['for_js']) {
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_evalcolumn.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,10 +69,12 @@
 block discarded – undo
69 69
 function smarty_function_sugar_evalcolumn($params, &$smarty)
70 70
 {
71 71
     if (!isset($params['colData']['field']) ) {
72
-        if(empty($params['colData']))  
73
-            $smarty->trigger_error("evalcolumn: missing 'colData' parameter");
74
-        if(!isset($params['colData']['field']))  
75
-            $smarty->trigger_error("evalcolumn: missing 'colData.field' parameter");
72
+        if(empty($params['colData'])) {
73
+                    $smarty->trigger_error("evalcolumn: missing 'colData' parameter");
74
+        }
75
+        if(!isset($params['colData']['field'])) {
76
+                    $smarty->trigger_error("evalcolumn: missing 'colData.field' parameter");
77
+        }
76 78
         return;
77 79
     }
78 80
 
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_action_menu.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -129,8 +131,9 @@  discard block
 block discarded – undo
129 131
     }
130 132
     $flat = isset($params['flat']) ? $params['flat'] : (isset($sugar_config['enable_action_menu']) ? !$sugar_config['enable_action_menu'] : false);
131 133
     //if buttons have not implemented, it returns empty string;
132
-    if(empty($params['buttons']))
133
-        return '';
134
+    if(empty($params['buttons'])) {
135
+            return '';
136
+    }
134 137
 
135 138
     if(is_array($params['buttons']) && !$flat) {
136 139
 
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_field.php 1 patch
Braces   +30 added lines, -14 removed lines patch added patch discarded remove patch
@@ -55,31 +55,47 @@
 block discarded – undo
55 55
 function smarty_function_sugar_field($params, &$smarty)
56 56
 {
57 57
     if (!isset($params['vardef']) || !isset($params['displayType']) || !isset($params['parentFieldArray'])) {
58
-        if(!isset($params['vardef']))
59
-            $smarty->trigger_error("sugar_field: missing 'vardef' parameter");
60
-        if(!isset($params['displayType']))  
61
-            $smarty->trigger_error("sugar_field: missing 'displayType' parameter");
62
-        if(!isset($params['parentFieldArray']))  
63
-            $smarty->trigger_error("sugar_field: missing 'parentFieldArray' parameter");
58
+        if(!isset($params['vardef'])) {
59
+                    $smarty->trigger_error("sugar_field: missing 'vardef' parameter");
60
+        }
61
+        if(!isset($params['displayType'])) {
62
+                    $smarty->trigger_error("sugar_field: missing 'displayType' parameter");
63
+        }
64
+        if(!isset($params['parentFieldArray'])) {
65
+                    $smarty->trigger_error("sugar_field: missing 'parentFieldArray' parameter");
66
+        }
64 67
                              
65 68
         return;
66 69
     }
67 70
 
68 71
     static $sfh;
69
-    if(!isset($sfh)) $sfh = new SugarFieldHandler();
72
+    if(!isset($sfh)) {
73
+        $sfh = new SugarFieldHandler();
74
+    }
70 75
     
71
-    if(!isset($params['displayParams'])) $displayParams = array();
72
-    else $displayParams = $params['displayParams'];
76
+    if(!isset($params['displayParams'])) {
77
+        $displayParams = array();
78
+    } else {
79
+        $displayParams = $params['displayParams'];
80
+    }
73 81
     
74
-    if(isset($params['labelSpan'])) $displayParams['labelSpan'] = $params['labelSpan'];
75
-    else $displayParams['labelSpan'] = null;
76
-    if(isset($params['fieldSpan'])) $displayParams['fieldSpan'] = $params['fieldSpan'];
77
-    else $displayParams['fieldSpan'] = null;
82
+    if(isset($params['labelSpan'])) {
83
+        $displayParams['labelSpan'] = $params['labelSpan'];
84
+    } else {
85
+        $displayParams['labelSpan'] = null;
86
+    }
87
+    if(isset($params['fieldSpan'])) {
88
+        $displayParams['fieldSpan'] = $params['fieldSpan'];
89
+    } else {
90
+        $displayParams['fieldSpan'] = null;
91
+    }
78 92
 
79 93
     if(isset($params['typeOverride'])) { // override the type in the vardef?
80 94
         $params['vardef']['type'] = $params['typeOverride']; 
81 95
     }
82
-    if(isset($params['formName'])) $displayParams['formName'] = $params['formName'];
96
+    if(isset($params['formName'])) {
97
+        $displayParams['formName'] = $params['formName'];
98
+    }
83 99
     
84 100
     if(isset($params['field'])) {
85 101
         $params['vardef']['name'] = $params['field'];
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_variable_constructor.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,20 +46,22 @@
 block discarded – undo
46 46
 function smarty_function_sugar_variable_constructor($params, &$smarty)
47 47
 {
48 48
     if (!isset($params['objectName']) || !isset($params['memberName']) || !isset($params['key'])) {
49
-        if(!isset($params['objectName']))  
50
-            $smarty->trigger_error("sugar_variable_constructor: missing 'objectName' parameter");
51
-        if(!isset($params['memberName']))  
52
-            $smarty->trigger_error("sugar_variable_constructor: missing 'memberName' parameter");
53
-        if(!isset($params['key']))  
54
-            $smarty->trigger_error("sugar_variable_constructor: missing 'key' parameter");
49
+        if(!isset($params['objectName'])) {
50
+                    $smarty->trigger_error("sugar_variable_constructor: missing 'objectName' parameter");
51
+        }
52
+        if(!isset($params['memberName'])) {
53
+                    $smarty->trigger_error("sugar_variable_constructor: missing 'memberName' parameter");
54
+        }
55
+        if(!isset($params['key'])) {
56
+                    $smarty->trigger_error("sugar_variable_constructor: missing 'key' parameter");
57
+        }
55 58
                 
56 59
         return;
57 60
     }
58 61
 
59 62
     if(isset($params['stringFormat'])) {
60 63
         $_contents =  '$'. $params['objectName'] . '.' . $params['memberName'] . '.' . $params['key'];
61
-    }
62
-    else {
64
+    } else {
63 65
         $_contents = '{$' . $params['objectName'] . '.' . $params['memberName'] . '.' . $params['key'] . '}';
64 66
     }
65 67
     
Please login to merge, or discard this patch.
include/Smarty/plugins/function.mailto.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,9 @@
 block discarded – undo
70 70
             case 'cc':
71 71
             case 'bcc':
72 72
             case 'followupto':
73
-                if (!empty($value))
74
-                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
73
+                if (!empty($value)) {
74
+                                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
75
+                }
75 76
                 break;
76 77
                 
77 78
             case 'subject':
Please login to merge, or discard this patch.