@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | if (!empty($modSettings['search_simple_fulltext'])) |
| 208 | 208 | { |
| 209 | - if($smcFunc['db_title'] == "PostgreSQL") |
|
| 209 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
| 210 | 210 | { |
| 211 | 211 | //we use the default language "default_text_search_config", otherwise we had to assgine the language here |
| 212 | 212 | //to_tsvector(body) -> to_tsvector($language,body) to_tsquery(...) -> to_tsquery($language,...) |
| 213 | 213 | $language_ftx = 'english'; |
| 214 | - $request = $smcFunc['db_query']('',' |
|
| 214 | + $request = $smcFunc['db_query']('', ' |
|
| 215 | 215 | SHOW default_text_search_config', |
| 216 | 216 | array() |
| 217 | 217 | ); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | // remove any indexed words that are used in the complex body search terms |
| 236 | 236 | $words['indexed_words'] = array_diff($words['indexed_words'], $words['complex_words']); |
| 237 | 237 | |
| 238 | - if($smcFunc['db_title'] == "PostgreSQL"){ |
|
| 238 | + if ($smcFunc['db_title'] == "PostgreSQL") { |
|
| 239 | 239 | $row = 0; |
| 240 | 240 | foreach ($words['indexed_words'] as $fulltextWord) { |
| 241 | 241 | $query_params['boolean_match'] .= ($row <> 0 ? '&' : ''); |
@@ -251,12 +251,12 @@ discard block |
||
| 251 | 251 | |
| 252 | 252 | // if we have bool terms to search, add them in |
| 253 | 253 | if ($query_params['boolean_match']) { |
| 254 | - if($smcFunc['db_title'] == "PostgreSQL") |
|
| 254 | + if ($smcFunc['db_title'] == "PostgreSQL") |
|
| 255 | 255 | { |
| 256 | 256 | //we use the default language "default_text_search_config", otherwise we had to assgine the language here |
| 257 | 257 | //to_tsvector(body) -> to_tsvector($language,body) to_tsquery(...) -> to_tsquery($language,...) |
| 258 | 258 | $language_ftx = 'english'; |
| 259 | - $request = $smcFunc['db_query']('',' |
|
| 259 | + $request = $smcFunc['db_query']('', ' |
|
| 260 | 260 | SHOW default_text_search_config', |
| 261 | 261 | array() |
| 262 | 262 | ); |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? ( ' |
|
| 278 | + $ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? (' |
|
| 279 | 279 | INSERT IGNORE INTO {db_prefix}' . $search_data['insert_into'] . ' |
| 280 | 280 | (' . implode(', ', array_keys($query_select)) . ')') : '') . ' |
| 281 | 281 | SELECT ' . implode(', ', $query_select) . ' |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | 'value' => $txt['spider_name'], |
| 240 | 240 | ), |
| 241 | 241 | 'data' => array( |
| 242 | - 'function' => function ($rowData) use ($smcFunc, $scripturl) |
|
| 242 | + 'function' => function($rowData) use ($smcFunc, $scripturl) |
|
| 243 | 243 | { |
| 244 | 244 | return sprintf('<a href="%1$s?action=admin;area=sengines;sa=editspiders;sid=%2$d">%3$s</a>', $scripturl, $rowData['id_spider'], $smcFunc['htmlspecialchars']($rowData['spider_name'])); |
| 245 | 245 | }, |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | 'value' => $txt['spider_last_seen'], |
| 255 | 255 | ), |
| 256 | 256 | 'data' => array( |
| 257 | - 'function' => function ($rowData) use ($context, $txt) |
|
| 257 | + 'function' => function($rowData) use ($context, $txt) |
|
| 258 | 258 | { |
| 259 | 259 | return isset($context['spider_last_seen'][$rowData['id_spider']]) ? timeformat($context['spider_last_seen'][$rowData['id_spider']]) : $txt['spider_last_never']; |
| 260 | 260 | }, |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | |
| 691 | 691 | if (!empty($_POST['delete_entries']) && isset($_POST['older'])) |
| 692 | 692 | { |
| 693 | - $deleteTime = time() - (((int)$_POST['older']) * 24 * 60 * 60); |
|
| 693 | + $deleteTime = time() - (((int) $_POST['older']) * 24 * 60 * 60); |
|
| 694 | 694 | |
| 695 | 695 | // Delete the entires. |
| 696 | 696 | $smcFunc['db_query']('', ' |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | 'value' => $txt['spider_time'], |
| 743 | 743 | ), |
| 744 | 744 | 'data' => array( |
| 745 | - 'function' => function ($rowData) |
|
| 745 | + 'function' => function($rowData) |
|
| 746 | 746 | { |
| 747 | 747 | return timeformat($rowData['log_time']); |
| 748 | 748 | }, |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | require_once($sourcedir . '/Subs-Auth.php'); |
| 53 | 53 | |
| 54 | 54 | // Posting the password... check it. |
| 55 | - if (isset($_POST[$type. '_pass'])) |
|
| 55 | + if (isset($_POST[$type . '_pass'])) |
|
| 56 | 56 | { |
| 57 | 57 | // Check to ensure we're forcing SSL for authentication |
| 58 | 58 | if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | { |
| 180 | 180 | if ($ip_number == 'ip2' && $user_info['ip2'] == $user_info['ip']) |
| 181 | 181 | continue; |
| 182 | - $ban_query[] = ' {inet:'.$ip_number.'} BETWEEN bi.ip_low and bi.ip_high'; |
|
| 182 | + $ban_query[] = ' {inet:' . $ip_number . '} BETWEEN bi.ip_low and bi.ip_high'; |
|
| 183 | 183 | $ban_query_vars[$ip_number] = $user_info[$ip_number]; |
| 184 | 184 | // IP was valid, maybe there's also a hostname... |
| 185 | 185 | if (empty($modSettings['disableHostnameLookup']) && $user_info[$ip_number] != 'unknown') |
@@ -187,8 +187,8 @@ discard block |
||
| 187 | 187 | $hostname = host_from_ip($user_info[$ip_number]); |
| 188 | 188 | if (strlen($hostname) > 0) |
| 189 | 189 | { |
| 190 | - $ban_query[] = '({string:hostname'.$ip_number.'} LIKE bi.hostname)'; |
|
| 191 | - $ban_query_vars['hostname'.$ip_number] = $hostname; |
|
| 190 | + $ban_query[] = '({string:hostname' . $ip_number . '} LIKE bi.hostname)'; |
|
| 191 | + $ban_query_vars['hostname' . $ip_number] = $hostname; |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | return true; |
| 913 | 913 | |
| 914 | 914 | // Let's ensure this is an array. |
| 915 | - $permission = (array)$permission; |
|
| 915 | + $permission = (array) $permission; |
|
| 916 | 916 | |
| 917 | 917 | // Are we checking the _current_ board, or some other boards? |
| 918 | 918 | if ($boards === null) |
@@ -398,7 +398,7 @@ |
||
| 398 | 398 | } |
| 399 | 399 | $smcFunc['db_free_result']($request); |
| 400 | 400 | |
| 401 | - if($updateBoardCount) |
|
| 401 | + if ($updateBoardCount) |
|
| 402 | 402 | { |
| 403 | 403 | // Decrease the posts/topics... |
| 404 | 404 | foreach ($adjustBoards as $stats) |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | if ($curAction == 'approve') |
| 178 | 178 | { |
| 179 | - approveMessages ($toAction, $details, $context['current_view']); |
|
| 179 | + approveMessages($toAction, $details, $context['current_view']); |
|
| 180 | 180 | } |
| 181 | 181 | else |
| 182 | 182 | { |
| 183 | - removeMessages ($toAction, $details, $context['current_view']); |
|
| 183 | + removeMessages($toAction, $details, $context['current_view']); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | 'value' => $txt['mc_unapproved_attach_poster'], |
| 438 | 438 | ), |
| 439 | 439 | 'data' => array( |
| 440 | - 'function' => function ($data) |
|
| 440 | + 'function' => function($data) |
|
| 441 | 441 | { |
| 442 | 442 | return $data['poster']['link']; |
| 443 | 443 | }, |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | 'value' => $txt['post'], |
| 468 | 468 | ), |
| 469 | 469 | 'data' => array( |
| 470 | - 'function' => function ($data) |
|
| 470 | + 'function' => function($data) |
|
| 471 | 471 | { |
| 472 | 472 | return '<a href="' . $data['message']['href'] . '">' . shorten_subject($data['message']['subject'], 20) . '</a>'; |
| 473 | 473 | }, |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | logAction(($approved ? 'un' : '') . 'approve', array('topic' => $topic, 'subject' => $subject, 'member' => $poster, 'board' => $board)); |
| 694 | 694 | } |
| 695 | 695 | |
| 696 | - redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg']. '#msg' . $_REQUEST['msg']); |
|
| 696 | + redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg'] . '#msg' . $_REQUEST['msg']); |
|
| 697 | 697 | } |
| 698 | 698 | |
| 699 | 699 | /** |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | $sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8); |
| 67 | 67 | switch ($word{$i} === 's' ? 0 : mt_rand(0, 2)) |
| 68 | 68 | { |
| 69 | - case 0: |
|
| 70 | - for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
| 69 | + case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
| 71 | 70 | for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++) |
| 72 | 71 | $sound_word .= $word{$i} === 's' ? $sound_letter{$j} : chr(mt_rand(max(ord($sound_letter{$j}) - 1, 0x00), min(ord($sound_letter{$j}) + 1, 0xFF))); |
| 73 | 72 | break; |
@@ -181,14 +181,14 @@ |
||
| 181 | 181 | { |
| 182 | 182 | collapsedDiv.show(\'slow\'); |
| 183 | 183 | icon.removeClass(\'toggle_down\').addClass(\'toggle_up\'); |
| 184 | - icon.prop(\'title\', '. JavaScriptEscape($txt['hide']) .'); |
|
| 184 | + icon.prop(\'title\', '. JavaScriptEscape($txt['hide']) . '); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | else |
| 188 | 188 | { |
| 189 | 189 | collapsedDiv.hide(\'slow\'); |
| 190 | 190 | icon.removeClass(\'toggle_up\').addClass(\'toggle_down\'); |
| 191 | - icon.prop(\'title\', '. JavaScriptEscape($txt['show']) .'); |
|
| 191 | + icon.prop(\'title\', '. JavaScriptEscape($txt['show']) . '); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | });', true); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $message = preg_replace('~&#(\d{4,5}|[2-9]\d{2,4}|1[2-9]\d);~', '&#$1;', $message); |
| 35 | 35 | |
| 36 | 36 | // Clean up after nobbc ;). |
| 37 | - $message = preg_replace_callback('~\[nobbc\](.+?)\[/nobbc\]~is', function ($a) |
|
| 37 | + $message = preg_replace_callback('~\[nobbc\](.+?)\[/nobbc\]~is', function($a) |
|
| 38 | 38 | { |
| 39 | 39 | return '[nobbc]' . strtr($a[1], array('[' => '[', ']' => ']', ':' => ':', '@' => '@')) . '[/nobbc]'; |
| 40 | 40 | }, $message); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | if (!$previewing && strpos($message, '[html]') !== false) |
| 123 | 123 | { |
| 124 | 124 | if (allowedTo('admin_forum')) |
| 125 | - $message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function ($m) { |
|
| 125 | + $message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m) { |
|
| 126 | 126 | return '[html]' . strtr(un_htmlspecialchars($m), array("\n" => ' ', ' ' => '  ', '[' => '[', ']' => ']')) . '[/html]'; |
| 127 | 127 | }, $message); |
| 128 | 128 | |
@@ -135,17 +135,17 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | // Let's look at the time tags... |
| 138 | - $message = preg_replace_callback('~\[time(?:=(absolute))*\](.+?)\[/time\]~i', function ($m) use ($modSettings, $user_info) |
|
| 138 | + $message = preg_replace_callback('~\[time(?:=(absolute))*\](.+?)\[/time\]~i', function($m) use ($modSettings, $user_info) |
|
| 139 | 139 | { |
| 140 | 140 | return "[time]" . (is_numeric("$m[2]") || @strtotime("$m[2]") == 0 ? "$m[2]" : strtotime("$m[2]") - ("$m[1]" == "absolute" ? 0 : (($modSettings["time_offset"] + $user_info["time_offset"]) * 3600))) . "[/time]"; |
| 141 | 141 | }, $message); |
| 142 | 142 | |
| 143 | 143 | // Change the color specific tags to [color=the color]. |
| 144 | - $message = preg_replace('~\[(black|blue|green|red|white)\]~', '[color=$1]', $message); // First do the opening tags. |
|
| 145 | - $message = preg_replace('~\[/(black|blue|green|red|white)\]~', '[/color]', $message); // And now do the closing tags |
|
| 144 | + $message = preg_replace('~\[(black|blue|green|red|white)\]~', '[color=$1]', $message); // First do the opening tags. |
|
| 145 | + $message = preg_replace('~\[/(black|blue|green|red|white)\]~', '[/color]', $message); // And now do the closing tags |
|
| 146 | 146 | |
| 147 | 147 | // Make sure all tags are lowercase. |
| 148 | - $message = preg_replace_callback('~\[([/]?)(list|li|table|tr|td)((\s[^\]]+)*)\]~i', function ($m) |
|
| 148 | + $message = preg_replace_callback('~\[([/]?)(list|li|table|tr|td)((\s[^\]]+)*)\]~i', function($m) |
|
| 149 | 149 | { |
| 150 | 150 | return "[$m[1]" . strtolower("$m[2]") . "$m[3]]"; |
| 151 | 151 | }, $message); |
@@ -252,13 +252,13 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | $message = implode('', $parts); |
| 254 | 254 | |
| 255 | - $message = preg_replace_callback('~\[html\](.+?)\[/html\]~i', function ($m) use ($smcFunc) |
|
| 255 | + $message = preg_replace_callback('~\[html\](.+?)\[/html\]~i', function($m) use ($smcFunc) |
|
| 256 | 256 | { |
| 257 | 257 | return "[html]" . strtr($smcFunc['htmlspecialchars']("$m[1]", ENT_QUOTES), array("\\"" => """, "&#13;" => "<br>", "&#32;" => " ", "&#91;" => "[", "&#93;" => "]")) . "[/html]"; |
| 258 | 258 | }, $message); |
| 259 | 259 | |
| 260 | 260 | // Attempt to un-parse the time to something less awful. |
| 261 | - $message = preg_replace_callback('~\[time\](\d{0,10})\[/time\]~i', function ($m) |
|
| 261 | + $message = preg_replace_callback('~\[time\](\d{0,10})\[/time\]~i', function($m) |
|
| 262 | 262 | { |
| 263 | 263 | return "[time]" . timeformat("$m[1]", false) . "[/time]"; |
| 264 | 264 | }, $message); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | fixTag($message, $param['tag'], $param['protocols'], $param['embeddedUrl'], $param['hasEqualSign'], !empty($param['hasExtra'])); |
| 350 | 350 | |
| 351 | 351 | // Now fix possible security problems with images loading links automatically... |
| 352 | - $message = preg_replace_callback('~(\[img.*?\])(.+?)\[/img\]~is', function ($m) |
|
| 352 | + $message = preg_replace_callback('~(\[img.*?\])(.+?)\[/img\]~is', function($m) |
|
| 353 | 353 | { |
| 354 | 354 | return "$m[1]" . preg_replace("~action(=|%3d)(?!dlattach)~i", "action-", "$m[2]") . "[/img]"; |
| 355 | 355 | }, $message); |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | $to_array = is_array($to) ? $to : array($to); |
| 536 | 536 | |
| 537 | 537 | // Make sure we actually have email addresses to send this to |
| 538 | - foreach($to_array as $k => $v) |
|
| 538 | + foreach ($to_array as $k => $v) |
|
| 539 | 539 | { |
| 540 | 540 | // This should never happen, but better safe than sorry |
| 541 | 541 | if (trim($v) == '') |
@@ -1211,7 +1211,7 @@ discard block |
||
| 1211 | 1211 | unset($matches); |
| 1212 | 1212 | |
| 1213 | 1213 | if ($simple) |
| 1214 | - $string = preg_replace_callback('~&#(\d{3,8});~', function ($m) |
|
| 1214 | + $string = preg_replace_callback('~&#(\d{3,8});~', function($m) |
|
| 1215 | 1215 | { |
| 1216 | 1216 | return chr("$m[1]"); |
| 1217 | 1217 | }, $string); |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | $string = $newstring; |
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | - $entityConvert = function ($m) |
|
| 1245 | + $entityConvert = function($m) |
|
| 1246 | 1246 | { |
| 1247 | 1247 | $c = $m[1]; |
| 1248 | 1248 | if (strlen($c) === 1 && ord($c[0]) <= 0x7F) |
@@ -1348,14 +1348,14 @@ discard block |
||
| 1348 | 1348 | $helo = gethostname(); |
| 1349 | 1349 | elseif (function_exists('php_uname')) |
| 1350 | 1350 | $helo = php_uname('n'); |
| 1351 | - elseif (array_key_exists('SERVER_NAME',$_SERVER) && !empty($_SERVER['SERVER_NAME'])) |
|
| 1351 | + elseif (array_key_exists('SERVER_NAME', $_SERVER) && !empty($_SERVER['SERVER_NAME'])) |
|
| 1352 | 1352 | $helo = $_SERVER['SERVER_NAME']; |
| 1353 | 1353 | |
| 1354 | 1354 | if (empty($helo)) |
| 1355 | 1355 | $helo = $modSettings['smtp_host']; |
| 1356 | 1356 | |
| 1357 | 1357 | // SMTP = 1, SMTP - STARTTLS = 2 |
| 1358 | - if (in_array($modSettings['mail_type'], array(1,2)) && $modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '') |
|
| 1358 | + if (in_array($modSettings['mail_type'], array(1, 2)) && $modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '') |
|
| 1359 | 1359 | { |
| 1360 | 1360 | // EHLO could be understood to mean encrypted hello... |
| 1361 | 1361 | if (server_parse('EHLO ' . $helo, $socket, null, $response) == '250') |
@@ -2119,7 +2119,7 @@ discard block |
||
| 2119 | 2119 | preg_match_all('/\[member\=([0-9]+)\]([^\[]*)\[\/member\]/U', $msgOptions['old_body'], $match); |
| 2120 | 2120 | |
| 2121 | 2121 | if (isset($match[1]) && isset($match[2]) && is_array($match[1]) && is_array($match[2])) |
| 2122 | - foreach($match[1] as $i => $oldID) |
|
| 2122 | + foreach ($match[1] as $i => $oldID) |
|
| 2123 | 2123 | $oldmentions[$oldID] = array('id' => $oldID, 'real_name' => $match[2][$i]); |
| 2124 | 2124 | |
| 2125 | 2125 | if (empty($modSettings['search_custom_index_config'])) |
@@ -2130,10 +2130,10 @@ discard block |
||
| 2130 | 2130 | $messages_columns['body'] = $msgOptions['body'] = Mentions::getBody($msgOptions['body'], $mentions); |
| 2131 | 2131 | |
| 2132 | 2132 | // Remove the poster. |
| 2133 | - if(isset($mentions[$user_info['id']])) |
|
| 2133 | + if (isset($mentions[$user_info['id']])) |
|
| 2134 | 2134 | unset($mentions[$user_info['id']]); |
| 2135 | 2135 | |
| 2136 | - if(isset($oldmentions[$user_info['id']])) |
|
| 2136 | + if (isset($oldmentions[$user_info['id']])) |
|
| 2137 | 2137 | unset($oldmentions[$user_info['id']]); |
| 2138 | 2138 | |
| 2139 | 2139 | if (is_array($mentions) && is_array($oldmentions) && count(array_diff_key($mentions, $oldmentions)) > 0 && count($mentions) > count($oldmentions)) |
@@ -2948,7 +2948,7 @@ discard block |
||
| 2948 | 2948 | $suggestions = enchant_dict_suggest($dict, $word); |
| 2949 | 2949 | |
| 2950 | 2950 | // Go through the suggestions and convert them back to the proper character set |
| 2951 | - foreach($suggestions as $index => $suggestion) |
|
| 2951 | + foreach ($suggestions as $index => $suggestion) |
|
| 2952 | 2952 | { |
| 2953 | 2953 | // //TRANSLIT makes it use similar-looking characters for incompatible ones... |
| 2954 | 2954 | $suggestions[$index] = iconv('UTF-8', $txt['lang_character_set'] . '//TRANSLIT', $suggestion); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | if ((!isset($match[3]) || trim($match[3]) != '/') && (!isset($match[2]) || trim($match[2]) != '/')) |
| 425 | 425 | { |
| 426 | 426 | // Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way. |
| 427 | - $last_tag_end = strpos($data, '</' . $match[1]. '>'); |
|
| 427 | + $last_tag_end = strpos($data, '</' . $match[1] . '>'); |
|
| 428 | 428 | if ($last_tag_end === false) |
| 429 | 429 | continue; |
| 430 | 430 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | break; |
| 439 | 439 | |
| 440 | 440 | // If not then find the next ending tag. |
| 441 | - $next_tag_end = strpos($data, '</' . $match[1]. '>', $offset); |
|
| 441 | + $next_tag_end = strpos($data, '</' . $match[1] . '>', $offset); |
|
| 442 | 442 | |
| 443 | 443 | // Didn't find one? Then just use the last and sod it. |
| 444 | 444 | if ($next_tag_end === false) |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | // Parse the insides. |
| 453 | 453 | $inner_match = substr($data, 0, $last_tag_end); |
| 454 | 454 | // Data now starts from where this section ends. |
| 455 | - $data = substr($data, $last_tag_end + strlen('</' . $match[1]. '>')); |
|
| 455 | + $data = substr($data, $last_tag_end + strlen('</' . $match[1] . '>')); |
|
| 456 | 456 | |
| 457 | 457 | if (!empty($inner_match)) |
| 458 | 458 | { |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | $trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES)); |
| 619 | 619 | |
| 620 | 620 | // Translate all the entities out. |
| 621 | - $data = strtr(preg_replace_callback('~&#(\d{1,4});~', function ($m) |
|
| 621 | + $data = strtr(preg_replace_callback('~&#(\d{1,4});~', function($m) |
|
| 622 | 622 | { |
| 623 | 623 | return chr("$m[1]"); |
| 624 | 624 | }, $data), $trans_tbl); |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | // Set different modes. |
| 874 | 874 | $chmod_values = $is_dir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666); |
| 875 | 875 | |
| 876 | - foreach($chmod_values as $val) |
|
| 876 | + foreach ($chmod_values as $val) |
|
| 877 | 877 | { |
| 878 | 878 | // If it's writable, break out of the loop. |
| 879 | 879 | if (is_writable($ftp_file)) |