Completed
Push — develop ( 0c0e51 )
by Adam
26:01 queued 12:43
created
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.
include/Smarty/plugins/shared.make_timestamp.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     } elseif (preg_match('/^\d{14}$/', $string)) {
24 24
         // it is mysql timestamp format of YYYYMMDDHHMMSS?            
25 25
         $time = mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
26
-                       substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
26
+                        substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
27 27
         
28 28
     } elseif (is_numeric($string)) {
29 29
         // it is a numeric string, we handle it as timestamp
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.in_array.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
  */
45 45
 function smarty_modifier_in_array($needle = null, $haystack = null)
46 46
 {
47
-	//Smarty barfs if Array is empty
47
+    //Smarty barfs if Array is empty
48 48
     if($haystack == null || empty($haystack)) {
49
-       return false;	
49
+        return false;	
50 50
     }
51 51
     return in_array($needle, $haystack);
52 52
 }
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_email_btn.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -39,24 +39,24 @@
 block discarded – undo
39 39
 
40 40
 
41 41
 
42
- /**
43
- * smarty_function_sugar_email_btn
44
- * This is the constructor for the Smarty plugin.
45
- * This function exists so that the proper email button based on user prefs is loaded into the quotes module.
46
- * 
47
- * @param $params The runtime Smarty key/value arguments
48
- * @param $smarty The reference to the Smarty object used in this invocation
49
- */
42
+    /**
43
+     * smarty_function_sugar_email_btn
44
+     * This is the constructor for the Smarty plugin.
45
+     * This function exists so that the proper email button based on user prefs is loaded into the quotes module.
46
+     * 
47
+     * @param $params The runtime Smarty key/value arguments
48
+     * @param $smarty The reference to the Smarty object used in this invocation
49
+     */
50 50
 function smarty_function_sugar_email_btn($params, &$smarty)
51 51
 {
52
-	global $app_strings, $current_user;
53
-	$pdfButtons = '';
54
-	$client = $current_user->getPreference('email_link_type');
55
-	if ($client != 'sugar') {
56
-		$pdfButtons = '<input title="'. $app_strings["LBL_EMAIL_COMPOSE"] . '" class="button" type="submit" name="button" value="'. $app_strings["LBL_EMAIL_COMPOSE"] . '" onclick="location.href=\'mailto:\';return false;"> ';
57
-	} else {
58
-		$pdfButtons = '<input id="email_as_pdf_button" title="'. $app_strings["LBL_EMAIL_PDF_BUTTON_TITLE"] . '" class="button" type="submit" name="button" value="'. $app_strings["LBL_EMAIL_PDF_BUTTON_LABEL"] . '" onclick="this.form.email_action.value=\'EmailLayout\';"> ';
59
-	}
60
-	return $pdfButtons;
52
+    global $app_strings, $current_user;
53
+    $pdfButtons = '';
54
+    $client = $current_user->getPreference('email_link_type');
55
+    if ($client != 'sugar') {
56
+        $pdfButtons = '<input title="'. $app_strings["LBL_EMAIL_COMPOSE"] . '" class="button" type="submit" name="button" value="'. $app_strings["LBL_EMAIL_COMPOSE"] . '" onclick="location.href=\'mailto:\';return false;"> ';
57
+    } else {
58
+        $pdfButtons = '<input id="email_as_pdf_button" title="'. $app_strings["LBL_EMAIL_PDF_BUTTON_TITLE"] . '" class="button" type="submit" name="button" value="'. $app_strings["LBL_EMAIL_PDF_BUTTON_LABEL"] . '" onclick="this.form.email_action.value=\'EmailLayout\';"> ';
59
+    }
60
+    return $pdfButtons;
61 61
 }
62 62
 ?>
Please login to merge, or discard this patch.
include/Smarty/plugins/modifier.lookup.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 
43 43
 
44 44
 function smarty_modifier_lookup($value='', $from=array()){
45
-	$value = trim($value);
46
-	if (array_key_exists($value, $from)) { 
47
-		return $from[$value]; 
48
-	} 
49
-	return ''; 
45
+    $value = trim($value);
46
+    if (array_key_exists($value, $from)) { 
47
+        return $from[$value]; 
48
+    } 
49
+    return ''; 
50 50
 } 
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugarvar_connector.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,14 +74,14 @@
 block discarded – undo
74 74
 
75 75
 function smarty_function_sugarvar_connector($params, &$smarty) {
76 76
       
77
-      $displayParams = $smarty->get_template_vars('displayParams');
78
-      if(!isset($displayParams['module'])) {
79
-         $smarty->trigger_error("sugarvar_connector: missing 'module' parameter");
80
-         $GLOBALS['log']->error("sugarvar_connector: missing 'module' parameter");
81
-         return;     	
82
-      }
77
+        $displayParams = $smarty->get_template_vars('displayParams');
78
+        if(!isset($displayParams['module'])) {
79
+            $smarty->trigger_error("sugarvar_connector: missing 'module' parameter");
80
+            $GLOBALS['log']->error("sugarvar_connector: missing 'module' parameter");
81
+            return;     	
82
+        }
83 83
       
84
-      require_once('include/connectors/utils/ConnectorUtils.php');
85
-      echo ConnectorUtils::getConnectorButtonScript($displayParams, $smarty);
84
+        require_once('include/connectors/utils/ConnectorUtils.php');
85
+        echo ConnectorUtils::getConnectorButtonScript($displayParams, $smarty);
86 86
 }
87 87
 ?>
88 88
\ No newline at end of file
Please login to merge, or discard this patch.
include/Smarty/plugins/function.sugar_include.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -57,33 +57,33 @@
 block discarded – undo
57 57
     global $app_strings;
58 58
 
59 59
     if(isset($params['type']) && $params['type'] == 'php') {
60
-		if(!isset($params['file'])) {
61
-		   $smarty->trigger_error($app_strings['ERR_MISSING_REQUIRED_FIELDS'] . 'include');
62
-		} 
60
+        if(!isset($params['file'])) {
61
+            $smarty->trigger_error($app_strings['ERR_MISSING_REQUIRED_FIELDS'] . 'include');
62
+        } 
63 63
 		
64
-		$includeFile = $params['file'];
65
-		if(!file_exists($includeFile)) {
66
-		   $smarty->trigger_error($app_strings['ERR_NO_SUCH_FILE'] . ': ' . $includeFile);
67
-		}
64
+        $includeFile = $params['file'];
65
+        if(!file_exists($includeFile)) {
66
+            $smarty->trigger_error($app_strings['ERR_NO_SUCH_FILE'] . ': ' . $includeFile);
67
+        }
68 68
 		
69
-	    ob_start();
70
-	    require($includeFile);
71
-	    $output_html = ob_get_contents();
72
-	    ob_end_clean();
73
-	    echo $output_html; 
69
+        ob_start();
70
+        require($includeFile);
71
+        $output_html = ob_get_contents();
72
+        ob_end_clean();
73
+        echo $output_html; 
74 74
     } else if(is_array($params['include'])) {
75
-	   	  $code = '';
76
-	   	  foreach($params['include'] as $include) {
77
-	   	  	      if(isset($include['file'])) {
78
-	   	  	         $file = $include['file'];
79
-	   	  	         if(preg_match('/[\.]js$/si',$file)) {
80
-	   	  	            $code .= "<script src=\"". getJSPath($include['file']) ."\"></script>";
81
-	   	  	         } else if(preg_match('/[\.]php$/si', $file)) {
82
-	   	  	            require_once($file);	
83
-	   	  	         }
84
-	   	  	      } 
85
-	   	  } //foreach
86
-	      return $code;
87
-   	} //if
75
+                $code = '';
76
+                foreach($params['include'] as $include) {
77
+                        if(isset($include['file'])) {
78
+                            $file = $include['file'];
79
+                            if(preg_match('/[\.]js$/si',$file)) {
80
+                                $code .= "<script src=\"". getJSPath($include['file']) ."\"></script>";
81
+                            } else if(preg_match('/[\.]php$/si', $file)) {
82
+                                require_once($file);	
83
+                            }
84
+                        } 
85
+                } //foreach
86
+            return $code;
87
+        } //if
88 88
 }
89 89
 ?>
90 90
\ No newline at end of file
Please login to merge, or discard this patch.