Test Failed
Push — CI ( 785a66...02428e )
by Adam
54:23
created
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.
include/Smarty/plugins/function.sugar_getlink.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -51,29 +51,29 @@
 block discarded – undo
51 51
 
52 52
 function smarty_function_sugar_getlink($params, &$smarty) {
53 53
 
54
-	// error checking for required parameters
55
-	if(!isset($params['url'])) 
56
-		$smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'url');
57
-	if(!isset($params['title']))
58
-		$smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'title');
54
+    // error checking for required parameters
55
+    if(!isset($params['url'])) 
56
+        $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'url');
57
+    if(!isset($params['title']))
58
+        $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'title');
59 59
 
60
-	// set defaults
61
-	if(!isset($params['attr']))
62
-		$params['attr'] = '';
63
-	if(!isset($params['img_name'])) 
64
-		$params['img_name'] = '';
65
-	if(!isset($params['img_attr']))
66
-		$params['img_attr'] = '';
67
-	if(!isset($params['img_width']))
68
-		$params['img_width'] = null;
69
-	if(!isset($params['img_height']))
70
-		$params['height'] = null;
71
-	if(!isset($params['img_placement']))
72
-		$params['img_placement'] = 'imageonly';
73
-	if(!isset($params['img_alt']))
74
-		$params['img_alt'] = '';
60
+    // set defaults
61
+    if(!isset($params['attr']))
62
+        $params['attr'] = '';
63
+    if(!isset($params['img_name'])) 
64
+        $params['img_name'] = '';
65
+    if(!isset($params['img_attr']))
66
+        $params['img_attr'] = '';
67
+    if(!isset($params['img_width']))
68
+        $params['img_width'] = null;
69
+    if(!isset($params['img_height']))
70
+        $params['height'] = null;
71
+    if(!isset($params['img_placement']))
72
+        $params['img_placement'] = 'imageonly';
73
+    if(!isset($params['img_alt']))
74
+        $params['img_alt'] = '';
75 75
 
76
-	return SugarThemeRegistry::current()->getLink($params['url'], $params['title'], $params['attr'], $params['img_name'], 
77
-		$params['img_attr'], $params['img_width'], $params['img_height'], $params['img_alt'], $params['img_placement']);	
76
+    return SugarThemeRegistry::current()->getLink($params['url'], $params['title'], $params['attr'], $params['img_name'], 
77
+        $params['img_attr'], $params['img_width'], $params['img_height'], $params['img_alt'], $params['img_placement']);	
78 78
 }
79 79
 ?>
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_connector_display.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@
 block discarded – undo
102 102
     $field = $params['field'];
103 103
     $type = $bean->field_name_map[$field]['type'];
104 104
     if($type == 'text') {
105
-       echo strlen($bean->$field) > 50 ? substr($bean->$field, 0, 47) . '...' : $bean->field;
105
+        echo strlen($bean->$field) > 50 ? substr($bean->$field, 0, 47) . '...' : $bean->field;
106 106
     } else if($type == 'link') {
107
-       echo "<a href='{$bean->$field}' target='_blank'>{$bean->$field}</a>"; 
107
+        echo "<a href='{$bean->$field}' target='_blank'>{$bean->$field}</a>"; 
108 108
     } else {
109
-       echo $bean->$field;
109
+        echo $bean->$field;
110 110
     }
111 111
 }
112 112
 
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_getjspath.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
  */
44 44
 function smarty_function_sugar_getjspath($params, &$smarty)
45 45
 {
46
-	if(!isset($params['file'])) {
47
-		   $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
48
-	}
49
- 	return getJSPath($params['file']);
46
+    if(!isset($params['file'])) {
47
+            $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
48
+    }
49
+        return getJSPath($params['file']);
50 50
 }
51 51
 ?>
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_currency_format.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,19 +64,19 @@
 block discarded – undo
64 64
 function smarty_function_sugar_currency_format($params, &$smarty) {
65 65
 
66 66
     // Bug #47406 : Currency field doesn't accept 0.00 as default value
67
-	if(!isset($params['var']) || $params['var'] === '') {
67
+    if(!isset($params['var']) || $params['var'] === '') {
68 68
         return '';
69 69
     } 
70 70
     
71 71
     global $locale;
72 72
     if(empty($params['currency_id'])){
73
-    	$params['currency_id'] = $locale->getPrecedentPreference('currency');
74
-    	if(!isset($params['convert'])) {
75
-    	    $params['convert'] = true;
76
-    	}
77
-    	if(!isset($params['currency_symbol'])) {
78
-    	   $params['currency_symbol'] = $locale->getPrecedentPreference('default_currency_symbol');
79
-    	}
73
+        $params['currency_id'] = $locale->getPrecedentPreference('currency');
74
+        if(!isset($params['convert'])) {
75
+            $params['convert'] = true;
76
+        }
77
+        if(!isset($params['currency_symbol'])) {
78
+            $params['currency_symbol'] = $locale->getPrecedentPreference('default_currency_symbol');
79
+        }
80 80
     }
81 81
    
82 82
     $_contents = currency_format_number($params['var'], $params);
Please login to merge, or discard this patch.
include/Smarty/plugins/function.multienum_to_array.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,29 +65,29 @@
 block discarded – undo
65 65
  */
66 66
 function smarty_function_multienum_to_array($params, &$smarty)
67 67
 {
68
-	$ret = "";
69
-	if(empty($params['string'])) {
68
+    $ret = "";
69
+    if(empty($params['string'])) {
70 70
         if (empty($params['default']))
71 71
             $ret = array();
72 72
         else if(is_array($params['default']))
73 73
             $ret = $params['default'];
74 74
         else
75
-           $ret = unencodeMultienum($params['default']);
75
+            $ret = unencodeMultienum($params['default']);
76 76
     } else {
77
-    	if (is_array($params['string']))
78
-    	  $ret = $params['string'];
79
-    	else
80
-    	  $ret = unencodeMultienum($params['string']);
77
+        if (is_array($params['string']))
78
+            $ret = $params['string'];
79
+        else
80
+            $ret = unencodeMultienum($params['string']);
81 81
     }
82 82
 	
83 83
     
84
-	if (!empty($params['assign']))
85
-	{
86
-		$smarty->assign($params['assign'], $ret);
87
-		return "";
88
-	}
84
+    if (!empty($params['assign']))
85
+    {
86
+        $smarty->assign($params['assign'], $ret);
87
+        return "";
88
+    }
89 89
 	
90
-	return ($ret);
90
+    return ($ret);
91 91
 }
92 92
 
93 93
 ?>
Please login to merge, or discard this patch.