@@ -33,11 +33,12 @@ |
||
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits) |
|
| 37 | - return ucfirst($string[0]); |
|
| 38 | - else |
|
| 39 | - return $string[0]; |
|
| 40 | -} |
|
| 36 | + if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits) { |
|
| 37 | + return ucfirst($string[0]); |
|
| 38 | + } else { |
|
| 39 | + return $string[0]; |
|
| 40 | + } |
|
| 41 | + } |
|
| 41 | 42 | |
| 42 | 43 | |
| 43 | 44 | ?> |
@@ -66,10 +66,11 @@ |
||
| 66 | 66 | $counter['direction'] = $params['direction']; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - if ($counter['direction'] == "down") |
|
| 70 | - $counter['count'] -= $counter['skip']; |
|
| 71 | - else |
|
| 72 | - $counter['count'] += $counter['skip']; |
|
| 69 | + if ($counter['direction'] == "down") { |
|
| 70 | + $counter['count'] -= $counter['skip']; |
|
| 71 | + } else { |
|
| 72 | + $counter['count'] += $counter['skip']; |
|
| 73 | + } |
|
| 73 | 74 | |
| 74 | 75 | return $retval; |
| 75 | 76 | |
@@ -27,8 +27,9 @@ |
||
| 27 | 27 | function smarty_modifier_truncate($string, $length = 80, $etc = '...', |
| 28 | 28 | $break_words = false, $middle = false) |
| 29 | 29 | { |
| 30 | - if ($length == 0) |
|
| 31 | - return ''; |
|
| 30 | + if ($length == 0) { |
|
| 31 | + return ''; |
|
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | if (strlen($string) > $length) { |
| 34 | 35 | $length -= min($length, strlen($etc)); |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | // non-standard char, escape it |
| 80 | 80 | if($_ord >= 126){ |
| 81 | 81 | $_res .= '&#' . $_ord . ';'; |
| 82 | - } |
|
| 83 | - else { |
|
| 82 | + } else { |
|
| 84 | 83 | $_res .= substr($string, $_i, 1); |
| 85 | 84 | } |
| 86 | 85 | } |
@@ -64,11 +64,13 @@ |
||
| 64 | 64 | function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) { |
| 65 | 65 | $_len = strlen($search_str); |
| 66 | 66 | $_pos = 0; |
| 67 | - for ($_i=0, $_count=count($replace); $_i<$_count; $_i++) |
|
| 68 | - if (($_pos=strpos($subject, $search_str, $_pos))!==false) |
|
| 67 | + for ($_i=0, $_count=count($replace); $_i<$_count; $_i++) { |
|
| 68 | + if (($_pos=strpos($subject, $search_str, $_pos))!==false) |
|
| 69 | 69 | $subject = substr_replace($subject, $replace[$_i], $_pos, $_len); |
| 70 | - else |
|
| 71 | - break; |
|
| 70 | + } |
|
| 71 | + else { |
|
| 72 | + break; |
|
| 73 | + } |
|
| 72 | 74 | |
| 73 | 75 | } |
| 74 | 76 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | if(empty($params['memberName'])){ |
| 81 | 81 | $member = $smarty->get_template_vars('vardef'); |
| 82 | 82 | $member = $member['name']; |
| 83 | - }else{ |
|
| 83 | + } else{ |
|
| 84 | 84 | $members = explode('.', $params['memberName']); |
| 85 | 85 | $member = $smarty->get_template_vars($members[0]); |
| 86 | 86 | for($i = 1; $i < count($members); $i++){ |
@@ -43,7 +43,7 @@ |
||
| 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>'; |
@@ -21,11 +21,12 @@ |
||
| 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 | |
@@ -21,8 +21,9 @@ |
||
| 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 | } |