@@ -738,7 +738,7 @@ |
||
| 738 | 738 | ); |
| 739 | 739 | else |
| 740 | 740 | $context['allowed_actions'] = array( |
| 741 | - 'ok' => $txt['admin_browse_w_approve'] .' '. $txt['admin_browse_no_email'], |
|
| 741 | + 'ok' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_no_email'], |
|
| 742 | 742 | 'okemail' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_w_email'], |
| 743 | 743 | 'require_activation' => $txt['admin_browse_w_approve_require_activate'], |
| 744 | 744 | 'reject' => $txt['admin_browse_w_reject'], |
@@ -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'], |
@@ -93,13 +93,13 @@ discard block |
||
| 93 | 93 | ), |
| 94 | 94 | 'ignore' => array( |
| 95 | 95 | 'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'], |
| 96 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 96 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 97 | 97 | 'javascript' => !$report['ignore'] ? ' class="you_sure" data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 98 | 98 | 'icon' => 'ignore' |
| 99 | 99 | ), |
| 100 | 100 | 'close' => array( |
| 101 | 101 | 'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], |
| 102 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 102 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 103 | 103 | 'icon' => $context['view_closed'] ? 'folder' : 'close', |
| 104 | 104 | ), |
| 105 | 105 | ); |
@@ -108,17 +108,17 @@ discard block |
||
| 108 | 108 | if ($context['report_type'] == 'posts') |
| 109 | 109 | $context['reports'][$key]['quickbuttons']['delete'] = array( |
| 110 | 110 | 'label' => $txt['mc_reportedp_delete'], |
| 111 | - 'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'], |
|
| 112 | - 'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'" class="you_sure"', |
|
| 111 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'], |
|
| 112 | + 'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"', |
|
| 113 | 113 | 'icon' => 'delete', |
| 114 | 114 | 'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])) |
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | // Ban reported member/post author link |
| 118 | 118 | if ($context['report_type'] == 'members') |
| 119 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id']; |
|
| 119 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
| 120 | 120 | else |
| 121 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id']; |
|
| 121 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
| 122 | 122 | |
| 123 | 123 | $context['reports'][$key]['quickbuttons'] += array( |
| 124 | 124 | 'ban' => array( |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'show' => !$report['closed'] && !empty($context['report_manage_bans']) && ($context['report_type'] == 'posts' || $context['report_type'] == 'members' && !empty($report['user']['id'])) |
| 129 | 129 | ), |
| 130 | 130 | 'quickmod' => array( |
| 131 | - 'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">', |
|
| 131 | + 'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">', |
|
| 132 | 132 | 'show' => !$context['view_closed'] |
| 133 | 133 | ) |
| 134 | 134 | ); |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | { |
| 421 | 421 | $extra = $alerts[$id_alert]['extra']; |
| 422 | 422 | $search = array('{member_link}', '{scripturl}'); |
| 423 | - $repl = array(!empty($alert['sender_id']) && $alert['show_links'] ? '<a href="' . $scripturl . '?action=profile;u=' . $alert['sender_id'] . '">' . $alert['sender_name'] . '</a>' : '<strong>'.$alert['sender_name'].'</strong>', $scripturl); |
|
| 423 | + $repl = array(!empty($alert['sender_id']) && $alert['show_links'] ? '<a href="' . $scripturl . '?action=profile;u=' . $alert['sender_id'] . '">' . $alert['sender_name'] . '</a>' : '<strong>' . $alert['sender_name'] . '</strong>', $scripturl); |
|
| 424 | 424 | |
| 425 | 425 | if (is_array($extra)) |
| 426 | 426 | { |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | // Are we opening a specific alert ? |
| 452 | 452 | if (!empty($_REQUEST['alert'])) |
| 453 | 453 | { |
| 454 | - $alert_id = (int)$_REQUEST['alert']; |
|
| 454 | + $alert_id = (int) $_REQUEST['alert']; |
|
| 455 | 455 | $request = $smcFunc['db_query']('', ' |
| 456 | 456 | SELECT id_member, id_member_started, content_type, content_action, content_id, is_read, extra |
| 457 | 457 | FROM {db_prefix}user_alerts |
@@ -464,10 +464,10 @@ discard block |
||
| 464 | 464 | $smcFunc['db_free_result']($request); |
| 465 | 465 | |
| 466 | 466 | // Can the user see this alert ? |
| 467 | - if($memID != $alert['id_member']) |
|
| 467 | + if ($memID != $alert['id_member']) |
|
| 468 | 468 | redirectexit(); |
| 469 | 469 | |
| 470 | - if(!empty($alert['extra'])) |
|
| 470 | + if (!empty($alert['extra'])) |
|
| 471 | 471 | $alert['extra'] = $smcFunc['json_decode']($alert['extra'], true); |
| 472 | 472 | |
| 473 | 473 | // Determine where the alert takes |
@@ -538,17 +538,17 @@ discard block |
||
| 538 | 538 | $context['alerts'][$id]['quickbuttons'] = array( |
| 539 | 539 | 'delete' => array( |
| 540 | 540 | 'label' => $txt['delete'], |
| 541 | - 'href' => $scripturl.'?action=profile;u='.$context['id_member'].';area=showalerts;do=remove;aid='.$id.';'.$context['session_var'].'='.$context['session_id'], |
|
| 541 | + 'href' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=showalerts;do=remove;aid=' . $id . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 542 | 542 | 'javascript' => 'class="you_sure"', |
| 543 | 543 | 'icon' => 'remove_button' |
| 544 | 544 | ), |
| 545 | 545 | 'mark' => array( |
| 546 | 546 | 'label' => $alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short'], |
| 547 | - 'href' => $scripturl.'?action=profile;u='.$context['id_member'].';area=showalerts;do='.($alert['is_read'] != 0 ? 'unread' : 'read').';aid='.$id.';'.$context['session_var'].'='.$context['session_id'], |
|
| 547 | + 'href' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=showalerts;do=' . ($alert['is_read'] != 0 ? 'unread' : 'read') . ';aid=' . $id . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 548 | 548 | 'icon' => $alert['is_read'] != 0 ? 'unread_button' : 'read_button', |
| 549 | 549 | ), |
| 550 | 550 | 'quickmod' => array( |
| 551 | - 'content' => '<input type="checkbox" name="mark['.$id.']" value="'.$id.'">', |
|
| 551 | + 'content' => '<input type="checkbox" name="mark[' . $id . ']" value="' . $id . '">', |
|
| 552 | 552 | 'show' => $context['showCheckboxes'] |
| 553 | 553 | ) |
| 554 | 554 | ); |
@@ -961,20 +961,20 @@ discard block |
||
| 961 | 961 | $context['posts'][$key]['quickbuttons'] = array( |
| 962 | 962 | 'reply' => array( |
| 963 | 963 | 'label' => $txt['reply'], |
| 964 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 964 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 965 | 965 | 'icon' => 'reply_button', |
| 966 | 966 | 'show' => $post['can_reply'] |
| 967 | 967 | ), |
| 968 | 968 | 'quote' => array( |
| 969 | 969 | 'label' => $txt['quote_action'], |
| 970 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 970 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 971 | 971 | 'icon' => 'quote', |
| 972 | 972 | 'show' => $post['can_quote'] |
| 973 | 973 | ), |
| 974 | 974 | 'remove' => array( |
| 975 | 975 | 'label' => $txt['remove'], |
| 976 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 977 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
| 976 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 977 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
| 978 | 978 | 'icon' => 'remove_button', |
| 979 | 979 | 'show' => $post['can_delete'] |
| 980 | 980 | ) |
@@ -619,7 +619,7 @@ |
||
| 619 | 619 | if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn()) |
| 620 | 620 | fatal_lang_error('login_ssl_required', false); |
| 621 | 621 | |
| 622 | - $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
| 622 | + $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
| 623 | 623 | |
| 624 | 624 | // You didn't even enter a password! |
| 625 | 625 | if (trim($password) == '') |
@@ -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; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | if (class_exists('Imagick')) |
| 44 | 44 | { |
| 45 | - $temp = New Imagick; |
|
| 45 | + $temp = new Imagick; |
|
| 46 | 46 | $temp2 = $temp->getVersion(); |
| 47 | 47 | $im_version = $temp2['versionString']; |
| 48 | 48 | $extension_version = 'Imagick ' . phpversion('Imagick'); |
@@ -888,7 +888,6 @@ discard block |
||
| 888 | 888 | $is_writable = true; |
| 889 | 889 | break; |
| 890 | 890 | } |
| 891 | - |
|
| 892 | 891 | else |
| 893 | 892 | { |
| 894 | 893 | // Convert the chmod value from octal (0777) to text ("777"). |
@@ -942,8 +941,9 @@ discard block |
||
| 942 | 941 | { |
| 943 | 942 | // Wait for a response that isn't continued with -, but don't wait too long. |
| 944 | 943 | $time = time(); |
| 945 | - do |
|
| 946 | - $this->last_message = fgets($this->connection, 1024); |
|
| 944 | + do { |
|
| 945 | + $this->last_message = fgets($this->connection, 1024); |
|
| 946 | + } |
|
| 947 | 947 | while ((strlen($this->last_message) < 4 || strpos($this->last_message, ' ') === 0 || strpos($this->last_message, ' ', 3) !== 3) && time() - $time < 5); |
| 948 | 948 | |
| 949 | 949 | // Was the desired response returned? |
@@ -964,8 +964,9 @@ discard block |
||
| 964 | 964 | // Request a passive connection - this means, we'll talk to you, you don't talk to us. |
| 965 | 965 | @fwrite($this->connection, 'PASV' . "\r\n"); |
| 966 | 966 | $time = time(); |
| 967 | - do |
|
| 968 | - $response = fgets($this->connection, 1024); |
|
| 967 | + do { |
|
| 968 | + $response = fgets($this->connection, 1024); |
|
| 969 | + } |
|
| 969 | 970 | while (strpos($response, ' ', 3) !== 3 && time() - $time < 5); |
| 970 | 971 | |
| 971 | 972 | // If it's not 227, we weren't given an IP and port, which means it failed. |
@@ -1087,8 +1088,9 @@ discard block |
||
| 1087 | 1088 | |
| 1088 | 1089 | @fwrite($this->connection, 'PWD' . "\r\n"); |
| 1089 | 1090 | $time = time(); |
| 1090 | - do |
|
| 1091 | - $response = fgets($this->connection, 1024); |
|
| 1091 | + do { |
|
| 1092 | + $response = fgets($this->connection, 1024); |
|
| 1093 | + } |
|
| 1092 | 1094 | while ($response[3] != ' ' && time() - $time < 5); |
| 1093 | 1095 | |
| 1094 | 1096 | // Check for 257! |
@@ -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() |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | if ($type == 'edit') |
| 117 | 117 | { |
| 118 | 118 | // Filter out members who have already been notified about this post's topic |
| 119 | - $unnotified = array_filter($watched, function ($member) |
|
| 119 | + $unnotified = array_filter($watched, function($member) |
|
| 120 | 120 | { |
| 121 | 121 | return empty($member['sent']); |
| 122 | 122 | }); |