@@ -807,7 +807,8 @@ |
||
| 807 | 807 | { |
| 808 | 808 | $context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $txt[$new_url['label']]; |
| 809 | 809 | $context['spider_logs']['rows'][$k]['data']['viewing']['class'] = $new_url['class']; |
| 810 | - } else |
|
| 810 | + } |
|
| 811 | + else |
|
| 811 | 812 | $context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $new_url; |
| 812 | 813 | } |
| 813 | 814 | } |
@@ -683,7 +683,7 @@ |
||
| 683 | 683 | foreach ($columns as $columnName => $type) |
| 684 | 684 | { |
| 685 | 685 | //check pk fiel |
| 686 | - IF (in_array($columnName, $keys)) |
|
| 686 | + if (in_array($columnName, $keys)) |
|
| 687 | 687 | { |
| 688 | 688 | $key_str .= ($count_pk > 0 ? ',' : ''); |
| 689 | 689 | $key_str .= $columnName; |
@@ -75,7 +75,7 @@ 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( |
@@ -926,7 +926,7 @@ discard block |
||
| 926 | 926 | if (!empty($inTransaction)) |
| 927 | 927 | smf_db_transaction('rollback'); |
| 928 | 928 | |
| 929 | - if(empty($db_persist)) |
|
| 929 | + if (empty($db_persist)) |
|
| 930 | 930 | { // without pooling |
| 931 | 931 | if (empty($pg_error_data_prep)) |
| 932 | 932 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -927,7 +927,8 @@ discard block |
||
| 927 | 927 | smf_db_transaction('rollback'); |
| 928 | 928 | |
| 929 | 929 | if(empty($db_persist)) |
| 930 | - { // without pooling |
|
| 930 | + { |
|
| 931 | +// without pooling |
|
| 931 | 932 | if (empty($pg_error_data_prep)) |
| 932 | 933 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 933 | 934 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -938,7 +939,8 @@ discard block |
||
| 938 | 939 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 939 | 940 | } |
| 940 | 941 | else |
| 941 | - { //with pooling |
|
| 942 | + { |
|
| 943 | +//with pooling |
|
| 942 | 944 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 943 | 945 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 944 | 946 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -340,7 +340,7 @@ |
||
| 340 | 340 | WHERE t.id_board = {int:current_board} ' |
| 341 | 341 | . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
| 342 | 342 | AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' |
| 343 | - AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). ' |
|
| 343 | + AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . ' |
|
| 344 | 344 | ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
| 345 | 345 | LIMIT {int:maxindex} |
| 346 | 346 | OFFSET {int:start} '; |
@@ -1283,7 +1283,7 @@ |
||
| 1283 | 1283 | if ($context['can_post_attachment']) |
| 1284 | 1284 | { |
| 1285 | 1285 | $acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map( |
| 1286 | - function ($val) use ($smcFunc) |
|
| 1286 | + function($val) use ($smcFunc) |
|
| 1287 | 1287 | { |
| 1288 | 1288 | return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : ''; |
| 1289 | 1289 | }, |
@@ -2205,7 +2205,7 @@ |
||
| 2205 | 2205 | function($a, $b) |
| 2206 | 2206 | { |
| 2207 | 2207 | if ($a['filesize'] == $b['filesize']) |
| 2208 | - return 0; |
|
| 2208 | + return 0; |
|
| 2209 | 2209 | |
| 2210 | 2210 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
| 2211 | 2211 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ); |
| 92 | 92 | foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var) |
| 93 | 93 | if (isset($_GET[$var])) |
| 94 | - $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var]; |
|
| 94 | + $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var]; |
|
| 95 | 95 | |
| 96 | 96 | // Handle the cases where a board, boards, or category is asked for. |
| 97 | 97 | $query_this_board = 1; |
@@ -303,17 +303,17 @@ discard block |
||
| 303 | 303 | * namespaces, which could cause it to mangle the XML horrifically |
| 304 | 304 | * during processing. |
| 305 | 305 | */ |
| 306 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction; |
|
| 306 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction; |
|
| 307 | 307 | |
| 308 | 308 | // Allow mods to add extra namespaces and tags to the feed/channel |
| 309 | 309 | $namespaces = array( |
| 310 | 310 | 'rss' => array(), |
| 311 | - 'rss2' => array('atom' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
| 312 | - 'atom' => array('' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
| 311 | + 'rss2' => array('atom' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
| 312 | + 'atom' => array('' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
| 313 | 313 | 'rdf' => array( |
| 314 | - '' => 'htt'.'p:/'.'/purl.o'.'rg/rss/1.0/', |
|
| 315 | - 'rdf' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/02/22-rdf-syntax-ns#', |
|
| 316 | - 'dc' => 'htt'.'p:/'.'/purl.o'.'rg/dc/elements/1.1/', |
|
| 314 | + '' => 'htt' . 'p:/' . '/purl.o' . 'rg/rss/1.0/', |
|
| 315 | + 'rdf' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/02/22-rdf-syntax-ns#', |
|
| 316 | + 'dc' => 'htt' . 'p:/' . '/purl.o' . 'rg/dc/elements/1.1/', |
|
| 317 | 317 | ), |
| 318 | 318 | 'smf' => array( |
| 319 | 319 | 'smf' => $smf_ns, |
@@ -2141,7 +2141,7 @@ discard block |
||
| 2141 | 2141 | m.id_msg, m.id_topic, m.id_board, m.id_member, m.poster_email, m.poster_ip, |
| 2142 | 2142 | m.poster_time, m.subject, m.modified_time, m.modified_name, m.modified_reason, m.body, |
| 2143 | 2143 | m.likes, m.approved, m.smileys_enabled |
| 2144 | - FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ?' |
|
| 2144 | + FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ? ' |
|
| 2145 | 2145 | INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)' : '') . ' |
| 2146 | 2146 | WHERE m.id_member = {int:uid} |
| 2147 | 2147 | AND m.id_msg > {int:start_after} |
@@ -1840,7 +1840,7 @@ |
||
| 1840 | 1840 | // Make sure this is an array of integers |
| 1841 | 1841 | $excluded_groups = array_filter( |
| 1842 | 1842 | (array) $excluded_groups, |
| 1843 | - function ($v) |
|
| 1843 | + function($v) |
|
| 1844 | 1844 | { |
| 1845 | 1845 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
| 1846 | 1846 | } |
@@ -174,7 +174,8 @@ |
||
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
| 177 | + $unnotified = array_filter($this->members['watching'], function ($member) |
|
| 178 | + { |
|
| 178 | 179 | return empty($member['sent']); |
| 179 | 180 | }); |
| 180 | 181 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
| 190 | + $unnotified = array_filter($this->members['watching'], function($member) { |
|
| 191 | 191 | return empty($member['sent']); |
| 192 | 192 | }); |
| 193 | 193 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | if ($type == 'edit' || !empty($this->_details['respawns'])) |
| 197 | 197 | { |
| 198 | 198 | // Notifications about modified posts only go to members who were mentioned or quoted |
| 199 | - $this->members['watching'] = $type == 'edit' ? array(): $unnotified; |
|
| 199 | + $this->members['watching'] = $type == 'edit' ? array() : $unnotified; |
|
| 200 | 200 | |
| 201 | 201 | // If this post has no quotes or mentions, just delete any obsolete alerts and bail out. |
| 202 | 202 | if (empty($this->members['quoted']) && empty($this->members['mentioned'])) |
@@ -512,8 +512,7 @@ discard block |
||
| 512 | 512 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id])) |
| 513 | 513 | { |
| 514 | 514 | $pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
| 515 | - $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
| 516 | - (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
| 515 | + $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
| 517 | 516 | |
| 518 | 517 | $message_type = 'notification_' . $type; |
| 519 | 518 | |
@@ -532,8 +531,7 @@ discard block |
||
| 532 | 531 | elseif ($type == 'topic') |
| 533 | 532 | { |
| 534 | 533 | $pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
| 535 | - $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
| 536 | - (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
| 534 | + $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
| 537 | 535 | |
| 538 | 536 | $content_type = 'board'; |
| 539 | 537 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $feed_meta = array( |
| 205 | 205 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
| 206 | 206 | 'desc' => sentence_list(array_map( |
| 207 | - function ($datatype) use ($txt) |
|
| 207 | + function($datatype) use ($txt) |
|
| 208 | 208 | { |
| 209 | 209 | return $txt[$datatype]; |
| 210 | 210 | }, |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | 'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"', |
| 727 | 727 | ), |
| 728 | 728 | $returnContext |
| 729 | - ) . $hidden_orig_link . '</span>' ; |
|
| 729 | + ) . $hidden_orig_link . '</span>'; |
|
| 730 | 730 | } |
| 731 | 731 | elseif (strpos($currentAttachment['mime_type'], 'video/') === 0) |
| 732 | 732 | { |
@@ -1716,7 +1716,7 @@ |
||
| 1716 | 1716 | { |
| 1717 | 1717 | usort( |
| 1718 | 1718 | $fallbacks[$tzid], |
| 1719 | - function ($a, $b) |
|
| 1719 | + function($a, $b) |
|
| 1720 | 1720 | { |
| 1721 | 1721 | return $a['ts'] > $b['ts']; |
| 1722 | 1722 | } |