@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // @todo Tie in with bbc permissions ? |
| 41 | 41 | foreach (array('code', 'php', 'nobbc') as $code) |
| 42 | 42 | { |
| 43 | - if (strpos($text, '['. $code) !== false) |
|
| 43 | + if (strpos($text, '[' . $code) !== false) |
|
| 44 | 44 | { |
| 45 | 45 | $parts = preg_split('~(\[/' . $code . '\]|\[' . $code . '(?:=[^\]]+)?\])~i', $text, -1, PREG_SPLIT_DELIM_CAPTURE); |
| 46 | 46 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | // Parse unique ID's and disable javascript into the smileys - using the double space. |
| 78 | 78 | $i = 1; |
| 79 | 79 | $text = preg_replace_callback('~(?:\s| )?<(img\ssrc="' . preg_quote($modSettings['smileys_url'], '~') . '/[^<>]+?/([^<>]+?)"\s*)[^<>]*?class="smiley">~', |
| 80 | - function ($m) use (&$i) |
|
| 80 | + function($m) use (&$i) |
|
| 81 | 81 | { |
| 82 | 82 | return '<' . stripslashes($m[1]) . 'alt="" title="" onresizestart="return false;" id="smiley_' . $i++ . '_' . $m[2] . '" style="padding: 0 3px 0 3px;">'; |
| 83 | 83 | }, $text); |
@@ -605,10 +605,10 @@ discard block |
||
| 605 | 605 | // Inject closure for this list item first. |
| 606 | 606 | // The content of $parts[$i] is left as is! |
| 607 | 607 | array_splice($parts, $i + 1, 0, array( |
| 608 | - '', // $i + 1 |
|
| 609 | - '[/li]' . "\n", // $i + 2 |
|
| 610 | - '', // $i + 3 |
|
| 611 | - '', // $i + 4 |
|
| 608 | + '', // $i + 1 |
|
| 609 | + '[/li]' . "\n", // $i + 2 |
|
| 610 | + '', // $i + 3 |
|
| 611 | + '', // $i + 4 |
|
| 612 | 612 | )); |
| 613 | 613 | $numParts = count($parts) - 1; |
| 614 | 614 | |
@@ -726,167 +726,167 @@ discard block |
||
| 726 | 726 | |
| 727 | 727 | // The final bits are the easy ones - tags which map to tags which map to tags - etc etc. |
| 728 | 728 | $tags = array( |
| 729 | - '~<b(\s(.)*?)*?' . '>~i' => function () |
|
| 729 | + '~<b(\s(.)*?)*?' . '>~i' => function() |
|
| 730 | 730 | { |
| 731 | 731 | return '[b]'; |
| 732 | 732 | }, |
| 733 | - '~</b>~i' => function () |
|
| 733 | + '~</b>~i' => function() |
|
| 734 | 734 | { |
| 735 | 735 | return '[/b]'; |
| 736 | 736 | }, |
| 737 | - '~<i(\s(.)*?)*?' . '>~i' => function () |
|
| 737 | + '~<i(\s(.)*?)*?' . '>~i' => function() |
|
| 738 | 738 | { |
| 739 | 739 | return '[i]'; |
| 740 | 740 | }, |
| 741 | - '~</i>~i' => function () |
|
| 741 | + '~</i>~i' => function() |
|
| 742 | 742 | { |
| 743 | 743 | return '[/i]'; |
| 744 | 744 | }, |
| 745 | - '~<u(\s(.)*?)*?' . '>~i' => function () |
|
| 745 | + '~<u(\s(.)*?)*?' . '>~i' => function() |
|
| 746 | 746 | { |
| 747 | 747 | return '[u]'; |
| 748 | 748 | }, |
| 749 | - '~</u>~i' => function () |
|
| 749 | + '~</u>~i' => function() |
|
| 750 | 750 | { |
| 751 | 751 | return '[/u]'; |
| 752 | 752 | }, |
| 753 | - '~<strong(\s(.)*?)*?' . '>~i' => function () |
|
| 753 | + '~<strong(\s(.)*?)*?' . '>~i' => function() |
|
| 754 | 754 | { |
| 755 | 755 | return '[b]'; |
| 756 | 756 | }, |
| 757 | - '~</strong>~i' => function () |
|
| 757 | + '~</strong>~i' => function() |
|
| 758 | 758 | { |
| 759 | 759 | return '[/b]'; |
| 760 | 760 | }, |
| 761 | - '~<em(\s(.)*?)*?' . '>~i' => function () |
|
| 761 | + '~<em(\s(.)*?)*?' . '>~i' => function() |
|
| 762 | 762 | { |
| 763 | 763 | return '[i]'; |
| 764 | 764 | }, |
| 765 | - '~</em>~i' => function () |
|
| 765 | + '~</em>~i' => function() |
|
| 766 | 766 | { |
| 767 | 767 | return '[i]'; |
| 768 | 768 | }, |
| 769 | - '~<s(\s(.)*?)*?' . '>~i' => function () |
|
| 769 | + '~<s(\s(.)*?)*?' . '>~i' => function() |
|
| 770 | 770 | { |
| 771 | 771 | return "[s]"; |
| 772 | 772 | }, |
| 773 | - '~</s>~i' => function () |
|
| 773 | + '~</s>~i' => function() |
|
| 774 | 774 | { |
| 775 | 775 | return "[/s]"; |
| 776 | 776 | }, |
| 777 | - '~<strike(\s(.)*?)*?' . '>~i' => function () |
|
| 777 | + '~<strike(\s(.)*?)*?' . '>~i' => function() |
|
| 778 | 778 | { |
| 779 | 779 | return '[s]'; |
| 780 | 780 | }, |
| 781 | - '~</strike>~i' => function () |
|
| 781 | + '~</strike>~i' => function() |
|
| 782 | 782 | { |
| 783 | 783 | return '[/s]'; |
| 784 | 784 | }, |
| 785 | - '~<del(\s(.)*?)*?' . '>~i' => function () |
|
| 785 | + '~<del(\s(.)*?)*?' . '>~i' => function() |
|
| 786 | 786 | { |
| 787 | 787 | return '[s]'; |
| 788 | 788 | }, |
| 789 | - '~</del>~i' => function () |
|
| 789 | + '~</del>~i' => function() |
|
| 790 | 790 | { |
| 791 | 791 | return '[/s]'; |
| 792 | 792 | }, |
| 793 | - '~<center(\s(.)*?)*?' . '>~i' => function () |
|
| 793 | + '~<center(\s(.)*?)*?' . '>~i' => function() |
|
| 794 | 794 | { |
| 795 | 795 | return '[center]'; |
| 796 | 796 | }, |
| 797 | - '~</center>~i' => function () |
|
| 797 | + '~</center>~i' => function() |
|
| 798 | 798 | { |
| 799 | 799 | return '[/center]'; |
| 800 | 800 | }, |
| 801 | - '~<pre(\s(.)*?)*?' . '>~i' => function () |
|
| 801 | + '~<pre(\s(.)*?)*?' . '>~i' => function() |
|
| 802 | 802 | { |
| 803 | 803 | return '[pre]'; |
| 804 | 804 | }, |
| 805 | - '~</pre>~i' => function () |
|
| 805 | + '~</pre>~i' => function() |
|
| 806 | 806 | { |
| 807 | 807 | return '[/pre]'; |
| 808 | 808 | }, |
| 809 | - '~<sub(\s(.)*?)*?' . '>~i' => function () |
|
| 809 | + '~<sub(\s(.)*?)*?' . '>~i' => function() |
|
| 810 | 810 | { |
| 811 | 811 | return '[sub]'; |
| 812 | 812 | }, |
| 813 | - '~</sub>~i' => function () |
|
| 813 | + '~</sub>~i' => function() |
|
| 814 | 814 | { |
| 815 | 815 | return '[/sub]'; |
| 816 | 816 | }, |
| 817 | - '~<sup(\s(.)*?)*?' . '>~i' => function () |
|
| 817 | + '~<sup(\s(.)*?)*?' . '>~i' => function() |
|
| 818 | 818 | { |
| 819 | 819 | return '[sup]'; |
| 820 | 820 | }, |
| 821 | - '~</sup>~i' => function () |
|
| 821 | + '~</sup>~i' => function() |
|
| 822 | 822 | { |
| 823 | 823 | return '[/sup]'; |
| 824 | 824 | }, |
| 825 | - '~<tt(\s(.)*?)*?' . '>~i' => function () |
|
| 825 | + '~<tt(\s(.)*?)*?' . '>~i' => function() |
|
| 826 | 826 | { |
| 827 | 827 | return '[tt]'; |
| 828 | 828 | }, |
| 829 | - '~</tt>~i' => function () |
|
| 829 | + '~</tt>~i' => function() |
|
| 830 | 830 | { |
| 831 | 831 | return '[/tt]'; |
| 832 | 832 | }, |
| 833 | - '~<table(\s(.)*?)*?' . '>~i' => function () |
|
| 833 | + '~<table(\s(.)*?)*?' . '>~i' => function() |
|
| 834 | 834 | { |
| 835 | 835 | return '[table]'; |
| 836 | 836 | }, |
| 837 | - '~</table>~i' => function () |
|
| 837 | + '~</table>~i' => function() |
|
| 838 | 838 | { |
| 839 | 839 | return '[/table]'; |
| 840 | 840 | }, |
| 841 | - '~<tr(\s(.)*?)*?' . '>~i' => function () |
|
| 841 | + '~<tr(\s(.)*?)*?' . '>~i' => function() |
|
| 842 | 842 | { |
| 843 | 843 | return '[tr]'; |
| 844 | 844 | }, |
| 845 | - '~</tr>~i' => function () |
|
| 845 | + '~</tr>~i' => function() |
|
| 846 | 846 | { |
| 847 | 847 | return '[/tr]'; |
| 848 | 848 | }, |
| 849 | - '~<(td|th)\s[^<>]*?colspan="?(\d{1,2})"?.*?' . '>~i' => function ($matches) |
|
| 849 | + '~<(td|th)\s[^<>]*?colspan="?(\d{1,2})"?.*?' . '>~i' => function($matches) |
|
| 850 | 850 | { |
| 851 | 851 | return str_repeat('[td][/td]', $matches[2] - 1) . '[td]'; |
| 852 | 852 | }, |
| 853 | - '~<(td|th)(\s(.)*?)*?' . '>~i' => function () |
|
| 853 | + '~<(td|th)(\s(.)*?)*?' . '>~i' => function() |
|
| 854 | 854 | { |
| 855 | 855 | return '[td]'; |
| 856 | 856 | }, |
| 857 | - '~</(td|th)>~i' => function () |
|
| 857 | + '~</(td|th)>~i' => function() |
|
| 858 | 858 | { |
| 859 | 859 | return '[/td]'; |
| 860 | 860 | }, |
| 861 | - '~<br(?:\s[^<>]*?)?' . '>~i' => function () |
|
| 861 | + '~<br(?:\s[^<>]*?)?' . '>~i' => function() |
|
| 862 | 862 | { |
| 863 | 863 | return "\n"; |
| 864 | 864 | }, |
| 865 | - '~<hr[^<>]*>(\n)?~i' => function ($matches) |
|
| 865 | + '~<hr[^<>]*>(\n)?~i' => function($matches) |
|
| 866 | 866 | { |
| 867 | - return "[hr]\n". $matches[0]; |
|
| 867 | + return "[hr]\n" . $matches[0]; |
|
| 868 | 868 | }, |
| 869 | - '~(\n)?\\[hr\\]~i' => function () |
|
| 869 | + '~(\n)?\\[hr\\]~i' => function() |
|
| 870 | 870 | { |
| 871 | 871 | return "\n[hr]"; |
| 872 | 872 | }, |
| 873 | - '~^\n\\[hr\\]~i' => function () |
|
| 873 | + '~^\n\\[hr\\]~i' => function() |
|
| 874 | 874 | { |
| 875 | 875 | return "[hr]"; |
| 876 | 876 | }, |
| 877 | - '~<blockquote(\s(.)*?)*?' . '>~i' => function () |
|
| 877 | + '~<blockquote(\s(.)*?)*?' . '>~i' => function() |
|
| 878 | 878 | { |
| 879 | 879 | return "<blockquote>"; |
| 880 | 880 | }, |
| 881 | - '~</blockquote>~i' => function () |
|
| 881 | + '~</blockquote>~i' => function() |
|
| 882 | 882 | { |
| 883 | 883 | return "</blockquote>"; |
| 884 | 884 | }, |
| 885 | - '~<ins(\s(.)*?)*?' . '>~i' => function () |
|
| 885 | + '~<ins(\s(.)*?)*?' . '>~i' => function() |
|
| 886 | 886 | { |
| 887 | 887 | return "<ins>"; |
| 888 | 888 | }, |
| 889 | - '~</ins>~i' => function () |
|
| 889 | + '~</ins>~i' => function() |
|
| 890 | 890 | { |
| 891 | 891 | return "</ins>"; |
| 892 | 892 | }, |
@@ -2391,7 +2391,7 @@ discard block |
||
| 2391 | 2391 | array( |
| 2392 | 2392 | 'group_name' => $smcFunc['db_case_sensitive'] ? 'LOWER(group_name}' : 'group_name', |
| 2393 | 2393 | 'min_posts' => -1, |
| 2394 | - 'invalid_groups' => array(1,3), |
|
| 2394 | + 'invalid_groups' => array(1, 3), |
|
| 2395 | 2395 | 'hidden' => 2, |
| 2396 | 2396 | 'search' => $_REQUEST['search'], |
| 2397 | 2397 | ) |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | if ($curAction == 'approve') |
| 178 | 178 | { |
| 179 | - approveMessages ($toAction, $details, $context['current_view']); |
|
| 179 | + approveMessages($toAction, $details, $context['current_view']); |
|
| 180 | 180 | } |
| 181 | 181 | else |
| 182 | 182 | { |
| 183 | - removeMessages ($toAction, $details, $context['current_view']); |
|
| 183 | + removeMessages($toAction, $details, $context['current_view']); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | 'value' => $txt['mc_unapproved_attach_poster'], |
| 438 | 438 | ), |
| 439 | 439 | 'data' => array( |
| 440 | - 'function' => function ($data) |
|
| 440 | + 'function' => function($data) |
|
| 441 | 441 | { |
| 442 | 442 | return $data['poster']['link']; |
| 443 | 443 | }, |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | 'value' => $txt['post'], |
| 468 | 468 | ), |
| 469 | 469 | 'data' => array( |
| 470 | - 'function' => function ($data) |
|
| 470 | + 'function' => function($data) |
|
| 471 | 471 | { |
| 472 | 472 | return '<a href="' . $data['message']['href'] . '">' . shorten_subject($data['message']['subject'], 20) . '</a>'; |
| 473 | 473 | }, |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | logAction(($approved ? 'un' : '') . 'approve', array('topic' => $topic, 'subject' => $subject, 'member' => $poster, 'board' => $board)); |
| 694 | 694 | } |
| 695 | 695 | |
| 696 | - redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg']. '#msg' . $_REQUEST['msg']); |
|
| 696 | + redirectexit('topic=' . $topic . '.msg' . $_REQUEST['msg'] . '#msg' . $_REQUEST['msg']); |
|
| 697 | 697 | } |
| 698 | 698 | |
| 699 | 699 | /** |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | 'value' => $txt['spider_name'], |
| 240 | 240 | ), |
| 241 | 241 | 'data' => array( |
| 242 | - 'function' => function ($rowData) use ($smcFunc, $scripturl) |
|
| 242 | + 'function' => function($rowData) use ($smcFunc, $scripturl) |
|
| 243 | 243 | { |
| 244 | 244 | return sprintf('<a href="%1$s?action=admin;area=sengines;sa=editspiders;sid=%2$d">%3$s</a>', $scripturl, $rowData['id_spider'], $smcFunc['htmlspecialchars']($rowData['spider_name'])); |
| 245 | 245 | }, |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | 'value' => $txt['spider_last_seen'], |
| 255 | 255 | ), |
| 256 | 256 | 'data' => array( |
| 257 | - 'function' => function ($rowData) use ($context, $txt) |
|
| 257 | + 'function' => function($rowData) use ($context, $txt) |
|
| 258 | 258 | { |
| 259 | 259 | return isset($context['spider_last_seen'][$rowData['id_spider']]) ? timeformat($context['spider_last_seen'][$rowData['id_spider']]) : $txt['spider_last_never']; |
| 260 | 260 | }, |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | |
| 691 | 691 | if (!empty($_POST['delete_entries']) && isset($_POST['older'])) |
| 692 | 692 | { |
| 693 | - $deleteTime = time() - (((int)$_POST['older']) * 24 * 60 * 60); |
|
| 693 | + $deleteTime = time() - (((int) $_POST['older']) * 24 * 60 * 60); |
|
| 694 | 694 | |
| 695 | 695 | // Delete the entires. |
| 696 | 696 | $smcFunc['db_query']('', ' |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | 'value' => $txt['spider_time'], |
| 743 | 743 | ), |
| 744 | 744 | 'data' => array( |
| 745 | - 'function' => function ($rowData) |
|
| 745 | + 'function' => function($rowData) |
|
| 746 | 746 | { |
| 747 | 747 | return timeformat($rowData['log_time']); |
| 748 | 748 | }, |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:regular_id_group} THEN mem.id_post_group ELSE mem.id_group END)' . |
| 511 | 511 | (empty($customJoin) ? '' : implode(' |
| 512 | 512 | ', $customJoin)) . ' |
| 513 | - WHERE (' . implode( ' ' . $query . ' OR ', $fields) . ' ' . $query . ') |
|
| 513 | + WHERE (' . implode(' ' . $query . ' OR ', $fields) . ' ' . $query . ') |
|
| 514 | 514 | AND mem.is_activated = {int:is_activated}', |
| 515 | 515 | $query_parameters |
| 516 | 516 | ); |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:regular_id_group} THEN mem.id_post_group ELSE mem.id_group END)' . |
| 528 | 528 | (empty($customJoin) ? '' : implode(' |
| 529 | 529 | ', $customJoin)) . ' |
| 530 | - WHERE (' . implode( ' ' . $query . ' OR ', $fields) . ' ' . $query . ') |
|
| 530 | + WHERE (' . implode(' ' . $query . ' OR ', $fields) . ' ' . $query . ') |
|
| 531 | 531 | AND mem.is_activated = {int:is_activated} |
| 532 | 532 | ORDER BY {raw:sort} |
| 533 | 533 | LIMIT {int:start}, {int:max}', |
@@ -700,7 +700,7 @@ discard block |
||
| 700 | 700 | 'up' => 't' . $row['col_name'] . '.value ASC' |
| 701 | 701 | ); |
| 702 | 702 | |
| 703 | - $cpf['join'][$row['col_name']] = 'LEFT JOIN {db_prefix}themes AS t' . $row['col_name'] . ' ON (t' . $row['col_name'] . '.variable = {literal:' . $row['col_name'] . '} AND t' . $row['col_name'] . '.id_theme = 1 AND t' . $row['col_name'] . '.id_member = mem.id_member)'; |
|
| 703 | + $cpf['join'][$row['col_name']] = 'LEFT JOIN {db_prefix}themes AS t' . $row['col_name'] . ' ON (t' . $row['col_name'] . '.variable = {literal:' . $row['col_name'] . '} AND t' . $row['col_name'] . '.id_theme = 1 AND t' . $row['col_name'] . '.id_member = mem.id_member)'; |
|
| 704 | 704 | } |
| 705 | 705 | $smcFunc['db_free_result']($request); |
| 706 | 706 | |
@@ -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; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function setInitKey($key) |
| 116 | 116 | { |
| 117 | - if (preg_match('/^['.implode('', array_keys($this->getLookup())).']+$/', $key) == false) { |
|
| 117 | + if (preg_match('/^[' . implode('', array_keys($this->getLookup())) . ']+$/', $key) == false) { |
|
| 118 | 118 | throw new \InvalidArgumentException('Invalid base32 hash!'); |
| 119 | 119 | } |
| 120 | 120 | $this->initKey = $key; |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | $initKey = ($initKey == null) ? $this->getInitKey() : $initKey; |
| 248 | 248 | $timestamp = ($timestamp == null) ? $this->generateTimestamp() : $timestamp; |
| 249 | 249 | |
| 250 | - $hash = hash_hmac ( |
|
| 250 | + $hash = hash_hmac( |
|
| 251 | 251 | 'sha1', |
| 252 | 252 | pack('N*', 0) . pack('N*', $timestamp), |
| 253 | 253 | $initKey, |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $code = ''; |
| 271 | 271 | |
| 272 | 272 | for ($i = 0; $i < $length; $i++) { |
| 273 | - $code .= $lookup[mt_rand(0, strlen($lookup)-1)]; |
|
| 273 | + $code .= $lookup[mt_rand(0, strlen($lookup) - 1)]; |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | return $code; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | */ |
| 284 | 284 | public function generateTimestamp() |
| 285 | 285 | { |
| 286 | - return floor(microtime(true)/$this->getRefresh()); |
|
| 286 | + return floor(microtime(true) / $this->getRefresh()); |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | /** |
@@ -297,10 +297,10 @@ discard block |
||
| 297 | 297 | $offset = ord($hash[19]) & 0xf; |
| 298 | 298 | |
| 299 | 299 | return ( |
| 300 | - ((ord($hash[$offset+0]) & 0x7f) << 24 ) | |
|
| 301 | - ((ord($hash[$offset+1]) & 0xff) << 16 ) | |
|
| 302 | - ((ord($hash[$offset+2]) & 0xff) << 8 ) | |
|
| 303 | - (ord($hash[$offset+3]) & 0xff) |
|
| 300 | + ((ord($hash[$offset + 0]) & 0x7f) << 24) | |
|
| 301 | + ((ord($hash[$offset + 1]) & 0xff) << 16) | |
|
| 302 | + ((ord($hash[$offset + 2]) & 0xff) << 8) | |
|
| 303 | + (ord($hash[$offset + 3]) & 0xff) |
|
| 304 | 304 | ) % pow(10, $this->getCodeLength()); |
| 305 | 305 | } |
| 306 | 306 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | { |
| 316 | 316 | $lookup = $this->getLookup(); |
| 317 | 317 | |
| 318 | - if (preg_match('/^['.implode('', array_keys($lookup)).']+$/', $hash) == false) { |
|
| 318 | + if (preg_match('/^[' . implode('', array_keys($lookup)) . ']+$/', $hash) == false) { |
|
| 319 | 319 | throw new \InvalidArgumentException('Invalid base32 hash!'); |
| 320 | 320 | } |
| 321 | 321 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | // Righty - let's do the damn thing! |
| 126 | 126 | $table_query = 'CREATE TABLE ' . $table_name . "\n" . '('; |
| 127 | 127 | foreach ($columns as $column) |
| 128 | - $table_query .= "\n\t" . smf_db_create_query_column($column) . ','; |
|
| 128 | + $table_query .= "\n\t" . smf_db_create_query_column($column) . ','; |
|
| 129 | 129 | |
| 130 | 130 | // Loop through the indexes next... |
| 131 | 131 | foreach ($indexes as $index) |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | $type = $type . '(' . $size . ')'; |
| 745 | 745 | |
| 746 | 746 | // Now just put it together! |
| 747 | - return '`' .$column['name'] . '` ' . $type . ' ' . (!empty($unsigned) ? $unsigned : '') . (!empty($column['null']) ? '' : 'NOT NULL') . ' ' . $default; |
|
| 747 | + return '`' . $column['name'] . '` ' . $type . ' ' . (!empty($unsigned) ? $unsigned : '') . (!empty($column['null']) ? '' : 'NOT NULL') . ' ' . $default; |
|
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | ?> |
| 751 | 751 | \ No newline at end of file |
@@ -515,7 +515,7 @@ |
||
| 515 | 515 | 'value' => $txt['scheduled_log_time_run'], |
| 516 | 516 | ), |
| 517 | 517 | 'data' => array( |
| 518 | - 'function' => function ($rowData) |
|
| 518 | + 'function' => function($rowData) |
|
| 519 | 519 | { |
| 520 | 520 | return timeformat($rowData['time_run'], true); |
| 521 | 521 | }, |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | // This ensures you can't search someones email address if you can't see it. |
| 394 | 394 | if (($use_wildcards || $maybe_email) && allowedTo('moderate_forum')) |
| 395 | 395 | $email_condition = ' |
| 396 | - OR (email_address ' . $comparison . ' \'' . implode( '\') OR (email_address ' . $comparison . ' \'', $names) . '\')'; |
|
| 396 | + OR (email_address ' . $comparison . ' \'' . implode('\') OR (email_address ' . $comparison . ' \'', $names) . '\')'; |
|
| 397 | 397 | else |
| 398 | 398 | $email_condition = ''; |
| 399 | 399 | |
@@ -412,8 +412,8 @@ discard block |
||
| 412 | 412 | LIMIT {int:limit}', |
| 413 | 413 | array( |
| 414 | 414 | 'buddy_list' => $user_info['buddies'], |
| 415 | - 'member_name_search' => $member_name . ' ' . $comparison . ' \'' . implode( '\' OR ' . $member_name . ' ' . $comparison . ' \'', $names) . '\'', |
|
| 416 | - 'real_name_search' => $real_name . ' ' . $comparison . ' \'' . implode( '\' OR ' . $real_name . ' ' . $comparison . ' \'', $names) . '\'', |
|
| 415 | + 'member_name_search' => $member_name . ' ' . $comparison . ' \'' . implode('\' OR ' . $member_name . ' ' . $comparison . ' \'', $names) . '\'', |
|
| 416 | + 'real_name_search' => $real_name . ' ' . $comparison . ' \'' . implode('\' OR ' . $real_name . ' ' . $comparison . ' \'', $names) . '\'', |
|
| 417 | 417 | 'email_condition' => $email_condition, |
| 418 | 418 | 'limit' => $max, |
| 419 | 419 | ) |