@@ -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> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | /** |
21 | 21 | * Constants for reply types. |
22 | - */ |
|
22 | + */ |
|
23 | 23 | const NOTIFY_TYPE_REPLY_AND_MODIFY = 1; |
24 | 24 | const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2; |
25 | 25 | const NOTIFY_TYPE_ONLY_REPLIES = 3; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Constants for frequencies. |
30 | - */ |
|
30 | + */ |
|
31 | 31 | const FREQUENCY_NOTHING = 0; |
32 | 32 | const FREQUENCY_EVERYTHING = 1; |
33 | 33 | const FREQUENCY_FIRST_UNREAD_MSG = 2; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | const FREQUENCY_WEEKLY_DIGEST = 4; |
36 | 36 | |
37 | 37 | /** |
38 | - * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
38 | + * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
39 | 39 | * @return bool Always returns true |
40 | 40 | */ |
41 | 41 | public function execute() |
@@ -103,7 +103,7 @@ |
||
103 | 103 | if ($type == 'edit') |
104 | 104 | { |
105 | 105 | // Filter out members who have already been notified about this post's topic |
106 | - $unnotified = array_filter($watched, function ($member) |
|
106 | + $unnotified = array_filter($watched, function($member) |
|
107 | 107 | { |
108 | 108 | return empty($member['sent']); |
109 | 109 | }); |
@@ -310,7 +310,6 @@ discard block |
||
310 | 310 | $replacement .= $precedingStyle . $extra_attr . $afterStyle; |
311 | 311 | } |
312 | 312 | } |
313 | - |
|
314 | 313 | elseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1) |
315 | 314 | { |
316 | 315 | // Is this the element that we've been waiting for to be closed? |
@@ -570,7 +569,6 @@ discard block |
||
570 | 569 | $parts[$i + 2] = str_repeat("\t", $listDepth) . '[/list]'; |
571 | 570 | $parts[$i + 3] = ''; |
572 | 571 | } |
573 | - |
|
574 | 572 | else |
575 | 573 | { |
576 | 574 | // We're in a list item. |
@@ -609,7 +607,6 @@ discard block |
||
609 | 607 | $parts[$i + 2] = ''; |
610 | 608 | $parts[$i + 3] = ''; |
611 | 609 | } |
612 | - |
|
613 | 610 | else |
614 | 611 | { |
615 | 612 | // Remove the trailing breaks from the list item. |
@@ -280,7 +280,7 @@ |
||
280 | 280 | $ret .= |
281 | 281 | chr(($this->m_arColors[$i] & 0x000000FF)) . // R |
282 | 282 | chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
283 | - chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
283 | + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | return $ret; |
@@ -498,7 +498,7 @@ |
||
498 | 498 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
499 | 499 | |
500 | 500 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
501 | - { |
|
501 | + { |
|
502 | 502 | return $v != $set; |
503 | 503 | }); |
504 | 504 | } |
@@ -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) |
@@ -2147,7 +2147,6 @@ discard block |
||
2147 | 2147 | loadLanguage('index+Modifications'); |
2148 | 2148 | $context['template_layers'] = array(); |
2149 | 2149 | } |
2150 | - |
|
2151 | 2150 | else |
2152 | 2151 | { |
2153 | 2152 | // Custom templates to load, or just default? |
@@ -2525,14 +2524,12 @@ discard block |
||
2525 | 2524 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
2526 | 2525 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
2527 | 2526 | } |
2528 | - |
|
2529 | 2527 | else |
2530 | 2528 | { |
2531 | 2529 | $fileUrl = false; |
2532 | 2530 | $filePath = false; |
2533 | 2531 | } |
2534 | 2532 | } |
2535 | - |
|
2536 | 2533 | else |
2537 | 2534 | { |
2538 | 2535 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2639,14 +2636,12 @@ discard block |
||
2639 | 2636 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
2640 | 2637 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
2641 | 2638 | } |
2642 | - |
|
2643 | 2639 | else |
2644 | 2640 | { |
2645 | 2641 | $fileUrl = false; |
2646 | 2642 | $filePath = false; |
2647 | 2643 | } |
2648 | 2644 | } |
2649 | - |
|
2650 | 2645 | else |
2651 | 2646 | { |
2652 | 2647 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -1254,7 +1254,6 @@ |
||
1254 | 1254 | |
1255 | 1255 | return array($charset, $string, 'base64'); |
1256 | 1256 | } |
1257 | - |
|
1258 | 1257 | else |
1259 | 1258 | return array($charset, $string, '7bit'); |
1260 | 1259 | } |
@@ -1997,7 +1997,7 @@ |
||
1997 | 1997 | // Remove anything that isn't actually new from our list of files |
1998 | 1998 | foreach ($to_unset as $key => $ids) |
1999 | 1999 | { |
2000 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
2000 | + if (array_reduce($ids, function($carry, $item) { return $carry * $item; }, true) == true) |
|
2001 | 2001 | unset($smiley_files[$key]); |
2002 | 2002 | } |
2003 | 2003 |
@@ -1997,7 +1997,9 @@ |
||
1997 | 1997 | // Remove anything that isn't actually new from our list of files |
1998 | 1998 | foreach ($to_unset as $key => $ids) |
1999 | 1999 | { |
2000 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
2000 | + if (array_reduce($ids, function ($carry, $item) |
|
2001 | + { |
|
2002 | +return $carry * $item; }, true) == true) |
|
2001 | 2003 | unset($smiley_files[$key]); |
2002 | 2004 | } |
2003 | 2005 |
@@ -67,8 +67,7 @@ |
||
67 | 67 | $sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8); |
68 | 68 | switch ($word{$i} === 's' ? 0 : mt_rand(0, 2)) |
69 | 69 | { |
70 | - case 0 : |
|
71 | - for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
70 | + case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
72 | 71 | for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++) |
73 | 72 | $sound_word .= $word{$i} === 's' ? $sound_letter{$j} : chr(mt_rand(max(ord($sound_letter{$j}) - 1, 0x00), min(ord($sound_letter{$j}) + 1, 0xFF))); |
74 | 73 | break; |