@@ -143,7 +143,7 @@ |
||
| 143 | 143 | |
| 144 | 144 | // Redirect to the selector if they chose selective. |
| 145 | 145 | if ($_POST['step2'] == 'selective') |
| 146 | - redirectexit ('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
| 146 | + redirectexit('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
| 147 | 147 | |
| 148 | 148 | $_POST['at'] = (int) $_POST['at']; |
| 149 | 149 | $messagesToBeSplit = array(); |
@@ -645,13 +645,13 @@ discard block |
||
| 645 | 645 | 'quickbuttons' => array( |
| 646 | 646 | 'edit' => array( |
| 647 | 647 | 'label' => $txt['draft_edit'], |
| 648 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
| 648 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
| 649 | 649 | 'icon' => 'modify_button' |
| 650 | 650 | ), |
| 651 | 651 | 'delete' => array( |
| 652 | 652 | 'label' => $txt['draft_delete'], |
| 653 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 654 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'" class="you_sure"', |
|
| 653 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 654 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '" class="you_sure"', |
|
| 655 | 655 | 'icon' => 'remove_button' |
| 656 | 656 | ), |
| 657 | 657 | ), |
@@ -837,13 +837,13 @@ discard block |
||
| 837 | 837 | 'quickbuttons' => array( |
| 838 | 838 | 'edit' => array( |
| 839 | 839 | 'label' => $txt['draft_edit'], |
| 840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 841 | 841 | 'icon' => 'modify_button' |
| 842 | 842 | ), |
| 843 | 843 | 'delete' => array( |
| 844 | 844 | 'label' => $txt['draft_delete'], |
| 845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?" class="you_sure"', |
|
| 845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?" class="you_sure"', |
|
| 847 | 847 | 'icon' => 'remove_button' |
| 848 | 848 | ), |
| 849 | 849 | ), |
@@ -960,7 +960,7 @@ |
||
| 960 | 960 | $incontext['continue'] = 1; |
| 961 | 961 | |
| 962 | 962 | // Check Postgres setting |
| 963 | - if ( $db_type === 'postgresql') |
|
| 963 | + if ($db_type === 'postgresql') |
|
| 964 | 964 | { |
| 965 | 965 | load_database(); |
| 966 | 966 | $result = $smcFunc['db_query']('', ' |
@@ -1720,7 +1720,7 @@ |
||
| 1720 | 1720 | { |
| 1721 | 1721 | // Avoid double separators and empty titled sections |
| 1722 | 1722 | $empty_section = true; |
| 1723 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
| 1723 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
| 1724 | 1724 | { |
| 1725 | 1725 | // Found another separator, so we're done |
| 1726 | 1726 | if (!is_array($context['theme_options'][$j])) |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
| 262 | 262 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
| 263 | 263 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
| 264 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
| 264 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
| 265 | 265 | OFFSET {int:offset}' : ''), |
| 266 | 266 | array( |
| 267 | 267 | 'id_member' => $memID, |
@@ -1108,20 +1108,20 @@ discard block |
||
| 1108 | 1108 | $context['posts'][$key]['quickbuttons'] = array( |
| 1109 | 1109 | 'reply' => array( |
| 1110 | 1110 | 'label' => $txt['reply'], |
| 1111 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 1111 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 1112 | 1112 | 'icon' => 'reply_button', |
| 1113 | 1113 | 'show' => $post['can_reply'] |
| 1114 | 1114 | ), |
| 1115 | 1115 | 'quote' => array( |
| 1116 | 1116 | 'label' => $txt['quote_action'], |
| 1117 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 1117 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 1118 | 1118 | 'icon' => 'quote', |
| 1119 | 1119 | 'show' => $post['can_quote'] |
| 1120 | 1120 | ), |
| 1121 | 1121 | 'remove' => array( |
| 1122 | 1122 | 'label' => $txt['remove'], |
| 1123 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1124 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
| 1123 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1124 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
| 1125 | 1125 | 'icon' => 'remove_button', |
| 1126 | 1126 | 'show' => $post['can_delete'] |
| 1127 | 1127 | ) |
@@ -330,7 +330,7 @@ |
||
| 330 | 330 | WHERE t.id_board = {int:current_board} ' |
| 331 | 331 | . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
| 332 | 332 | AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' |
| 333 | - AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). ' |
|
| 333 | + AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . ' |
|
| 334 | 334 | ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
| 335 | 335 | LIMIT {int:maxindex} |
| 336 | 336 | OFFSET {int:start} '; |
@@ -1155,7 +1155,7 @@ |
||
| 1155 | 1155 | // We're really just checking for entries which are create table AND add columns (etc). |
| 1156 | 1156 | $tables = array(); |
| 1157 | 1157 | |
| 1158 | - usort($db_package_log, function ($a, $b) |
|
| 1158 | + usort($db_package_log, function($a, $b) |
|
| 1159 | 1159 | { |
| 1160 | 1160 | if ($a[0] == $b[0]) |
| 1161 | 1161 | return 0; |
@@ -1631,14 +1631,14 @@ discard block |
||
| 1631 | 1631 | $output['quickbuttons'] = array( |
| 1632 | 1632 | 'quote' => array( |
| 1633 | 1633 | 'label' => $txt['quote_action'], |
| 1634 | - 'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'], |
|
| 1635 | - 'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"', |
|
| 1634 | + 'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], |
|
| 1635 | + 'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"', |
|
| 1636 | 1636 | 'icon' => 'quote', |
| 1637 | 1637 | 'show' => $context['can_quote'] |
| 1638 | 1638 | ), |
| 1639 | 1639 | 'quote_selected' => array( |
| 1640 | 1640 | 'label' => $txt['quote_selected_action'], |
| 1641 | - 'id' => 'quoteSelected_'. $output['id'], |
|
| 1641 | + 'id' => 'quoteSelected_' . $output['id'], |
|
| 1642 | 1642 | 'href' => 'javascript:void(0)', |
| 1643 | 1643 | 'custom' => 'style="display:none"', |
| 1644 | 1644 | 'icon' => 'quote_selected', |
@@ -1647,71 +1647,71 @@ discard block |
||
| 1647 | 1647 | 'quick_edit' => array( |
| 1648 | 1648 | 'label' => $txt['quick_edit'], |
| 1649 | 1649 | 'class' => 'quick_edit', |
| 1650 | - 'id' =>' modify_button_'. $output['id'], |
|
| 1651 | - 'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"', |
|
| 1650 | + 'id' =>' modify_button_' . $output['id'], |
|
| 1651 | + 'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"', |
|
| 1652 | 1652 | 'icon' => 'quick_edit_button', |
| 1653 | 1653 | 'show' => $output['can_modify'] |
| 1654 | 1654 | ), |
| 1655 | 1655 | 'more' => array( |
| 1656 | 1656 | 'modify' => array( |
| 1657 | 1657 | 'label' => $txt['modify'], |
| 1658 | - 'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'], |
|
| 1658 | + 'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'], |
|
| 1659 | 1659 | 'icon' => 'modify_button', |
| 1660 | 1660 | 'show' => $output['can_modify'] |
| 1661 | 1661 | ), |
| 1662 | 1662 | 'remove_topic' => array( |
| 1663 | 1663 | 'label' => $txt['remove_topic'], |
| 1664 | - 'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1665 | - 'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'" class="you_sure"', |
|
| 1664 | + 'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1665 | + 'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '" class="you_sure"', |
|
| 1666 | 1666 | 'icon' => 'remove_button', |
| 1667 | 1667 | 'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id']) |
| 1668 | 1668 | ), |
| 1669 | 1669 | 'remove' => array( |
| 1670 | 1670 | 'label' => $txt['remove'], |
| 1671 | - 'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1672 | - 'javascript' => 'data-confirm="'.$txt['remove_message_question'].'" class="you_sure"', |
|
| 1671 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1672 | + 'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '" class="you_sure"', |
|
| 1673 | 1673 | 'icon' => 'remove_button', |
| 1674 | 1674 | 'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id']) |
| 1675 | 1675 | ), |
| 1676 | 1676 | 'split' => array( |
| 1677 | 1677 | 'label' => $txt['split'], |
| 1678 | - 'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'], |
|
| 1678 | + 'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'], |
|
| 1679 | 1679 | 'icon' => 'split_button', |
| 1680 | 1680 | 'show' => $context['can_split'] && !empty($context['real_num_replies']) |
| 1681 | 1681 | ), |
| 1682 | 1682 | 'report' => array( |
| 1683 | 1683 | 'label' => $txt['report_to_mod'], |
| 1684 | - 'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'], |
|
| 1684 | + 'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'], |
|
| 1685 | 1685 | 'icon' => 'error', |
| 1686 | 1686 | 'show' => $context['can_report_moderator'] |
| 1687 | 1687 | ), |
| 1688 | 1688 | 'warn' => array( |
| 1689 | 1689 | 'label' => $txt['issue_warning'], |
| 1690 | - 'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'], |
|
| 1690 | + 'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'], |
|
| 1691 | 1691 | 'icon' => 'warn_button', |
| 1692 | 1692 | 'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest'] |
| 1693 | 1693 | ), |
| 1694 | 1694 | 'restore' => array( |
| 1695 | 1695 | 'label' => $txt['restore_message'], |
| 1696 | - 'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1696 | + 'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1697 | 1697 | 'icon' => 'restore_button', |
| 1698 | 1698 | 'show' => $context['can_restore_msg'] |
| 1699 | 1699 | ), |
| 1700 | 1700 | 'approve' => array( |
| 1701 | 1701 | 'label' => $txt['approve'], |
| 1702 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1702 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1703 | 1703 | 'icon' => 'approve_button', |
| 1704 | 1704 | 'show' => $output['can_approve'] |
| 1705 | 1705 | ), |
| 1706 | 1706 | 'unapprove' => array( |
| 1707 | 1707 | 'label' => $txt['unapprove'], |
| 1708 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1708 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1709 | 1709 | 'icon' => 'unapprove_button', |
| 1710 | 1710 | 'show' => $output['can_unapprove'] |
| 1711 | 1711 | ), |
| 1712 | 1712 | ), |
| 1713 | 1713 | 'quickmod' => array( |
| 1714 | - 'id' => 'in_topic_mod_check_'. $output['id'], |
|
| 1714 | + 'id' => 'in_topic_mod_check_' . $output['id'], |
|
| 1715 | 1715 | 'custom' => 'style="display: none;"', |
| 1716 | 1716 | 'content' => '', |
| 1717 | 1717 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'], |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | require_once($sourcedir . '/Load.php'); |
| 76 | 76 | |
| 77 | 77 | // If $maintenance is set specifically to 2, then we're upgrading or something. |
| 78 | -if (!empty($maintenance) && 2 === $maintenance) |
|
| 78 | +if (!empty($maintenance) && 2 === $maintenance) |
|
| 79 | 79 | display_maintenance_message(); |
| 80 | 80 | |
| 81 | 81 | // Create a variable to store some SMF specific functions in. |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * |
| 126 | 126 | * @param string $class The fully-qualified class name. |
| 127 | 127 | */ |
| 128 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
| 128 | +spl_autoload_register(function($class) use ($sourcedir) |
|
| 129 | 129 | { |
| 130 | 130 | $classMap = array( |
| 131 | 131 | 'ReCaptcha\\' => 'ReCaptcha/', |