@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | class EventNew_Notify_Background extends SMF_BackgroundTask |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed. |
|
| 23 | + * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed. |
|
| 24 | 24 | * @return bool Always returns true |
| 25 | 25 | */ |
| 26 | 26 | public function execute() |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | 'content_action' => empty($this->_details['sender_id']) ? 'new_guest' : 'new', |
| 82 | 82 | 'is_read' => 0, |
| 83 | 83 | 'extra' => $smcFunc['json_encode']( |
| 84 | - array( |
|
| 85 | - "event_id" => $this->_details['event_id'], |
|
| 84 | + array( |
|
| 85 | + "event_id" => $this->_details['event_id'], |
|
| 86 | 86 | "event_title" => $this->_details['event_title'] |
| 87 | 87 | ) |
| 88 | 88 | ), |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @return bool Always returns true |
| 25 | 25 | */ |
| 26 | 26 | public function execute() |
| 27 | - { |
|
| 27 | + { |
|
| 28 | 28 | global $sourcedir, $smcFunc, $user_profile; |
| 29 | 29 | |
| 30 | 30 | // Get everyone who could be notified - those are the people who can see the calendar. |
@@ -199,7 +199,6 @@ |
||
| 199 | 199 | list ($context['attachments']['quantity'], $context['attachments']['total_size']) = $smcFunc['db_fetch_row']($request); |
| 200 | 200 | $smcFunc['db_free_result']($request); |
| 201 | 201 | } |
| 202 | - |
|
| 203 | 202 | else |
| 204 | 203 | $context['attachments'] = array( |
| 205 | 204 | 'quantity' => 0, |
@@ -758,7 +758,6 @@ |
||
| 758 | 758 | $groups[$row['id_group']]['num_members'] += $row['num_members']; |
| 759 | 759 | $smcFunc['db_free_result']($query); |
| 760 | 760 | } |
| 761 | - |
|
| 762 | 761 | else |
| 763 | 762 | { |
| 764 | 763 | $query = $smcFunc['db_query']('', ' |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // Set a list of common functions. |
| 99 | 99 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
| 100 | 100 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
| 101 | - { |
|
| 101 | + { |
|
| 102 | 102 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
| 103 | 103 | return $string; |
| 104 | 104 | } : function($string) |
@@ -2176,7 +2176,6 @@ discard block |
||
| 2176 | 2176 | loadLanguage('index+Modifications'); |
| 2177 | 2177 | $context['template_layers'] = array(); |
| 2178 | 2178 | } |
| 2179 | - |
|
| 2180 | 2179 | else |
| 2181 | 2180 | { |
| 2182 | 2181 | // Custom templates to load, or just default? |
@@ -2555,14 +2554,12 @@ discard block |
||
| 2555 | 2554 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
| 2556 | 2555 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
| 2557 | 2556 | } |
| 2558 | - |
|
| 2559 | 2557 | else |
| 2560 | 2558 | { |
| 2561 | 2559 | $fileUrl = false; |
| 2562 | 2560 | $filePath = false; |
| 2563 | 2561 | } |
| 2564 | 2562 | } |
| 2565 | - |
|
| 2566 | 2563 | else |
| 2567 | 2564 | { |
| 2568 | 2565 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2670,14 +2667,12 @@ discard block |
||
| 2670 | 2667 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
| 2671 | 2668 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
| 2672 | 2669 | } |
| 2673 | - |
|
| 2674 | 2670 | else |
| 2675 | 2671 | { |
| 2676 | 2672 | $fileUrl = false; |
| 2677 | 2673 | $filePath = false; |
| 2678 | 2674 | } |
| 2679 | 2675 | } |
| 2680 | - |
|
| 2681 | 2676 | else |
| 2682 | 2677 | { |
| 2683 | 2678 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -2293,7 +2293,6 @@ |
||
| 2293 | 2293 | list ($hookData['class'], $hookData['method']) = explode('::', $modFunc); |
| 2294 | 2294 | $hookData['pureFunc'] = $hookData['method']; |
| 2295 | 2295 | } |
| 2296 | - |
|
| 2297 | 2296 | else |
| 2298 | 2297 | $hookData['pureFunc'] = $modFunc; |
| 2299 | 2298 | |
@@ -669,12 +669,12 @@ |
||
| 669 | 669 | $where = ''; |
| 670 | 670 | $count_pk = 0; |
| 671 | 671 | |
| 672 | - If ($replace_support) |
|
| 672 | + if ($replace_support) |
|
| 673 | 673 | { |
| 674 | 674 | foreach ($columns as $columnName => $type) |
| 675 | 675 | { |
| 676 | 676 | //check pk fiel |
| 677 | - IF (in_array($columnName, $keys)) |
|
| 677 | + if (in_array($columnName, $keys)) |
|
| 678 | 678 | { |
| 679 | 679 | $key_str .= ($count_pk > 0 ? ',' : ''); |
| 680 | 680 | $key_str .= $columnName; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | display_db_error(); |
| 74 | 74 | |
| 75 | 75 | // We need to escape ' and \ |
| 76 | - $db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd); |
|
| 76 | + $db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd); |
|
| 77 | 77 | |
| 78 | 78 | if (!empty($db_options['persist'])) |
| 79 | 79 | $connection = @pg_pconnect((empty($db_server) ? '' : 'host=' . $db_server . ' ') . 'dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\'')); |
@@ -925,7 +925,7 @@ discard block |
||
| 925 | 925 | if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false) |
| 926 | 926 | $error_array[2] = null; |
| 927 | 927 | |
| 928 | - if(empty($db_persist)) |
|
| 928 | + if (empty($db_persist)) |
|
| 929 | 929 | { // without pooling |
| 930 | 930 | if (empty($pg_error_data_prep)) |
| 931 | 931 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -926,7 +926,8 @@ discard block |
||
| 926 | 926 | $error_array[2] = null; |
| 927 | 927 | |
| 928 | 928 | if(empty($db_persist)) |
| 929 | - { // without pooling |
|
| 929 | + { |
|
| 930 | +// without pooling |
|
| 930 | 931 | if (empty($pg_error_data_prep)) |
| 931 | 932 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 932 | 933 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -937,7 +938,8 @@ discard block |
||
| 937 | 938 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 938 | 939 | } |
| 939 | 940 | else |
| 940 | - { //with pooling |
|
| 941 | + { |
|
| 942 | +//with pooling |
|
| 941 | 943 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 942 | 944 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 943 | 945 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -94,7 +94,6 @@ |
||
| 94 | 94 | |
| 95 | 95 | continue; |
| 96 | 96 | } |
| 97 | - |
|
| 98 | 97 | elseif (empty($row['show_online']) && empty($membersOnlineOptions['show_hidden'])) |
| 99 | 98 | { |
| 100 | 99 | // Just increase the stats and don't add this hidden user to any list. |
@@ -1838,7 +1838,7 @@ |
||
| 1838 | 1838 | if (!empty($excluded_groups)) |
| 1839 | 1839 | { |
| 1840 | 1840 | // Make sure this is an array of integers |
| 1841 | - $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
|
| 1841 | + $excluded_groups = array_filter((array) $excluded_groups, function($v) |
|
| 1842 | 1842 | { |
| 1843 | 1843 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
| 1844 | 1844 | }); |
@@ -1839,7 +1839,7 @@ |
||
| 1839 | 1839 | { |
| 1840 | 1840 | // Make sure this is an array of integers |
| 1841 | 1841 | $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
| 1842 | - { |
|
| 1842 | + { |
|
| 1843 | 1843 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
| 1844 | 1844 | }); |
| 1845 | 1845 | |
@@ -420,7 +420,7 @@ |
||
| 420 | 420 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
| 421 | 421 | } |
| 422 | 422 | } |
| 423 | - else |
|
| 423 | + else |
|
| 424 | 424 | foreach ($this_category as &$board) |
| 425 | 425 | { |
| 426 | 426 | if (!empty($moderators[$board['id']])) |