@@ -155,8 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | $out .= $str[$i]; |
158 | - } |
|
159 | - else |
|
158 | + } else |
|
160 | 159 | { |
161 | 160 | if (count($temp) === 0) |
162 | 161 | { |
@@ -213,12 +212,10 @@ discard block |
||
213 | 212 | { |
214 | 213 | $out .= chr($digits); |
215 | 214 | |
216 | - } |
|
217 | - elseif ($digits < 2048) |
|
215 | + } elseif ($digits < 2048) |
|
218 | 216 | { |
219 | 217 | $out .= chr(192 + (($digits - ($digits % 64)) / 64)).chr(128 + ($digits % 64)); |
220 | - } |
|
221 | - else |
|
218 | + } else |
|
222 | 219 | { |
223 | 220 | $out .= chr(224 + (($digits - ($digits % 4096)) / 4096)) |
224 | 221 | .chr(128 + ((($digits % 4096) - ($digits % 64)) / 64)) |
@@ -278,8 +275,7 @@ discard block |
||
278 | 275 | if ($replacement !== '') |
279 | 276 | { |
280 | 277 | $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str); |
281 | - } |
|
282 | - else |
|
278 | + } else |
|
283 | 279 | { |
284 | 280 | $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/ie", "'\\1'.str_repeat('#', strlen('\\2')).'\\3'", $str); |
285 | 281 | } |
@@ -486,8 +482,7 @@ discard block |
||
486 | 482 | if ($temp !== '') |
487 | 483 | { |
488 | 484 | $output .= $temp."\n".$line."\n"; |
489 | - } |
|
490 | - else |
|
485 | + } else |
|
491 | 486 | { |
492 | 487 | $output .= $line."\n"; |
493 | 488 | } |
@@ -538,8 +533,7 @@ discard block |
||
538 | 533 | if ($position === 1) |
539 | 534 | { |
540 | 535 | $end = mb_substr($str, 0, -($max_length - mb_strlen($beg))); |
541 | - } |
|
542 | - else |
|
536 | + } else |
|
543 | 537 | { |
544 | 538 | $end = mb_substr($str, -($max_length - mb_strlen($beg))); |
545 | 539 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | function nl2br_except_pre($str) |
61 | 61 | { |
62 | - $CI =& get_instance(); |
|
62 | + $CI = & get_instance(); |
|
63 | 63 | $CI->load->library('typography'); |
64 | 64 | return $CI->typography->nl2br_except_pre($str); |
65 | 65 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | function auto_typography($str, $reduce_linebreaks = FALSE) |
80 | 80 | { |
81 | - $CI =& get_instance(); |
|
81 | + $CI = & get_instance(); |
|
82 | 82 | $CI->load->library('typography'); |
83 | 83 | return $CI->typography->auto_typography($str, $reduce_linebreaks); |
84 | 84 | } |
@@ -76,12 +76,12 @@ discard block |
||
76 | 76 | $lang['UP45'] = '(UTC +4:30) Afghanistan'; |
77 | 77 | $lang['UP5'] = '(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time'; |
78 | 78 | $lang['UP55'] = '(UTC +5:30) Indian Standard Time, Sri Lanka Time'; |
79 | -$lang['UP575'] = '(UTC +5:45) Nepal Time'; |
|
79 | +$lang['UP575'] = '(UTC +5:45) Nepal Time'; |
|
80 | 80 | $lang['UP6'] = '(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time'; |
81 | 81 | $lang['UP65'] = '(UTC +6:30) Cocos Islands, Myanmar'; |
82 | 82 | $lang['UP7'] = '(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam'; |
83 | 83 | $lang['UP8'] = '(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time'; |
84 | -$lang['UP875'] = '(UTC +8:45) Australian Central Western Standard Time'; |
|
84 | +$lang['UP875'] = '(UTC +8:45) Australian Central Western Standard Time'; |
|
85 | 85 | $lang['UP9'] = '(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time'; |
86 | 86 | $lang['UP95'] = '(UTC +9:30) Australian Central Standard Time'; |
87 | 87 | $lang['UP10'] = '(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time'; |
@@ -89,6 +89,6 @@ discard block |
||
89 | 89 | $lang['UP11'] = '(UTC +11:00) Srednekolymsk Time, Solomon Islands, Vanuatu'; |
90 | 90 | $lang['UP115'] = '(UTC +11:30) Norfolk Island'; |
91 | 91 | $lang['UP12'] = '(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time'; |
92 | -$lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time'; |
|
92 | +$lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time'; |
|
93 | 93 | $lang['UP13'] = '(UTC +13:00) Samoa Time Zone, Phoenix Islands Time, Tonga'; |
94 | 94 | $lang['UP14'] = '(UTC +14:00) Line Islands'; |
@@ -37,32 +37,32 @@ |
||
37 | 37 | */ |
38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
39 | 39 | |
40 | -$lang['form_validation_required'] = 'The {field} field is required.'; |
|
41 | -$lang['form_validation_isset'] = 'The {field} field must have a value.'; |
|
42 | -$lang['form_validation_valid_email'] = 'The {field} field must contain a valid email address.'; |
|
43 | -$lang['form_validation_valid_emails'] = 'The {field} field must contain all valid email addresses.'; |
|
44 | -$lang['form_validation_valid_url'] = 'The {field} field must contain a valid URL.'; |
|
45 | -$lang['form_validation_valid_ip'] = 'The {field} field must contain a valid IP.'; |
|
40 | +$lang['form_validation_required'] = 'The {field} field is required.'; |
|
41 | +$lang['form_validation_isset'] = 'The {field} field must have a value.'; |
|
42 | +$lang['form_validation_valid_email'] = 'The {field} field must contain a valid email address.'; |
|
43 | +$lang['form_validation_valid_emails'] = 'The {field} field must contain all valid email addresses.'; |
|
44 | +$lang['form_validation_valid_url'] = 'The {field} field must contain a valid URL.'; |
|
45 | +$lang['form_validation_valid_ip'] = 'The {field} field must contain a valid IP.'; |
|
46 | 46 | $lang['form_validation_min_length'] = 'The {field} field must be at least {param} characters in length.'; |
47 | 47 | $lang['form_validation_max_length'] = 'The {field} field cannot exceed {param} characters in length.'; |
48 | -$lang['form_validation_exact_length'] = 'The {field} field must be exactly {param} characters in length.'; |
|
49 | -$lang['form_validation_alpha'] = 'The {field} field may only contain alphabetical characters.'; |
|
50 | -$lang['form_validation_alpha_numeric'] = 'The {field} field may only contain alpha-numeric characters.'; |
|
51 | -$lang['form_validation_alpha_numeric_spaces'] = 'The {field} field may only contain alpha-numeric characters and spaces.'; |
|
48 | +$lang['form_validation_exact_length'] = 'The {field} field must be exactly {param} characters in length.'; |
|
49 | +$lang['form_validation_alpha'] = 'The {field} field may only contain alphabetical characters.'; |
|
50 | +$lang['form_validation_alpha_numeric'] = 'The {field} field may only contain alpha-numeric characters.'; |
|
51 | +$lang['form_validation_alpha_numeric_spaces'] = 'The {field} field may only contain alpha-numeric characters and spaces.'; |
|
52 | 52 | $lang['form_validation_alpha_dash'] = 'The {field} field may only contain alpha-numeric characters, underscores, and dashes.'; |
53 | 53 | $lang['form_validation_numeric'] = 'The {field} field must contain only numbers.'; |
54 | 54 | $lang['form_validation_is_numeric'] = 'The {field} field must contain only numeric characters.'; |
55 | 55 | $lang['form_validation_integer'] = 'The {field} field must contain an integer.'; |
56 | -$lang['form_validation_regex_match'] = 'The {field} field is not in the correct format.'; |
|
56 | +$lang['form_validation_regex_match'] = 'The {field} field is not in the correct format.'; |
|
57 | 57 | $lang['form_validation_matches'] = 'The {field} field does not match the {param} field.'; |
58 | 58 | $lang['form_validation_differs'] = 'The {field} field must differ from the {param} field.'; |
59 | 59 | $lang['form_validation_is_unique'] = 'The {field} field must contain a unique value.'; |
60 | 60 | $lang['form_validation_is_natural'] = 'The {field} field must only contain digits.'; |
61 | 61 | $lang['form_validation_is_natural_no_zero'] = 'The {field} field must only contain digits and must be greater than zero.'; |
62 | -$lang['form_validation_decimal'] = 'The {field} field must contain a decimal number.'; |
|
63 | -$lang['form_validation_less_than'] = 'The {field} field must contain a number less than {param}.'; |
|
62 | +$lang['form_validation_decimal'] = 'The {field} field must contain a decimal number.'; |
|
63 | +$lang['form_validation_less_than'] = 'The {field} field must contain a number less than {param}.'; |
|
64 | 64 | $lang['form_validation_less_than_equal_to'] = 'The {field} field must contain a number less than or equal to {param}.'; |
65 | -$lang['form_validation_greater_than'] = 'The {field} field must contain a number greater than {param}.'; |
|
65 | +$lang['form_validation_greater_than'] = 'The {field} field must contain a number greater than {param}.'; |
|
66 | 66 | $lang['form_validation_greater_than_equal_to'] = 'The {field} field must contain a number greater than or equal to {param}.'; |
67 | 67 | $lang['form_validation_error_message_not_set'] = 'Unable to access an error message corresponding to your field name {field}.'; |
68 | -$lang['form_validation_in_list'] = 'The {field} field must be one of: {param}.'; |
|
68 | +$lang['form_validation_in_list'] = 'The {field} field must be one of: {param}.'; |
@@ -37,8 +37,8 @@ |
||
37 | 37 | */ |
38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
39 | 39 | |
40 | -$lang['ftp_no_connection'] = 'Unable to locate a valid connection ID. Please make sure you are connected before performing any file routines.'; |
|
41 | -$lang['ftp_unable_to_connect'] = 'Unable to connect to your FTP server using the supplied hostname.'; |
|
40 | +$lang['ftp_no_connection'] = 'Unable to locate a valid connection ID. Please make sure you are connected before performing any file routines.'; |
|
41 | +$lang['ftp_unable_to_connect'] = 'Unable to connect to your FTP server using the supplied hostname.'; |
|
42 | 42 | $lang['ftp_unable_to_login'] = 'Unable to login to your FTP server. Please check your username and password.'; |
43 | 43 | $lang['ftp_unable_to_mkdir'] = 'Unable to create the directory you have specified.'; |
44 | 44 | $lang['ftp_unable_to_changedir'] = 'Unable to change directories.'; |
@@ -139,8 +139,7 @@ discard block |
||
139 | 139 | if ($data === FALSE) |
140 | 140 | { |
141 | 141 | $data = array('data' => 0, 'ttl' => 60); |
142 | - } |
|
143 | - elseif ( ! is_int($data['data'])) |
|
142 | + } elseif ( ! is_int($data['data'])) |
|
144 | 143 | { |
145 | 144 | return FALSE; |
146 | 145 | } |
@@ -167,8 +166,7 @@ discard block |
||
167 | 166 | if ($data === FALSE) |
168 | 167 | { |
169 | 168 | $data = array('data' => 0, 'ttl' => 60); |
170 | - } |
|
171 | - elseif ( ! is_int($data['data'])) |
|
169 | + } elseif ( ! is_int($data['data'])) |
|
172 | 170 | { |
173 | 171 | return FALSE; |
174 | 172 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | parent::__construct($params); |
83 | 83 | |
84 | - $CI =& get_instance(); |
|
84 | + $CI = & get_instance(); |
|
85 | 85 | isset($CI->db) OR $CI->load->database(); |
86 | 86 | $this->_db = $CI->db; |
87 | 87 |
@@ -99,12 +99,10 @@ discard block |
||
99 | 99 | if (class_exists('Memcached', FALSE)) |
100 | 100 | { |
101 | 101 | $this->_memcached = new Memcached(); |
102 | - } |
|
103 | - elseif (class_exists('Memcache', FALSE)) |
|
102 | + } elseif (class_exists('Memcache', FALSE)) |
|
104 | 103 | { |
105 | 104 | $this->_memcached = new Memcache(); |
106 | - } |
|
107 | - else |
|
105 | + } else |
|
108 | 106 | { |
109 | 107 | log_message('error', 'Cache: Failed to create Memcache(d) object; extension not loaded?'); |
110 | 108 | } |
@@ -124,8 +122,7 @@ discard block |
||
124 | 122 | TRUE, |
125 | 123 | $cache_server['weight'] |
126 | 124 | ); |
127 | - } |
|
128 | - else |
|
125 | + } else |
|
129 | 126 | { |
130 | 127 | $this->_memcached->addServer( |
131 | 128 | $cache_server['hostname'], |
@@ -172,8 +169,7 @@ discard block |
||
172 | 169 | if (get_class($this->_memcached) === 'Memcached') |
173 | 170 | { |
174 | 171 | return $this->_memcached->set($id, $data, $ttl); |
175 | - } |
|
176 | - elseif (get_class($this->_memcached) === 'Memcache') |
|
172 | + } elseif (get_class($this->_memcached) === 'Memcache') |
|
177 | 173 | { |
178 | 174 | return $this->_memcached->set($id, $data, 0, $ttl); |
179 | 175 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | parent::__construct($params); |
83 | 83 | |
84 | - $CI =& get_instance(); |
|
84 | + $CI = & get_instance(); |
|
85 | 85 | isset($CI->db) OR $CI->load->database(); |
86 | 86 | $this->_db = $CI->db; |
87 | 87 |
@@ -107,8 +107,7 @@ discard block |
||
107 | 107 | if ($config['socket_type'] === 'unix') |
108 | 108 | { |
109 | 109 | $success = $this->_redis->connect($config['socket']); |
110 | - } |
|
111 | - else // tcp socket |
|
110 | + } else // tcp socket |
|
112 | 111 | { |
113 | 112 | $success = $this->_redis->connect($config['host'], $config['port'], $config['timeout']); |
114 | 113 | } |
@@ -122,8 +121,7 @@ discard block |
||
122 | 121 | { |
123 | 122 | log_message('error', 'Cache: Redis authentication failed.'); |
124 | 123 | } |
125 | - } |
|
126 | - catch (RedisException $e) |
|
124 | + } catch (RedisException $e) |
|
127 | 125 | { |
128 | 126 | log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')'); |
129 | 127 | } |
@@ -175,8 +173,7 @@ discard block |
||
175 | 173 | |
176 | 174 | isset($this->_serialized[$id]) OR $this->_serialized[$id] = TRUE; |
177 | 175 | $data = serialize($data); |
178 | - } |
|
179 | - elseif (isset($this->_serialized[$id])) |
|
176 | + } elseif (isset($this->_serialized[$id])) |
|
180 | 177 | { |
181 | 178 | $this->_serialized[$id] = NULL; |
182 | 179 | $this->_redis->sRemove('_ci_redis_serialized', $id); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | parent::__construct($params); |
83 | 83 | |
84 | - $CI =& get_instance(); |
|
84 | + $CI = & get_instance(); |
|
85 | 85 | isset($CI->db) OR $CI->load->database(); |
86 | 86 | $this->_db = $CI->db; |
87 | 87 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function __construct($config = array()) |
131 | 131 | { |
132 | - $this->CI =& get_instance(); |
|
132 | + $this->CI = & get_instance(); |
|
133 | 133 | $this->CI->lang->load('calendar'); |
134 | 134 | |
135 | 135 | empty($config) OR $this->initialize($config); |
@@ -205,15 +205,15 @@ discard block |
||
205 | 205 | |
206 | 206 | $adjusted_date = $this->adjust_date($month, $year); |
207 | 207 | |
208 | - $month = $adjusted_date['month']; |
|
209 | - $year = $adjusted_date['year']; |
|
208 | + $month = $adjusted_date['month']; |
|
209 | + $year = $adjusted_date['year']; |
|
210 | 210 | |
211 | 211 | // Determine the total days in the month |
212 | 212 | $total_days = $this->get_total_days($month, $year); |
213 | 213 | |
214 | 214 | // Set the starting day of the week |
215 | 215 | $start_days = array('sunday' => 0, 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6); |
216 | - $start_day = isset($start_days[$this->start_day]) ? $start_days[$this->start_day] : 0; |
|
216 | + $start_day = isset($start_days[$this->start_day]) ? $start_days[$this->start_day] : 0; |
|
217 | 217 | |
218 | 218 | // Set the starting day number |
219 | 219 | $local_date = mktime(12, 0, 0, $month, 1, $year); |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | |
228 | 228 | // Set the current month/year/day |
229 | 229 | // We use this to determine the "today" date |
230 | - $cur_year = date('Y', $local_time); |
|
231 | - $cur_month = date('m', $local_time); |
|
232 | - $cur_day = date('j', $local_time); |
|
230 | + $cur_year = date('Y', $local_time); |
|
231 | + $cur_month = date('m', $local_time); |
|
232 | + $cur_day = date('j', $local_time); |
|
233 | 233 | |
234 | 234 | $is_current_month = ($cur_year == $year && $cur_month == $month); |
235 | 235 | |
@@ -270,9 +270,9 @@ discard block |
||
270 | 270 | |
271 | 271 | $day_names = $this->get_day_names(); |
272 | 272 | |
273 | - for ($i = 0; $i < 7; $i ++) |
|
273 | + for ($i = 0; $i < 7; $i++) |
|
274 | 274 | { |
275 | - $out .= str_replace('{week_day}', $day_names[($start_day + $i) %7], $this->replacements['week_day_cell']); |
|
275 | + $out .= str_replace('{week_day}', $day_names[($start_day + $i) % 7], $this->replacements['week_day_cell']); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | $out .= "\n".$this->replacements['week_row_end']."\n"; |
@@ -423,8 +423,8 @@ discard block |
||
423 | 423 | { |
424 | 424 | $date = array(); |
425 | 425 | |
426 | - $date['month'] = $month; |
|
427 | - $date['year'] = $year; |
|
426 | + $date['month'] = $month; |
|
427 | + $date['year'] = $year; |
|
428 | 428 | |
429 | 429 | while ($date['month'] > 12) |
430 | 430 | { |
@@ -184,12 +184,10 @@ discard block |
||
184 | 184 | if (empty($year)) |
185 | 185 | { |
186 | 186 | $year = date('Y', $local_time); |
187 | - } |
|
188 | - elseif (strlen($year) === 1) |
|
187 | + } elseif (strlen($year) === 1) |
|
189 | 188 | { |
190 | 189 | $year = '200'.$year; |
191 | - } |
|
192 | - elseif (strlen($year) === 2) |
|
190 | + } elseif (strlen($year) === 2) |
|
193 | 191 | { |
194 | 192 | $year = '20'.$year; |
195 | 193 | } |
@@ -197,8 +195,7 @@ discard block |
||
197 | 195 | if (empty($month)) |
198 | 196 | { |
199 | 197 | $month = date('m', $local_time); |
200 | - } |
|
201 | - elseif (strlen($month) === 1) |
|
198 | + } elseif (strlen($month) === 1) |
|
202 | 199 | { |
203 | 200 | $month = '0'.$month; |
204 | 201 | } |
@@ -294,8 +291,7 @@ discard block |
||
294 | 291 | $temp = ($is_current_month === TRUE && $day == $cur_day) ? |
295 | 292 | $this->replacements['cal_cell_content_today'] : $this->replacements['cal_cell_content']; |
296 | 293 | $out .= str_replace(array('{content}', '{day}'), array($data[$day], $day), $temp); |
297 | - } |
|
298 | - else |
|
294 | + } else |
|
299 | 295 | { |
300 | 296 | // Cells with no content |
301 | 297 | $temp = ($is_current_month === TRUE && $day == $cur_day) ? |
@@ -304,8 +300,7 @@ discard block |
||
304 | 300 | } |
305 | 301 | |
306 | 302 | $out .= ($is_current_month === TRUE && $day == $cur_day) ? $this->replacements['cal_cell_end_today'] : $this->replacements['cal_cell_end']; |
307 | - } |
|
308 | - elseif ($this->show_other_days === TRUE) |
|
303 | + } elseif ($this->show_other_days === TRUE) |
|
309 | 304 | { |
310 | 305 | $out .= $this->replacements['cal_cell_start_other']; |
311 | 306 | |
@@ -315,16 +310,14 @@ discard block |
||
315 | 310 | $prev_month = $this->adjust_date($month - 1, $year); |
316 | 311 | $prev_month_days = $this->get_total_days($prev_month['month'], $prev_month['year']); |
317 | 312 | $out .= str_replace('{day}', $prev_month_days + $day, $this->replacements['cal_cell_other']); |
318 | - } |
|
319 | - else |
|
313 | + } else |
|
320 | 314 | { |
321 | 315 | // Day of next month |
322 | 316 | $out .= str_replace('{day}', $day - $total_days, $this->replacements['cal_cell_other']); |
323 | 317 | } |
324 | 318 | |
325 | 319 | $out .= $this->replacements['cal_cell_end_other']; |
326 | - } |
|
327 | - else |
|
320 | + } else |
|
328 | 321 | { |
329 | 322 | // Blank cells |
330 | 323 | $out .= $this->replacements['cal_cell_start'].$this->replacements['cal_cell_blank'].$this->replacements['cal_cell_end']; |
@@ -355,8 +348,7 @@ discard block |
||
355 | 348 | if ($this->month_type === 'short') |
356 | 349 | { |
357 | 350 | $month_names = array('01' => 'cal_jan', '02' => 'cal_feb', '03' => 'cal_mar', '04' => 'cal_apr', '05' => 'cal_may', '06' => 'cal_jun', '07' => 'cal_jul', '08' => 'cal_aug', '09' => 'cal_sep', '10' => 'cal_oct', '11' => 'cal_nov', '12' => 'cal_dec'); |
358 | - } |
|
359 | - else |
|
351 | + } else |
|
360 | 352 | { |
361 | 353 | $month_names = array('01' => 'cal_january', '02' => 'cal_february', '03' => 'cal_march', '04' => 'cal_april', '05' => 'cal_mayl', '06' => 'cal_june', '07' => 'cal_july', '08' => 'cal_august', '09' => 'cal_september', '10' => 'cal_october', '11' => 'cal_november', '12' => 'cal_december'); |
362 | 354 | } |
@@ -387,12 +379,10 @@ discard block |
||
387 | 379 | if ($this->day_type === 'long') |
388 | 380 | { |
389 | 381 | $day_names = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'); |
390 | - } |
|
391 | - elseif ($this->day_type === 'short') |
|
382 | + } elseif ($this->day_type === 'short') |
|
392 | 383 | { |
393 | 384 | $day_names = array('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'); |
394 | - } |
|
395 | - else |
|
385 | + } else |
|
396 | 386 | { |
397 | 387 | $day_names = array('su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'); |
398 | 388 | } |
@@ -528,14 +518,12 @@ discard block |
||
528 | 518 | if (preg_match('/\{'.$val.'\}(.*?)\{\/'.$val.'\}/si', $this->template, $match)) |
529 | 519 | { |
530 | 520 | $this->replacements[$val] = $match[1]; |
531 | - } |
|
532 | - elseif (in_array($val, $today, TRUE)) |
|
521 | + } elseif (in_array($val, $today, TRUE)) |
|
533 | 522 | { |
534 | 523 | $this->replacements[$val] = $this->replacements[substr($val, 0, -6)]; |
535 | 524 | } |
536 | 525 | } |
537 | - } |
|
538 | - elseif (is_array($this->template)) |
|
526 | + } elseif (is_array($this->template)) |
|
539 | 527 | { |
540 | 528 | $this->replacements = array_merge($this->replacements, $this->template); |
541 | 529 | } |