@@ -349,7 +349,7 @@ |
||
349 | 349 | SELECT |
350 | 350 | t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board, |
351 | 351 | ' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from, |
352 | - ' . ( $enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
352 | + ' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
353 | 353 | ' : '') . ' |
354 | 354 | t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic, |
355 | 355 | ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon, |
@@ -1661,7 +1661,7 @@ discard block |
||
1661 | 1661 | |
1662 | 1662 | // Our custom error handler - does nothing but does stop public errors from XML! |
1663 | 1663 | set_error_handler( |
1664 | - function ($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1664 | + function($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1665 | 1665 | { |
1666 | 1666 | if ($support_js) |
1667 | 1667 | return true; |
@@ -2651,94 +2651,94 @@ discard block |
||
2651 | 2651 | // Translation table for the character sets not native for MySQL. |
2652 | 2652 | $translation_tables = array( |
2653 | 2653 | 'windows-1255' => array( |
2654 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2655 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2656 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2657 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2658 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2659 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2660 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2661 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2662 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2663 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2664 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2665 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2666 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2667 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2668 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2669 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2670 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2671 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2672 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2673 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2674 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2675 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2676 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2677 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2678 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2679 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2680 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2681 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2682 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2683 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2684 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2685 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2686 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2687 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2688 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2689 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2690 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2691 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2692 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2693 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2694 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2695 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2654 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2655 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2656 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2657 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2658 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2659 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2660 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2661 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2662 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2663 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2664 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2665 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2666 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2667 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2668 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2669 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2670 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2671 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2672 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2673 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2674 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2675 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2676 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2677 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2678 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2679 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2680 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2681 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2682 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2683 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2684 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2685 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2686 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2687 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2688 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2689 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2690 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2691 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2692 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2693 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2694 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2695 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2696 | 2696 | '0xFA' => '0xD7AA', |
2697 | 2697 | ), |
2698 | 2698 | 'windows-1253' => array( |
2699 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2700 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2701 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2702 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2703 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2704 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2705 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2706 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2707 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2708 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2709 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2710 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2711 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2712 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2713 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2714 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2715 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2716 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2717 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2718 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2719 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2720 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2721 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2722 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2723 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2724 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2725 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2726 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2727 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2728 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2729 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2730 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2731 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2732 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2733 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2734 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2735 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2736 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2737 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2738 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2739 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2740 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2741 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2699 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2700 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2701 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2702 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2703 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2704 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2705 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2706 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2707 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2708 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2709 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2710 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2711 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2712 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2713 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2714 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2715 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2716 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2717 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2718 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2719 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2720 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2721 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2722 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2723 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2724 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2725 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2726 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2727 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2728 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2729 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2730 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2731 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2732 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2733 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2734 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2735 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2736 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2737 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2738 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2739 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2740 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2741 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2742 | 2742 | ), |
2743 | 2743 | ); |
2744 | 2744 | |
@@ -3638,7 +3638,7 @@ discard block |
||
3638 | 3638 | |
3639 | 3639 | if ($active < 600) |
3640 | 3640 | echo ' |
3641 | - ', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'],' ', $txt['upgrade_run_script2'], ''; |
|
3641 | + ', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'], ' ', $txt['upgrade_run_script2'], ''; |
|
3642 | 3642 | |
3643 | 3643 | if ($active > $upcontext['inactive_timeout']) |
3644 | 3644 | echo ' |
@@ -3840,7 +3840,7 @@ discard block |
||
3840 | 3840 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
3841 | 3841 | <input type="hidden" name="backup_done" id="backup_done" value="0"> |
3842 | 3842 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
3843 | - <div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;"> |
|
3843 | + <div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;"> |
|
3844 | 3844 | <span id="debuginfo"></span> |
3845 | 3845 | </div>'; |
3846 | 3846 | |
@@ -4341,7 +4341,7 @@ discard block |
||
4341 | 4341 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4342 | 4342 | <input type="hidden" name="utf8_done" id="utf8_done" value="0"> |
4343 | 4343 | <strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong> |
4344 | - <div id="debug_section" style="height: ', ($is_debug ? '97' : '12') , 'px; overflow: auto;"> |
|
4344 | + <div id="debug_section" style="height: ', ($is_debug ? '97' : '12'), 'px; overflow: auto;"> |
|
4345 | 4345 | <span id="debuginfo"></span> |
4346 | 4346 | </div>'; |
4347 | 4347 | |
@@ -4442,7 +4442,7 @@ discard block |
||
4442 | 4442 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4443 | 4443 | <input type="hidden" name="json_done" id="json_done" value="0"> |
4444 | 4444 | <strong>', $txt['upgrade_completed'], ' <span id="tab_done">', $upcontext['cur_table_num'], '</span> ', $txt['upgrade_outof'], ' ', $upcontext['table_count'], ' ', $txt['upgrade_tables'], '</strong> |
4445 | - <div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;"> |
|
4445 | + <div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;"> |
|
4446 | 4446 | <span id="debuginfo"></span> |
4447 | 4447 | </div>'; |
4448 | 4448 |
@@ -199,22 +199,22 @@ discard block |
||
199 | 199 | |
200 | 200 | case 'date': |
201 | 201 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d)$~', $replacement, $date_matches) === 1) |
202 | - return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]).'::date'; |
|
202 | + return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]) . '::date'; |
|
203 | 203 | else |
204 | 204 | smf_db_error_backtrace('Wrong value type sent to the database. Date expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
205 | 205 | break; |
206 | 206 | |
207 | 207 | case 'time': |
208 | 208 | if (preg_match('~^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $time_matches) === 1) |
209 | - return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]).'::time'; |
|
209 | + return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]) . '::time'; |
|
210 | 210 | else |
211 | 211 | smf_db_error_backtrace('Wrong value type sent to the database. Time expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
212 | 212 | break; |
213 | 213 | |
214 | 214 | case 'datetime': |
215 | 215 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1) |
216 | - return 'to_timestamp('. |
|
217 | - sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]). |
|
216 | + return 'to_timestamp(' . |
|
217 | + sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) . |
|
218 | 218 | ',\'YYYY-MM-DD HH24:MI:SS\')'; |
219 | 219 | else |
220 | 220 | smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $old_pos = 0; |
425 | 425 | $pos = -1; |
426 | 426 | // Remove the string escape for better runtime |
427 | - $db_string_1 = str_replace('\'\'','',$db_string); |
|
427 | + $db_string_1 = str_replace('\'\'', '', $db_string); |
|
428 | 428 | while (true) |
429 | 429 | { |
430 | 430 | $pos = strpos($db_string_1, '\'', $pos + 1); |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | if (!empty($keys) && (count($keys) > 0) && $returnmode > 0) |
803 | 803 | { |
804 | 804 | // we only take the first key |
805 | - $returning = ' RETURNING '.$keys[0]; |
|
805 | + $returning = ' RETURNING ' . $keys[0]; |
|
806 | 806 | $with_returning = true; |
807 | 807 | } |
808 | 808 | |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
834 | 834 | VALUES |
835 | 835 | ' . implode(', |
836 | - ', $insertRows).$replace.$returning, |
|
836 | + ', $insertRows) . $replace . $returning, |
|
837 | 837 | array( |
838 | 838 | 'security_override' => true, |
839 | 839 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | if ($returnmode === 2) |
847 | 847 | $return_var = array(); |
848 | 848 | |
849 | - while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
849 | + while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
850 | 850 | { |
851 | 851 | if (is_numeric($row[0])) // try to emulate mysql limitation |
852 | 852 | { |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | */ |
1010 | 1010 | function smf_db_custom_order($field, $array_values, $desc = false) |
1011 | 1011 | { |
1012 | - $return = 'CASE '. $field . ' '; |
|
1012 | + $return = 'CASE ' . $field . ' '; |
|
1013 | 1013 | $count = count($array_values); |
1014 | 1014 | $then = ($desc ? ' THEN -' : ' THEN '); |
1015 | 1015 |
@@ -1697,8 +1697,7 @@ discard block |
||
1697 | 1697 | updateStats('topic'); |
1698 | 1698 | |
1699 | 1699 | // This function is needed to do the updateStats('subject') call. |
1700 | - $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : |
|
1701 | - function($string){ |
|
1700 | + $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) { |
|
1702 | 1701 | global $sourcedir; |
1703 | 1702 | if (function_exists('mb_strtolower')) |
1704 | 1703 | return mb_strtolower($string, 'UTF-8'); |
@@ -1767,7 +1766,7 @@ discard block |
||
1767 | 1766 | if (trim($settingsArray[$i]) == 'if (file_exists(dirname(__FILE__) . \'/install.php\'))' && trim($settingsArray[$i + 1]) == '{' && trim($settingsArray[$i + 9]) == '}') |
1768 | 1767 | { |
1769 | 1768 | // Set the ten lines to nothing. |
1770 | - for ($j=0; $j < 10; $j++) |
|
1769 | + for ($j = 0; $j < 10; $j++) |
|
1771 | 1770 | $settingsArray[$i++] = ''; |
1772 | 1771 | |
1773 | 1772 | continue; |
@@ -300,7 +300,7 @@ |
||
300 | 300 | echo ' |
301 | 301 | <div class="g-recaptcha centertext" data-sitekey="' . $verify_context['recaptcha_site_key'] . '" data-theme="' . $verify_context['recaptcha_theme'] . '"></div> |
302 | 302 | <br> |
303 | - <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang.'"></script>'; |
|
303 | + <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang . '"></script>'; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | else |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | { |
127 | 127 | $smcFunc['db_transaction']('begin'); |
128 | 128 | $db_trans = true; |
129 | - $smcFunc['db_drop_table']($table_name.'_old'); |
|
130 | - $smcFunc['db_query']('',' |
|
131 | - RENAME TABLE '. $table_name .' TO ' . $table_name . '_old', |
|
129 | + $smcFunc['db_drop_table']($table_name . '_old'); |
|
130 | + $smcFunc['db_query']('', ' |
|
131 | + RENAME TABLE '. $table_name . ' TO ' . $table_name . '_old', |
|
132 | 132 | array( |
133 | 133 | 'security_override' => true, |
134 | 134 | ) |
@@ -202,15 +202,15 @@ discard block |
||
202 | 202 | { |
203 | 203 | $same_col = array(); |
204 | 204 | |
205 | - $request = $smcFunc['db_query']('',' |
|
205 | + $request = $smcFunc['db_query']('', ' |
|
206 | 206 | SELECT count(*), column_name |
207 | 207 | FROM information_schema.columns |
208 | 208 | WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema} |
209 | 209 | GROUP BY column_name |
210 | 210 | HAVING count(*) > 1', |
211 | - array ( |
|
211 | + array( |
|
212 | 212 | 'table1' => $table_name, |
213 | - 'table2' => $table_name.'_old', |
|
213 | + 'table2' => $table_name . '_old', |
|
214 | 214 | 'schema' => $db_name, |
215 | 215 | ) |
216 | 216 | ); |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | $same_col[] = $row['column_name']; |
221 | 221 | } |
222 | 222 | |
223 | - $smcFunc['db_query']('',' |
|
224 | - INSERT INTO ' . $table_name .'(' |
|
223 | + $smcFunc['db_query']('', ' |
|
224 | + INSERT INTO ' . $table_name . '(' |
|
225 | 225 | . implode($same_col, ',') . |
226 | 226 | ') |
227 | 227 | SELECT '. implode($same_col, ',') . ' |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * |
105 | 105 | * @param string $class The fully-qualified class name. |
106 | 106 | */ |
107 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
107 | +spl_autoload_register(function($class) use ($sourcedir) |
|
108 | 108 | { |
109 | 109 | $classMap = array( |
110 | 110 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -430,8 +430,8 @@ |
||
430 | 430 | $real_name = $smcFunc['db_case_sensitive'] ? 'LOWER(real_name)' : 'real_name'; |
431 | 431 | |
432 | 432 | // Searches. |
433 | - $member_name_search = $member_name . ' ' . $comparison . ' ' . implode( ' OR ' . $member_name . ' ' . $comparison . ' ', $names_list); |
|
434 | - $real_name_search = $real_name . ' ' . $comparison . ' ' . implode( ' OR ' . $real_name . ' ' . $comparison . ' ', $names_list); |
|
433 | + $member_name_search = $member_name . ' ' . $comparison . ' ' . implode(' OR ' . $member_name . ' ' . $comparison . ' ', $names_list); |
|
434 | + $real_name_search = $real_name . ' ' . $comparison . ' ' . implode(' OR ' . $real_name . ' ' . $comparison . ' ', $names_list); |
|
435 | 435 | |
436 | 436 | // Search by username, display name, and email address. |
437 | 437 | $request = $smcFunc['db_query']('', ' |
@@ -899,13 +899,13 @@ |
||
899 | 899 | if ($start_char === 'C') |
900 | 900 | $limit_seek = $limit; |
901 | 901 | else |
902 | - $limit_seek = $limit + 1; |
|
902 | + $limit_seek = $limit + 1; |
|
903 | 903 | |
904 | 904 | $request = $smcFunc['db_query']('', ' |
905 | 905 | SELECT id_msg, id_member, approved |
906 | 906 | FROM {db_prefix}messages |
907 | 907 | WHERE id_topic = {int:current_topic} |
908 | - AND id_msg '. $page_operator . ' {int:page_id}'. (!$modSettings['postmod_active'] || $approve_posts ? '' : ' |
|
908 | + AND id_msg '. $page_operator . ' {int:page_id}' . (!$modSettings['postmod_active'] || $approve_posts ? '' : ' |
|
909 | 909 | AND (approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR id_member = {int:current_member}') . ')') . ' |
910 | 910 | ORDER BY id_msg ' . ($ascending_seek ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : ' |
911 | 911 | LIMIT {int:limit}'), |