| @@ -39,7 +39,7 @@ | ||
| 39 | 39 | |
| 40 | 40 | foreach ($category['boards'] as $board) | 
| 41 | 41 | echo ' | 
| 42 | -									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; | |
| 42 | +									<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=> ' : '', $board['name'], '</option>'; | |
| 43 | 43 | echo ' | 
| 44 | 44 | </optgroup>'; | 
| 45 | 45 | } | 
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | // Stick our "create a redirection topic" template in here... | 
| 64 | 64 |  	template_redirect_options('move'); | 
| 65 | 65 | |
| 66 | - echo ' | |
| 66 | + echo ' | |
| 67 | 67 | <input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit"> | 
| 68 | 68 | </div> | 
| 69 | 69 | </div>'; | 
| @@ -86,9 +86,9 @@ discard block | ||
| 86 | 86 | */ | 
| 87 | 87 | function template_redirect_options($type) | 
| 88 | 88 |  { | 
| 89 | - global $txt, $context, $modSettings; | |
| 89 | + global $txt, $context, $modSettings; | |
| 90 | 90 | |
| 91 | - echo ' | |
| 91 | + echo ' | |
| 92 | 92 | <label for="postRedirect"><input type="checkbox" name="postRedirect" id="postRedirect"', $context['is_approved'] ? ' checked' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt[$type . '_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';"> ', $txt['post_redirection'], '.</label> | 
| 93 | 93 | <fieldset id="reasonArea" style="margin-top: 1ex;', $context['is_approved'] ? '' : 'display: none;', '"> | 
| 94 | 94 | <dl class="settings"> | 
| @@ -220,7 +220,7 @@ | ||
| 220 | 220 | ), | 
| 221 | 221 | ), | 
| 222 | 222 | ); | 
| 223 | - */ | |
| 223 | + */ | |
| 224 | 224 | |
| 225 | 225 | // Are we using right-to-left orientation? | 
| 226 | 226 | $first = $context['right_to_left'] ? 'last' : 'first'; | 
| @@ -24,8 +24,8 @@ discard block | ||
| 24 | 24 | <meta charset="', $context['character_set'], '"> | 
| 25 | 25 | <meta name="robots" content="noindex"> | 
| 26 | 26 | <title>', $context['page_title'], '</title> | 
| 27 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> | |
| 28 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> | |
| 27 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> | |
| 28 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> | |
| 29 | 29 | </head> | 
| 30 | 30 | <body id="help_popup"> | 
| 31 | 31 | <div class="windowbg description"> | 
| @@ -50,8 +50,8 @@ discard block | ||
| 50 | 50 | <title>', $txt['find_members'], '</title> | 
| 51 | 51 | <meta charset="', $context['character_set'], '"> | 
| 52 | 52 | <meta name="robots" content="noindex"> | 
| 53 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> | |
| 54 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> | |
| 53 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> | |
| 54 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> | |
| 55 | 55 | <script> | 
| 56 | 56 | var membersAdded = []; | 
| 57 | 57 | function addMember(name) | 
| @@ -181,14 +181,14 @@ discard block | ||
| 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); | 
| @@ -641,7 +641,7 @@ discard block | ||
| 641 | 641 | |
| 642 | 642 | // Setup the correct template, even though I'll admit we ain't downloading ;) | 
| 643 | 643 | $context['sub_template'] = 'downloaded'; | 
| 644 | -	$allowext = array('.zip','.tgz','.gz'); | |
| 644 | +	$allowext = array('.zip', '.tgz', '.gz'); | |
| 645 | 645 | // @todo Use FTP if the Packages directory is not writable. | 
| 646 | 646 | |
| 647 | 647 | // Check the file was even sent! | 
| @@ -653,13 +653,13 @@ discard block | ||
| 653 | 653 | // Make sure it has a sane filename. | 
| 654 | 654 |  	$_FILES['package']['name'] = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $_FILES['package']['name']); | 
| 655 | 655 | $extension = substr(strrchr(strtolower($_FILES['package']['name']), '.'), 0); | 
| 656 | - if(!in_array($extension, $allowext)) | |
| 656 | + if (!in_array($extension, $allowext)) | |
| 657 | 657 |  	{ | 
| 658 | 658 |  		fatal_lang_error('package_upload_error_supports', false, array('zip, tgz, tar.gz')); | 
| 659 | 659 | } | 
| 660 | 660 | |
| 661 | 661 | // We only need the filename... | 
| 662 | - $extension = ($extension == '.gz') ? '.tar.gz' : $extension ; | |
| 662 | + $extension = ($extension == '.gz') ? '.tar.gz' : $extension; | |
| 663 | 663 | $packageName = time() . $extension; | 
| 664 | 664 | |
| 665 | 665 | // Setup the destination and throw an error if the file is already there! | 
| @@ -659,7 +659,7 @@ discard block | ||
| 659 | 659 | |
| 660 | 660 | // Remove the phrase parts and extract the words. | 
| 661 | 661 |  	$wordArray = preg_replace('~(?:^|\s)(?:[-]?)"(?:[^"]+)"(?:$|\s)~' . ($context['utf8'] ? 'u' : ''), ' ', $search_params['search']); | 
| 662 | -	$wordArray = explode(' ',  $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); | |
| 662 | +	$wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES)); | |
| 663 | 663 | |
| 664 | 664 | // A minus sign in front of a word excludes the word.... so... | 
| 665 | 665 | $excludedWords = array(); | 
| @@ -1104,7 +1104,7 @@ discard block | ||
| 1104 | 1104 | SELECT | 
| 1105 | 1105 |  							{int:id_search}, | 
| 1106 | 1106 | t.id_topic, | 
| 1107 | - ' . $relevance. ', | |
| 1107 | + ' . $relevance . ', | |
| 1108 | 1108 | ' . (empty($userQuery) ? 't.id_first_msg' : 'm.id_msg') . ', | 
| 1109 | 1109 | 1 | 
| 1110 | 1110 | FROM ' . $subject_query['from'] . (empty($subject_query['inner_join']) ? '' : ' | 
| @@ -1339,7 +1339,7 @@ discard block | ||
| 1339 | 1339 | if (empty($subject_query['where'])) | 
| 1340 | 1340 | continue; | 
| 1341 | 1341 | |
| 1342 | -						$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( ' | |
| 1342 | +						$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? (' | |
| 1343 | 1343 |  							INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics | 
| 1344 | 1344 |  								(' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . ' | 
| 1345 | 1345 | SELECT ' . ($createTemporary ? '' : $_SESSION['search_cache']['id_search'] . ', ') . 't.id_topic | 
| @@ -1568,7 +1568,7 @@ discard block | ||
| 1568 | 1568 | } | 
| 1569 | 1569 | $main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance'; | 
| 1570 | 1570 | |
| 1571 | -					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( ' | |
| 1571 | +					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? (' | |
| 1572 | 1572 |  						INSERT IGNORE INTO ' . '{db_prefix}log_search_results | 
| 1573 | 1573 |  							(' . implode(', ', array_keys($main_query['select'])) . ')') : '') . ' | 
| 1574 | 1574 | SELECT | 
| @@ -1636,7 +1636,7 @@ discard block | ||
| 1636 | 1636 | $relevance = substr($relevance, 0, -3) . ') / ' . $weight_total . ' AS relevance'; | 
| 1637 | 1637 | |
| 1638 | 1638 | $usedIDs = array_flip(empty($inserts) ? array() : array_keys($inserts)); | 
| 1639 | -					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ( ' | |
| 1639 | +					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? (' | |
| 1640 | 1640 |  						INSERT IGNORE INTO {db_prefix}log_search_results | 
| 1641 | 1641 | (id_search, id_topic, relevance, id_msg, num_matches)') : '') . ' | 
| 1642 | 1642 | SELECT | 
| @@ -2102,7 +2102,7 @@ discard block | ||
| 2102 | 2102 | $query = trim($query, "\*+"); | 
| 2103 | 2103 |  		$query = strtr($smcFunc['htmlspecialchars']($query), array('\\\'' => '\'')); | 
| 2104 | 2104 | |
| 2105 | -		$body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function ($m) | |
| 2105 | +		$body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => ''')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function($m) | |
| 2106 | 2106 |  		{ | 
| 2107 | 2107 |  			return isset($m[2]) && "$m[2]" == "$m[1]" ? stripslashes("$m[1]") : "<strong class=\"highlight\">$m[1]</strong>"; | 
| 2108 | 2108 | }, $body_highlighted); | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | |
| 92 | 92 |  	$table = str_replace('{db_prefix}', $db_prefix, $table); | 
| 93 | 93 | |
| 94 | -	$pg_tables = array('pg_catalog','information_schema'); | |
| 94 | +	$pg_tables = array('pg_catalog', 'information_schema'); | |
| 95 | 95 | |
| 96 | 96 |  	$request = $smcFunc['db_query']('', ' | 
| 97 | 97 | SELECT pg_relation_size(C.oid) AS "size" | 
| @@ -289,7 +289,7 @@ discard block | ||
| 289 | 289 |  { | 
| 290 | 290 | static $ver; | 
| 291 | 291 | |
| 292 | - if(!empty($ver)) | |
| 292 | + if (!empty($ver)) | |
| 293 | 293 | return $ver; | 
| 294 | 294 | |
| 295 | 295 | global $smcFunc; | 
| @@ -793,7 +793,7 @@ discard block | ||
| 793 | 793 | if (!$this->connection) | 
| 794 | 794 |  		{ | 
| 795 | 795 | $this->error = 'bad_server'; | 
| 796 | - $this->last_message = 'Invalid Server'; | |
| 796 | + $this->last_message = 'Invalid Server'; | |
| 797 | 797 | return; | 
| 798 | 798 | } | 
| 799 | 799 | |
| @@ -801,7 +801,7 @@ discard block | ||
| 801 | 801 | if (!$this->check_response(220)) | 
| 802 | 802 |  		{ | 
| 803 | 803 | $this->error = 'bad_response'; | 
| 804 | - $this->last_message = 'Bad Response'; | |
| 804 | + $this->last_message = 'Bad Response'; | |
| 805 | 805 | return; | 
| 806 | 806 | } | 
| 807 | 807 | |
| @@ -426,8 +426,8 @@ | ||
| 426 | 426 | */ | 
| 427 | 427 | function matchIPtoCIDR($ip_address, $cidr_address) | 
| 428 | 428 |  { | 
| 429 | -    list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); | |
| 430 | - return (ip2long($ip_address) & (~((1 << (32 - $cidr_subnetmask)) - 1))) == ip2long($cidr_network); | |
| 429 | +	list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); | |
| 430 | + return (ip2long($ip_address) & (~((1 << (32 - $cidr_subnetmask)) - 1))) == ip2long($cidr_network); | |
| 431 | 431 | } | 
| 432 | 432 | |
| 433 | 433 | /** | 
| @@ -586,7 +586,7 @@ discard block | ||
| 586 | 586 | 'member_name' => $regOptions['username'], | 
| 587 | 587 | 'email_address' => $regOptions['email'], | 
| 588 | 588 | 'passwd' => hash_password($regOptions['username'], $regOptions['password']), | 
| 589 | - 'password_salt' => substr(md5(mt_rand()), 0, 4) , | |
| 589 | + 'password_salt' => substr(md5(mt_rand()), 0, 4), | |
| 590 | 590 | 'posts' => 0, | 
| 591 | 591 | 'date_registered' => time(), | 
| 592 | 592 | 'member_ip' => $regOptions['interface'] == 'admin' ? '127.0.0.1' : $user_info['ip'], | 
| @@ -676,7 +676,7 @@ discard block | ||
| 676 | 676 | 'time_offset', | 
| 677 | 677 | ); | 
| 678 | 678 | $knownInets = array( | 
| 679 | - 'member_ip','member_ip2', | |
| 679 | + 'member_ip', 'member_ip2', | |
| 680 | 680 | ); | 
| 681 | 681 | |
| 682 | 682 | // Call an optional function to validate the users' input. | 
| @@ -904,7 +904,7 @@ discard block | ||
| 904 | 904 |  	$checkName = strtr($name, array('_' => '\\_', '%' => '\\%')); | 
| 905 | 905 | |
| 906 | 906 | //when we got no wildcard we can use equal -> fast | 
| 907 | - $operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '=' ); | |
| 907 | + $operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '='); | |
| 908 | 908 | |
| 909 | 909 | // Make sure they don't want someone else's name. | 
| 910 | 910 |  	$request = $smcFunc['db_query']('', ' | 
| @@ -1273,7 +1273,7 @@ discard block | ||
| 1273 | 1273 | $user_info['buddies'][] = $userReceiver; | 
| 1274 | 1274 | |
| 1275 | 1275 | // And add a nice alert. Don't abuse though! | 
| 1276 | -		if ((cache_get_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, 86400)) == null) | |
| 1276 | +		if ((cache_get_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, 86400)) == null) | |
| 1277 | 1277 |  		{ | 
| 1278 | 1278 |  			$smcFunc['db_insert']('insert', | 
| 1279 | 1279 |  				'{db_prefix}background_tasks', | 
| @@ -1288,7 +1288,7 @@ discard block | ||
| 1288 | 1288 | ); | 
| 1289 | 1289 | |
| 1290 | 1290 | // Store this in a cache entry to avoid creating multiple alerts. Give it a long life cycle. | 
| 1291 | -			cache_put_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, '1', 86400); | |
| 1291 | +			cache_put_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, '1', 86400); | |
| 1292 | 1292 | } | 
| 1293 | 1293 | } | 
| 1294 | 1294 | |