@@ -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; |
@@ -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) == '') |
@@ -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 | }); |
@@ -1838,7 +1838,7 @@ |
||
| 1838 | 1838 | if (!empty($excluded_groups)) |
| 1839 | 1839 | { |
| 1840 | 1840 | // Make sure this is an array of integers |
| 1841 | - $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
|
| 1841 | + $excluded_groups = array_filter((array) $excluded_groups, function($v) |
|
| 1842 | 1842 | { |
| 1843 | 1843 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
| 1844 | 1844 | }); |
@@ -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; |