@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | $class_name = $this->getImplementationClassKeyName(); |
| 132 | 132 | $class_name_txt_key = strtolower($class_name); |
| 133 | 133 | |
| 134 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 134 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 135 | 135 | $config_vars[] = array( |
| 136 | - 'cachedir_'. $class_name_txt_key, |
|
| 137 | - $txt['cachedir_'. $class_name_txt_key], |
|
| 136 | + 'cachedir_' . $class_name_txt_key, |
|
| 137 | + $txt['cachedir_' . $class_name_txt_key], |
|
| 138 | 138 | 'file', |
| 139 | 139 | 'text', |
| 140 | 140 | 36, |
| 141 | - 'cache_'. $class_name_txt_key .'_cachedir'); |
|
| 141 | + 'cache_' . $class_name_txt_key . '_cachedir'); |
|
| 142 | 142 | |
| 143 | 143 | if (!isset($context['settings_post_javascript'])) |
| 144 | 144 | $context['settings_post_javascript'] = ''; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $context['settings_post_javascript'] .= ' |
| 147 | 147 | $("#cache_accelerator").change(function (e) { |
| 148 | 148 | var cache_type = e.currentTarget.value; |
| 149 | - $("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 149 | + $("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
| 150 | 150 | });'; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | display_db_error(); |
| 76 | 76 | |
| 77 | 77 | // We need to escape ' and \ |
| 78 | - $db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd); |
|
| 78 | + $db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd); |
|
| 79 | 79 | |
| 80 | 80 | // Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch. |
| 81 | 81 | set_error_handler(function($errno, $errstr) { |
| 82 | - throw new ErrorException($errstr, $errno);}); |
|
| 82 | + throw new ErrorException($errstr, $errno); }); |
|
| 83 | 83 | try |
| 84 | 84 | { |
| 85 | 85 | if (!empty($db_options['persist'])) |
@@ -938,7 +938,7 @@ discard block |
||
| 938 | 938 | if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false) |
| 939 | 939 | $error_array[2] = null; |
| 940 | 940 | |
| 941 | - if(empty($db_persist)) |
|
| 941 | + if (empty($db_persist)) |
|
| 942 | 942 | { // without pooling |
| 943 | 943 | if (empty($pg_error_data_prep)) |
| 944 | 944 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -1638,7 +1638,7 @@ |
||
| 1638 | 1638 | $cacheAPIdir = $sourcedir . '/Cache'; |
| 1639 | 1639 | |
| 1640 | 1640 | $loadedApis = array(); |
| 1641 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
| 1641 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
| 1642 | 1642 | |
| 1643 | 1643 | $api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY); |
| 1644 | 1644 | |
@@ -195,8 +195,7 @@ |
||
| 195 | 195 | ); |
| 196 | 196 | |
| 197 | 197 | $categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? |
| 198 | - '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : |
|
| 199 | - $row_board['cat_name']); |
|
| 198 | + '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']); |
|
| 200 | 199 | |
| 201 | 200 | } |
| 202 | 201 | |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | |
| 852 | 852 | clean_cache('data'); |
| 853 | 853 | |
| 854 | - cache_put_data('parsed_boards_descriptions_'. $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
| 854 | + cache_put_data('parsed_boards_descriptions_' . $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
| 855 | 855 | |
| 856 | 856 | if (empty($boardOptions['dont_log'])) |
| 857 | 857 | logAction('edit_board', array('board' => $board_id), 'admin'); |
@@ -1579,7 +1579,7 @@ discard block |
||
| 1579 | 1579 | $context['description_allowed_tags'] |
| 1580 | 1580 | ); |
| 1581 | 1581 | |
| 1582 | - cache_put_data('parsed_boards_descriptions_'. $category_id, $already_parsed_boards, 864000); |
|
| 1582 | + cache_put_data('parsed_boards_descriptions_' . $category_id, $already_parsed_boards, 864000); |
|
| 1583 | 1583 | |
| 1584 | 1584 | return $already_parsed_boards; |
| 1585 | 1585 | } |
@@ -455,7 +455,7 @@ |
||
| 455 | 455 | |
| 456 | 456 | elseif ($context['uninstalling']) |
| 457 | 457 | echo ' |
| 458 | - ', $txt['package_uninstall_done'] .' <br> |
|
| 458 | + ', $txt['package_uninstall_done'] . ' <br> |
|
| 459 | 459 | ', '<a href="', $context['keep_url'], '" class="button">', $txt['package_keep'], '</a>', '<a href="', $context['remove_url'], '" class="button">', $txt['package_delete2'], '</a>'; |
| 460 | 460 | |
| 461 | 461 | elseif ($context['install_finished']) |
@@ -364,8 +364,8 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | // Clean up tags with children |
| 367 | - foreach($bbcTagsChildren as $parent_tag => $children) |
|
| 368 | - foreach($children as $index => $child_tag) |
|
| 367 | + foreach ($bbcTagsChildren as $parent_tag => $children) |
|
| 368 | + foreach ($children as $index => $child_tag) |
|
| 369 | 369 | { |
| 370 | 370 | // Remove entries where parent and child tag is the same |
| 371 | 371 | if ($child_tag == $parent_tag) |
@@ -1888,25 +1888,25 @@ discard block |
||
| 1888 | 1888 | $fields = array(); |
| 1889 | 1889 | $new_sort = array(); |
| 1890 | 1890 | |
| 1891 | - while($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1891 | + while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1892 | 1892 | $fields[] = $row['id_field']; |
| 1893 | 1893 | $smcFunc['db_free_result']($request); |
| 1894 | 1894 | |
| 1895 | 1895 | $idx = array_search($context['fid'], $fields); |
| 1896 | 1896 | |
| 1897 | - if ($_GET['move'] == 'down' && count($fields) - 1 > $idx ) |
|
| 1897 | + if ($_GET['move'] == 'down' && count($fields) - 1 > $idx) |
|
| 1898 | 1898 | { |
| 1899 | - $new_sort = array_slice($fields ,0 ,$idx ,true); |
|
| 1899 | + $new_sort = array_slice($fields, 0, $idx, true); |
|
| 1900 | 1900 | $new_sort[] = $fields[$idx + 1]; |
| 1901 | 1901 | $new_sort[] = $fields[$idx]; |
| 1902 | - $new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true); |
|
| 1902 | + $new_sort += array_slice($fields, $idx + 2, count($fields), true); |
|
| 1903 | 1903 | } |
| 1904 | 1904 | elseif ($context['fid'] > 0 and $idx < count($fields)) |
| 1905 | 1905 | { |
| 1906 | - $new_sort = array_slice($fields ,0 ,($idx - 1) ,true); |
|
| 1906 | + $new_sort = array_slice($fields, 0, ($idx - 1), true); |
|
| 1907 | 1907 | $new_sort[] = $fields[$idx]; |
| 1908 | 1908 | $new_sort[] = $fields[$idx - 1]; |
| 1909 | - $new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true); |
|
| 1909 | + $new_sort += array_slice($fields, ($idx + 1), count($fields), true); |
|
| 1910 | 1910 | } |
| 1911 | 1911 | else |
| 1912 | 1912 | redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
| 262 | 262 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
| 263 | 263 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
| 264 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
| 264 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
| 265 | 265 | OFFSET {int:offset}' : ''), |
| 266 | 266 | array( |
| 267 | 267 | 'id_member' => $memID, |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats)); |
| 360 | 360 | |
| 361 | 361 | // Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.) |
| 362 | - $formats = array_map(function ($format) use ($scripturl) { |
|
| 362 | + $formats = array_map(function($format) use ($scripturl) { |
|
| 363 | 363 | $format['link'] = str_replace('{scripturl}', $scripturl, $format['link']); |
| 364 | 364 | $format['text'] = str_replace('{scripturl}', $scripturl, $format['text']); |
| 365 | 365 | |
@@ -1166,20 +1166,20 @@ discard block |
||
| 1166 | 1166 | $context['posts'][$key]['quickbuttons'] = array( |
| 1167 | 1167 | 'reply' => array( |
| 1168 | 1168 | 'label' => $txt['reply'], |
| 1169 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 1169 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 1170 | 1170 | 'icon' => 'reply_button', |
| 1171 | 1171 | 'show' => $post['can_reply'] |
| 1172 | 1172 | ), |
| 1173 | 1173 | 'quote' => array( |
| 1174 | 1174 | 'label' => $txt['quote_action'], |
| 1175 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 1175 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 1176 | 1176 | 'icon' => 'quote', |
| 1177 | 1177 | 'show' => $post['can_quote'] |
| 1178 | 1178 | ), |
| 1179 | 1179 | 'remove' => array( |
| 1180 | 1180 | 'label' => $txt['remove'], |
| 1181 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1182 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
| 1181 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1182 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
| 1183 | 1183 | 'class' => 'you_sure', |
| 1184 | 1184 | 'icon' => 'remove_button', |
| 1185 | 1185 | 'show' => $post['can_delete'] |
@@ -1704,7 +1704,7 @@ |
||
| 1704 | 1704 | // Missing, but we have a fallback. |
| 1705 | 1705 | else |
| 1706 | 1706 | { |
| 1707 | - usort($fallbacks[$tzid], function ($a, $b) { |
|
| 1707 | + usort($fallbacks[$tzid], function($a, $b) { |
|
| 1708 | 1708 | return $a['ts'] > $b['ts']; |
| 1709 | 1709 | }); |
| 1710 | 1710 | |