@@ -20,7 +20,7 @@ |
||
20 | 20 | class MemberReportReply_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() |
@@ -20,7 +20,7 @@ |
||
20 | 20 | class GroupReq_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 any alerts as needed. |
|
23 | + * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed. |
|
24 | 24 | * @return bool Always returns true. |
25 | 25 | */ |
26 | 26 | public function execute() |
@@ -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, $language, $modSettings, $scripturl; |
29 | 29 | |
30 | 30 | // Do we have any group moderators? |
@@ -18,10 +18,10 @@ |
||
18 | 18 | */ |
19 | 19 | class Birthday_Notify_Background extends SMF_BackgroundTask |
20 | 20 | { |
21 | - /** |
|
22 | - * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
23 | - * @return bool Always returns true |
|
24 | - */ |
|
21 | + /** |
|
22 | + * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
23 | + * @return bool Always returns true |
|
24 | + */ |
|
25 | 25 | public function execute() |
26 | 26 | { |
27 | 27 | global $txt, $smcFunc, $txtBirthdayEmails, $modSettings, $sourcedir; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @return bool Always returns true |
24 | 24 | */ |
25 | 25 | public function execute() |
26 | - { |
|
26 | + { |
|
27 | 27 | global $txt, $smcFunc, $txtBirthdayEmails, $modSettings, $sourcedir; |
28 | 28 | |
29 | 29 | $greeting = isset($modSettings['birthday_email']) ? $modSettings['birthday_email'] : 'happy_birthday'; |
@@ -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. |
@@ -89,7 +89,9 @@ |
||
89 | 89 | <li><a href="#" onclick="showSSIBlock('ssi_quickSearch'); return false;">Quick Search Box</a></li> |
90 | 90 | <li><a href="#" onclick="showSSIBlock('ssi_recentAttachments'); return false;">Recent Attachments</a></li> |
91 | 91 | </ul> |
92 | - <?php if ($user_info['is_admin']) { ?> |
|
92 | + <?php if ($user_info['is_admin']) |
|
93 | +{ |
|
94 | +?> |
|
93 | 95 | <h3>Advanced Functions <img class="help" title="Functions that require additional tweaking, not just copy and paste." src="<?php echo $settings['images_url']; ?>/helptopics.png" alt=""></h3> |
94 | 96 | <ul> |
95 | 97 | <li><a href="#" onclick="showSSIBlock('ssi_showPoll'); return false;">Show Single Poll</a></li> |
@@ -419,7 +419,7 @@ |
||
419 | 419 | |
420 | 420 | if (checkImagick()) |
421 | 421 | { |
422 | - $imagick = New Imagick($destName); |
|
422 | + $imagick = new Imagick($destName); |
|
423 | 423 | $src_width = empty($src_width) ? $imagick->getImageWidth() : $src_width; |
424 | 424 | $src_height = empty($src_height) ? $imagick->getImageHeight() : $src_height; |
425 | 425 | $dest_width = empty($max_width) ? $src_width : $max_width; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | if (class_exists('Imagick')) |
43 | 43 | { |
44 | - $temp = New Imagick; |
|
44 | + $temp = new Imagick; |
|
45 | 45 | $temp2 = $temp->getVersion(); |
46 | 46 | $im_version = $temp2['versionString']; |
47 | 47 | $extension_version = 'Imagick ' . phpversion('Imagick'); |
@@ -1683,7 +1683,7 @@ discard block |
||
1683 | 1683 | // Prevents warnings about constants that are already defined. |
1684 | 1684 | $settingsText = preg_replace_callback( |
1685 | 1685 | '~\bdefine\s*\(\s*(["\'])(\w+)\1~', |
1686 | - function ($matches) |
|
1686 | + function($matches) |
|
1687 | 1687 | { |
1688 | 1688 | return 'define(\'' . md5(mt_rand()) . '\''; |
1689 | 1689 | }, |
@@ -1693,7 +1693,7 @@ discard block |
||
1693 | 1693 | // Handle eval errors gracefully in both PHP 5 and PHP 7 |
1694 | 1694 | try |
1695 | 1695 | { |
1696 | - if($settingsText !== '' && @eval($settingsText) === false) |
|
1696 | + if ($settingsText !== '' && @eval($settingsText) === false) |
|
1697 | 1697 | throw new ErrorException('eval error'); |
1698 | 1698 | |
1699 | 1699 | unset($mtime, $settingsFile, $settingsText); |
@@ -1900,7 +1900,7 @@ discard block |
||
1900 | 1900 | } |
1901 | 1901 | |
1902 | 1902 | // Everything is simpler if we convert heredocs to normal strings first. |
1903 | - if (preg_match_all('/<<<(\'?)(\w+)\'?'. $line_ending . '(.*?)'. $line_ending . '\2;$/m', $code_str, $matches)) |
|
1903 | + if (preg_match_all('/<<<(\'?)(\w+)\'?' . $line_ending . '(.*?)' . $line_ending . '\2;$/m', $code_str, $matches)) |
|
1904 | 1904 | { |
1905 | 1905 | foreach ($matches[0] as $mkey => $heredoc) |
1906 | 1906 | { |
@@ -1914,7 +1914,7 @@ discard block |
||
1914 | 1914 | } |
1915 | 1915 | |
1916 | 1916 | // Split before everything that could possibly delimit a comment or a string. |
1917 | - $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|'. $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
1917 | + $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|' . $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
1918 | 1918 | |
1919 | 1919 | $in_string = 0; |
1920 | 1920 | $in_comment = 0; |
@@ -1197,7 +1197,8 @@ discard block |
||
1197 | 1197 | } |
1198 | 1198 | |
1199 | 1199 | // It's important to do the numbered ones before the named ones, or messes happen. |
1200 | - uksort($substitutions, function($a, $b) { |
|
1200 | + uksort($substitutions, function($a, $b) |
|
1201 | + { |
|
1201 | 1202 | if (is_int($a) && is_int($b)) |
1202 | 1203 | return $a > $b; |
1203 | 1204 | elseif (is_int($a)) |
@@ -1716,8 +1717,12 @@ discard block |
||
1716 | 1717 | unset($mtime, $settingsFile, $settingsText); |
1717 | 1718 | $defined_vars = get_defined_vars(); |
1718 | 1719 | } |
1719 | - catch (Throwable $e) {} |
|
1720 | - catch (ErrorException $e) {} |
|
1720 | + catch (Throwable $e) |
|
1721 | + { |
|
1722 | +} |
|
1723 | + catch (ErrorException $e) |
|
1724 | + { |
|
1725 | +} |
|
1721 | 1726 | if (isset($e)) |
1722 | 1727 | return false; |
1723 | 1728 | |
@@ -1877,7 +1882,8 @@ discard block |
||
1877 | 1882 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
1878 | 1883 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
1879 | 1884 | { |
1880 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
1885 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
1886 | + { |
|
1881 | 1887 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
1882 | 1888 | }, $var), array("'' . " => '', " . ''" => '')); |
1883 | 1889 | } |
@@ -1364,7 +1364,6 @@ |
||
1364 | 1364 | // return all the info. |
1365 | 1365 | return $context['to_install']; |
1366 | 1366 | } |
1367 | - |
|
1368 | 1367 | else |
1369 | 1368 | fatal_lang_error('theme_install_error_title', false); |
1370 | 1369 | } |
@@ -222,7 +222,6 @@ |
||
222 | 222 | |
223 | 223 | $this->_validLikes['can_like'] = ($this->_user['id'] == $topicOwner ? 'cannot_like_content' : (allowedTo('likes_like') ? true : 'cannot_like_content')); |
224 | 224 | } |
225 | - |
|
226 | 225 | else |
227 | 226 | { |
228 | 227 | // Modders: This will give you whatever the user offers up in terms of liking, e.g. $this->_type=msg, $this->_content=1 |