Completed
Push — develop ( 695bbe )
by Adam
37:32 queued 21:39
created
include/Smarty/plugins/modifier.strip_semicolon.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,6 @@
 block discarded – undo
54 54
  */
55 55
 function smarty_modifier_strip_semicolon($text)
56 56
 {
57
-	return preg_replace("/([:]|\xEF\xBC\x9A)[\\s]*$/", '', trim($text));
57
+    return preg_replace("/([:]|\xEF\xBC\x9A)[\\s]*$/", '', trim($text));
58 58
 }
59 59
 ?>
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_help.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,15 +72,15 @@
 block discarded – undo
72 72
 function smarty_function_sugar_help($params, &$smarty)
73 73
 {
74 74
     $text = str_replace("'","\'",htmlspecialchars($params['text']));
75
-	//append any additional parameters.
76
-	$click  = "return SUGAR.util.showHelpTips(this,'$text'";
75
+    //append any additional parameters.
76
+    $click  = "return SUGAR.util.showHelpTips(this,'$text'";
77 77
 
78
-	if (count( $params) > 1){
78
+    if (count( $params) > 1){
79 79
 
80
-			$click .=",'".$params['myPos']."','".$params['atPos']."'";
81
-	}
80
+            $click .=",'".$params['myPos']."','".$params['atPos']."'";
81
+    }
82 82
     $helpImage = SugarThemeRegistry::current()->getImageURL('helpInline.png');
83
-	$click .= " );" ;
83
+    $click .= " );" ;
84 84
     $alt_tag = $GLOBALS['app_strings']['LBL_ALT_INFO'];
85 85
     return <<<EOHTML
86 86
 <img border="0"
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.default_date_value.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,8 +207,8 @@
 block discarded – undo
207 207
  * @return String representing date value
208 208
  */
209 209
 function smarty_modifier_default_date_value($defaultValue) {
210
-	global $timedate;
211
-	require_once('modules/DynamicFields/templates/Fields/TemplateDate.php');
212
-	$td = new TemplateDate();
213
-	return $timedate->asUser(new SugarDateTime($td->dateStrings[$defaultValue]));
210
+    global $timedate;
211
+    require_once('modules/DynamicFields/templates/Fields/TemplateDate.php');
212
+    $td = new TemplateDate();
213
+    return $timedate->asUser(new SugarDateTime($td->dateStrings[$defaultValue]));
214 214
 }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_getwebpath.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
  */
46 46
 function smarty_function_sugar_getwebpath($params, &$smarty)
47 47
 {
48
-	if(!isset($params['file'])) {
49
-		   $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
50
-	} 
51
- 	return getWebPath($params['file']);
48
+    if(!isset($params['file'])) {
49
+            $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
50
+    } 
51
+        return getWebPath($params['file']);
52 52
 }
53 53
 ?>
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.html_select_time.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         }
101 101
         $html_result .= '>'."\n";
102 102
         $html_result .= smarty_function_html_options(array('output'          => $hours,
103
-                                                           'values'          => $hours,
104
-                                                           'selected'      => strftime($hour_fmt, $time),
105
-                                                           'print_result' => false),
106
-                                                     $smarty);
103
+                                                            'values'          => $hours,
104
+                                                            'selected'      => strftime($hour_fmt, $time),
105
+                                                            'print_result' => false),
106
+                                                        $smarty);
107 107
         $html_result .= "</select>\n";
108 108
     }
109 109
 
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
         $html_result .= '>'."\n";
128 128
         
129 129
         $html_result .= smarty_function_html_options(array('output'          => $minutes,
130
-                                                           'values'          => $minutes,
131
-                                                           'selected'      => $selected,
132
-                                                           'print_result' => false),
133
-                                                     $smarty);
130
+                                                            'values'          => $minutes,
131
+                                                            'selected'      => $selected,
132
+                                                            'print_result' => false),
133
+                                                        $smarty);
134 134
         $html_result .= "</select>\n";
135 135
     }
136 136
 
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
         $html_result .= '>'."\n";
156 156
         
