@@ -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 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $class_name = $this->getImplementationClassKeyName(); |
| 185 | 185 | $class_name_txt_key = strtolower($class_name); |
| 186 | 186 | |
| 187 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 187 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 188 | 188 | $config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir'); |
| 189 | 189 | |
| 190 | 190 | if (!isset($context['settings_post_javascript'])) |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $context['settings_post_javascript'] .= ' |
| 194 | 194 | $("#cache_accelerator").change(function (e) { |
| 195 | 195 | var cache_type = e.currentTarget.value; |
| 196 | - $("#cachedir").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 196 | + $("#cachedir").prop("disabled", cache_type != "'. $class_name . '"); |
|
| 197 | 197 | });'; |
| 198 | 198 | } |
| 199 | 199 | |
@@ -169,15 +169,15 @@ discard block |
||
| 169 | 169 | $class_name = $this->getImplementationClassKeyName(); |
| 170 | 170 | $class_name_txt_key = strtolower($class_name); |
| 171 | 171 | |
| 172 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 172 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 173 | 173 | $config_vars[] = array( |
| 174 | 174 | self::CLASS_KEY, |
| 175 | - $txt['cache_'. $class_name_txt_key .'_servers'], |
|
| 175 | + $txt['cache_' . $class_name_txt_key . '_servers'], |
|
| 176 | 176 | 'file', |
| 177 | 177 | 'text', |
| 178 | 178 | 0, |
| 179 | - 'cache_'. $class_name_txt_key, |
|
| 180 | - 'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']); |
|
| 179 | + 'cache_' . $class_name_txt_key, |
|
| 180 | + 'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']); |
|
| 181 | 181 | |
| 182 | 182 | if (!isset($context['settings_post_javascript'])) |
| 183 | 183 | $context['settings_post_javascript'] = ''; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $context['settings_post_javascript'] .= ' |
| 186 | 186 | $("#cache_accelerator").change(function (e) { |
| 187 | 187 | var cache_type = e.currentTarget.value; |
| 188 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 188 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
| 189 | 189 | });'; |
| 190 | 190 | } |
| 191 | 191 | |
@@ -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 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | clean_cache(); |
| 170 | 170 | |
| 171 | 171 | // If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level. |
| 172 | - list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
| 172 | + list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
| 173 | 173 | if ($modSettings['warning_decrement']) |
| 174 | 174 | { |
| 175 | 175 | // Find every member who has a warning level... |
@@ -1665,7 +1665,7 @@ discard block |
||
| 1665 | 1665 | // Determine action based on last_login... |
| 1666 | 1666 | $purgeMembers = array(); |
| 1667 | 1667 | $markReadMembers = array(); |
| 1668 | - foreach($members as $member) |
|
| 1668 | + foreach ($members as $member) |
|
| 1669 | 1669 | { |
| 1670 | 1670 | if ($member['last_login'] <= $cleanupBeyond) |
| 1671 | 1671 | $purgeMembers[] = $member['id_member']; |
@@ -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 | } |
@@ -169,15 +169,15 @@ discard block |
||
| 169 | 169 | $class_name = $this->getImplementationClassKeyName(); |
| 170 | 170 | $class_name_txt_key = strtolower($class_name); |
| 171 | 171 | |
| 172 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
| 172 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
| 173 | 173 | $config_vars[] = array( |
| 174 | 174 | self::CLASS_KEY, |
| 175 | - $txt['cache_'. $class_name_txt_key .'_servers'], |
|
| 175 | + $txt['cache_' . $class_name_txt_key . '_servers'], |
|
| 176 | 176 | 'file', |
| 177 | 177 | 'text', |
| 178 | 178 | 0, |
| 179 | - 'cache_'. $class_name_txt_key, |
|
| 180 | - 'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']); |
|
| 179 | + 'cache_' . $class_name_txt_key, |
|
| 180 | + 'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']); |
|
| 181 | 181 | |
| 182 | 182 | if (!isset($context['settings_post_javascript'])) |
| 183 | 183 | $context['settings_post_javascript'] = ''; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $context['settings_post_javascript'] .= ' |
| 186 | 186 | $("#cache_accelerator").change(function (e) { |
| 187 | 187 | var cache_type = e.currentTarget.value; |
| 188 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
| 188 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
| 189 | 189 | });'; |
| 190 | 190 | } |
| 191 | 191 | |
@@ -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 | |