157 157
         $html_result .= smarty_function_html_options(array('output'          => $seconds,
158
-                                                           'values'          => $seconds,
159
-                                                           'selected'      => $selected,
160
-                                                           'print_result' => false),
161
-                                                     $smarty);
158
+                                                            'values'          => $seconds,
159
+                                                            'selected'      => $selected,
160
+                                                            'print_result' => false),
161
+                                                        $smarty);
162 162
         $html_result .= "</select>\n";
163 163
     }
164 164
 
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
         $html_result .= '>'."\n";
180 180
         
181 181
         $html_result .= smarty_function_html_options(array('output'          => array('AM', 'PM'),
182
-                                                           'values'          => array('am', 'pm'),
183
-                                                           'selected'      => strtolower(strftime('%p', $time)),
184
-                                                           'print_result' => false),
185
-                                                     $smarty);
182
+                                                            'values'          => array('am', 'pm'),
183
+                                                            'selected'      => strtolower(strftime('%p', $time)),
184
+                                                            'print_result' => false),
185
+                                                        $smarty);
186 186
         $html_result .= "</select>\n";
187 187
     }
188 188
 
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.multienum_to_ac.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -41,29 +41,29 @@
 block discarded – undo
41 41
 
42 42
 
43 43
 function smarty_modifier_multienum_to_ac($value='', $field_options=array()){
44
-	$value = trim($value);
45
-	if(empty($value) || empty($field_options)){
46
-		return '';
47
-	}
44
+    $value = trim($value);
45
+    if(empty($value) || empty($field_options)){
46
+        return '';
47
+    }
48 48
 	
49
-	$expl = explode("^,^", $value);
50
-	if(count($expl) == 1){
51
-		if(array_key_exists($value, $field_options)){
52
-			return $field_options[$value] . ", ";
53
-		}
54
-		else{
55
-			return '';
56
-		}
57
-	}
58
-	else{
59
-		$final_array = array();
60
-		foreach($expl as $key_val){
61
-			if(array_key_exists($key_val, $field_options)){
62
-				$final_array[] = $field_options[$key_val];
63
-			}
64
-		}
65
-		return implode(", ", $final_array) . ", ";
66
-	}
49
+    $expl = explode("^,^", $value);
50
+    if(count($expl) == 1){
51
+        if(array_key_exists($value, $field_options)){
52
+            return $field_options[$value] . ", ";
53
+        }
54
+        else{
55
+            return '';
56
+        }
57
+    }
58
+    else{
59
+        $final_array = array();
60
+        foreach($expl as $key_val){
61
+            if(array_key_exists($key_val, $field_options)){
62
+                $final_array[] = $field_options[$key_val];
63
+            }
64
+        }
65
+        return implode(", ", $final_array) . ", ";
66
+    }
67 67
 	
68
-	return '';
68
+    return '';
69 69
 }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_ajax_url.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 function smarty_function_sugar_ajax_url($params, &$smarty)
45 45
 {
46 46
     if(empty($params['url'])) {
47
-   	    $smarty->trigger_error("ajax_url: missing required param (module)");
47
+            $smarty->trigger_error("ajax_url: missing required param (module)");
48 48
         return "";
49 49
     }
50 50
     return ajaxLink($params['url']);
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_link.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -76,43 +76,43 @@
 block discarded – undo
76 76
 
77 77
 function smarty_function_sugar_link($params, &$smarty)
78 78
 {
79
-	if(empty($params['module'])){
80
-		$smarty->trigger_error("sugar_link: missing 'module' parameter");
81
-		return;
82
-	}
83
-	if(!empty($params['data']) && is_array($params['data'])){
84
-		$link_url = 'index.php?';
85
-		$link_url .= 'module=iFrames&action=index';
86
-		$link_url .= '&record='.$params['data']['0'];
87
-		$link_url .= '&tab=true';
79
+    if(empty($params['module'])){
80
+        $smarty->trigger_error("sugar_link: missing 'module' parameter");
81
+        return;
82
+    }
83
+    if(!empty($params['data']) && is_array($params['data'])){
84
+        $link_url = 'index.php?';
85
+        $link_url .= 'module=iFrames&action=index';
86
+        $link_url .= '&record='.$params['data']['0'];
87
+        $link_url .= '&tab=true';
88 88
     }else{
89
-		$action = (!empty($params['action']))?$params['action']:'index';
89
+        $action = (!empty($params['action']))?$params['action']:'index';
90 90
 	    
91
-	    $link_url = 'index.php?';
92
-	    $link_url .= 'module='.$params['module'].'&action='.$action;
91
+        $link_url = 'index.php?';
92
+        $link_url .= 'module='.$params['module'].'&action='.$action;
93 93
 	
94
-	    if (!empty($params['record'])) { $link_url .= "&record=".$params['record']; }
95
-	    if (!empty($params['extraparams'])) { $link_url .= '&'.$params['extraparams']; }
96
-	}
94
+        if (!empty($params['record'])) { $link_url .= "&record=".$params['record']; }
95
+        if (!empty($params['extraparams'])) { $link_url .= '&'.$params['extraparams']; }
96
+    }
97 97
 	
98
-	if (isset($params['link_only']) && $params['link_only'] == 1 ) {
98
+    if (isset($params['link_only']) && $params['link_only'] == 1 ) {
99 99
         // Let them just get the url, they want to put it someplace
100 100
         return ajaxLink($link_url);
101 101
     }
102 102
 	
103
-	$id = (!empty($params['id']))?' id="'.$params['id'].'"':'';
104
-	$class = (!empty($params['class']))?' class="'.$params['class'].'"':'';
105
-	$style = (!empty($params['style']))?' style="'.$params['style'].'"':'';
106
-	$title = (!empty($params['title']))?' title="'.$params['title'].'"':'';
103
+    $id = (!empty($params['id']))?' id="'.$params['id'].'"':'';
104
+    $class = (!empty($params['class']))?' class="'.$params['class'].'"':'';
105
+    $style = (!empty($params['style']))?' style="'.$params['style'].'"':'';
106
+    $title = (!empty($params['title']))?' title="'.$params['title'].'"':'';
107 107
     $module = ' module="'.$params['module'].'"';
108
-	$accesskey = (!empty($params['accesskey']))?' accesskey="'.$params['accesskey'].'" ':'';
108
+    $accesskey = (!empty($params['accesskey']))?' accesskey="'.$params['accesskey'].'" ':'';
109 109
     $options = (!empty($params['options']))?' '.$params['options'].'':'';
110 110
     if(!empty($params['data']) && is_array($params['data']))
111
-		$label =$params['data']['4'];
112
-	elseif ( !empty($params['label']) )
113
-	    $label = $params['label'];
114
-	else
115
-	    $label = (!empty($GLOBALS['app_list_strings']['moduleList'][$params['module']]))?$GLOBALS['app_list_strings']['moduleList'][$params['module']]:$params['module'];
111
+        $label =$params['data']['4'];
112
+    elseif ( !empty($params['label']) )
113
+        $label = $params['label'];
114
+    else
115
+        $label = (!empty($GLOBALS['app_list_strings']['moduleList'][$params['module']]))?$GLOBALS['app_list_strings']['moduleList'][$params['module']]:$params['module'];
116 116
 
117 117
     $link = '<a href="'.ajaxLink($link_url).'"'.$id.$class.$style.$options.$title.$module.'>'.$label.'</a>';
118 118
     return $link;
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.regex_replace.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 function smarty_modifier_regex_replace($string, $search, $replace)
24 24
 {
25 25
     if(is_array($search)) {
26
-      foreach($search as $idx => $s)
26
+        foreach($search as $idx => $s)
27 27
         $search[$idx] = _smarty_regex_replace_check($s);
28 28
     } else {
29
-      $search = _smarty_regex_replace_check($search);
29
+        $search = _smarty_regex_replace_check($search);
30 30
     }       
31 31
 
32 32
     return preg_replace($search, $replace, $string);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 function _smarty_regex_replace_check($search)
36 36
 {
37 37
     if (($pos = strpos($search,"\0")) !== false)
38
-      $search = substr($search,0,$pos);
38
+        $search = substr($search,0,$pos);
39 39
     if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
40 40
         /* remove eval-modifier from $search */
41 41
         $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
Please login to merge, or discard this patch.