@@ -1626,7 +1626,7 @@ discard block |
||
1626 | 1626 | |
1627 | 1627 | // Our custom error handler - does nothing but does stop public errors from XML! |
1628 | 1628 | set_error_handler( |
1629 | - function ($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1629 | + function($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1630 | 1630 | { |
1631 | 1631 | if ($support_js) |
1632 | 1632 | return true; |
@@ -2643,94 +2643,94 @@ discard block |
||
2643 | 2643 | // Translation table for the character sets not native for MySQL. |
2644 | 2644 | $translation_tables = array( |
2645 | 2645 | 'windows-1255' => array( |
2646 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2647 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2648 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2649 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2650 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2651 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2652 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2653 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2654 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2655 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2656 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2657 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2658 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2659 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2660 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2661 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2662 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2663 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2664 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2665 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2666 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2667 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2668 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2669 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2670 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2671 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2672 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2673 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2674 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2675 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2676 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2677 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2678 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2679 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2680 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2681 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2682 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2683 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2684 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2685 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2686 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2687 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2646 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2647 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2648 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2649 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2650 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2651 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2652 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2653 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2654 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2655 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2656 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2657 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2658 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2659 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2660 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2661 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2662 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2663 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2664 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2665 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2666 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2667 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2668 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2669 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2670 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2671 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2672 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2673 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2674 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2675 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2676 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2677 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2678 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2679 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2680 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2681 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2682 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2683 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2684 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2685 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2686 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2687 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2688 | 2688 | '0xFA' => '0xD7AA', |
2689 | 2689 | ), |
2690 | 2690 | 'windows-1253' => array( |
2691 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2692 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2693 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2694 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2695 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2696 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2697 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2698 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2699 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2700 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2701 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2702 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2703 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2704 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2705 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2706 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2707 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2708 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2709 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2710 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2711 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2712 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2713 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2714 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2715 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2716 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2717 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2718 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2719 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2720 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2721 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2722 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2723 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2724 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2725 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2726 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2727 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2728 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2729 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2730 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2731 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2732 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2733 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2691 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2692 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2693 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2694 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2695 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2696 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2697 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2698 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2699 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2700 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2701 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2702 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2703 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2704 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2705 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2706 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2707 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2708 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2709 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2710 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2711 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2712 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2713 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2714 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2715 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2716 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2717 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2718 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2719 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2720 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2721 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2722 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2723 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2724 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2725 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2726 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2727 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2728 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2729 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2730 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2731 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2732 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2733 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2734 | 2734 | ), |
2735 | 2735 | ); |
2736 | 2736 | |
@@ -3829,7 +3829,7 @@ discard block |
||
3829 | 3829 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
3830 | 3830 | <input type="hidden" name="backup_done" id="backup_done" value="0"> |
3831 | 3831 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
3832 | - <div id="debug_section" style="height: ', ($is_debug ? '195' : '12') , 'px; overflow: auto;"> |
|
3832 | + <div id="debug_section" style="height: ', ($is_debug ? '195' : '12'), 'px; overflow: auto;"> |
|
3833 | 3833 | <span id="debuginfo"></span> |
3834 | 3834 | </div>'; |
3835 | 3835 | |
@@ -4330,7 +4330,7 @@ discard block |
||
4330 | 4330 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4331 | 4331 | <input type="hidden" name="utf8_done" id="utf8_done" value="0"> |
4332 | 4332 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
4333 | - <div id="debug_section" style="height: ', ($is_debug ? '195' : '12') , 'px; overflow: auto;"> |
|
4333 | + <div id="debug_section" style="height: ', ($is_debug ? '195' : '12'), 'px; overflow: auto;"> |
|
4334 | 4334 | <span id="debuginfo"></span> |
4335 | 4335 | </div>'; |
4336 | 4336 | |
@@ -4427,7 +4427,7 @@ discard block |
||
4427 | 4427 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4428 | 4428 | <input type="hidden" name="json_done" id="json_done" value="0"> |
4429 | 4429 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
4430 | - <div id="debug_section" style="height: ', ($is_debug ? '195' : '12') , 'px; overflow: auto;"> |
|
4430 | + <div id="debug_section" style="height: ', ($is_debug ? '195' : '12'), 'px; overflow: auto;"> |
|
4431 | 4431 | <span id="debuginfo"></span> |
4432 | 4432 | </div>'; |
4433 | 4433 |
@@ -670,7 +670,7 @@ |
||
670 | 670 | // Show "<< Last Edit: Time by Person >>" if this post was edited. But we need the div even if it wasn't modified! |
671 | 671 | // Because we insert into it through AJAX and we don't want to stop themers moving it around if they so wish so they can put it where they want it. |
672 | 672 | echo ' |
673 | - <span class="smalltext modified floatright', !empty($modSettings['show_modify']) && !empty($message['modified']['name']) ? ' mvisible' : '','" id="modified_', $message['id'], '">'; |
|
673 | + <span class="smalltext modified floatright', !empty($modSettings['show_modify']) && !empty($message['modified']['name']) ? ' mvisible' : '', '" id="modified_', $message['id'], '">'; |
|
674 | 674 | |
675 | 675 | if (!empty($modSettings['show_modify']) && !empty($message['modified']['name'])) |
676 | 676 | echo |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $smcFunc['db_free_result']($request); |
166 | 166 | |
167 | 167 | $feed_meta['title'] = ' - ' . strip_tags($board_info['name']); |
168 | - $feed_meta['source'] .= '?board=' . $board . '.0' ; |
|
168 | + $feed_meta['source'] .= '?board=' . $board . '.0'; |
|
169 | 169 | |
170 | 170 | $query_this_board = 'b.id_board = ' . $board; |
171 | 171 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | |
390 | 390 | foreach ($xml_data as $item) |
391 | 391 | { |
392 | - $link = array_filter($item['content'], function ($e) { return ($e['tag'] == 'link'); }); |
|
392 | + $link = array_filter($item['content'], function($e) { return ($e['tag'] == 'link'); }); |
|
393 | 393 | $link = array_pop($link); |
394 | 394 | |
395 | 395 | echo ' |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | foreach ($context['posting_fields'] as $pf) |
140 | 140 | echo ' |
141 | 141 | <dt> |
142 | - ', $pf['dt'] ,' |
|
142 | + ', $pf['dt'], ' |
|
143 | 143 | </dt> |
144 | 144 | <dd> |
145 | - ', $pf['dd'] ,' |
|
145 | + ', $pf['dd'], ' |
|
146 | 146 | </dd>'; |
147 | 147 | |
148 | 148 | |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | </div> |
456 | 456 | <div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
457 | 457 | <div class="attach-ui"> |
458 | - <a data-dz-remove class="button_submit cancel">', $txt['modify_cancel'] ,'</a> |
|
459 | - <a class="button_submit upload">', $txt['upload'] ,'</a> |
|
458 | + <a data-dz-remove class="button_submit cancel">', $txt['modify_cancel'], '</a> |
|
459 | + <a class="button_submit upload">', $txt['upload'], '</a> |
|
460 | 460 | </div> |
461 | 461 | </div> |
462 | 462 | </div> |
@@ -474,10 +474,10 @@ discard block |
||
474 | 474 | </dt> |
475 | 475 | <dd class="smalltext fallback"> |
476 | 476 | <div id="attachUpload" class="descbox"> |
477 | - <h5>', $txt['attach_drop_zone'] ,'</h5> |
|
478 | - <a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a> |
|
479 | - <a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a> |
|
480 | - <a class="button_submit fileinput-button">', $txt['attach_add'] ,'</a> |
|
477 | + <h5>', $txt['attach_drop_zone'], '</h5> |
|
478 | + <a class="button_submit" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a> |
|
479 | + <a class="button_submit" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a> |
|
480 | + <a class="button_submit fileinput-button">', $txt['attach_add'], '</a> |
|
481 | 481 | <div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
482 | 482 | <div class="fallback"> |
483 | 483 | <input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="input_file fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>) |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | // Option to delete an event if user is editing one. |
585 | 585 | if ($context['make_event'] && !$context['event']['new']) |
586 | 586 | echo ' |
587 | - <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button_submit you_sure">'; |
|
587 | + <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button_submit you_sure">'; |
|
588 | 588 | |
589 | 589 | echo ' |
590 | 590 | </span> |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | });'; |
839 | 839 | |
840 | 840 | echo ' |
841 | - var oEditorID = "', $context['post_box_name'] ,'"; |
|
841 | + var oEditorID = "', $context['post_box_name'], '"; |
|
842 | 842 | var oEditorObject = oEditorHandle_', $context['post_box_name'], '; |
843 | 843 | </script>'; |
844 | 844 | |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | { |
871 | 871 | echo ' |
872 | 872 | <ul class="quickbuttons" id="msg_', $post['id'], '_quote"> |
873 | - <li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'] ,'</a></li> |
|
873 | + <li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'], '</a></li> |
|
874 | 874 | <li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li> |
875 | 875 | </ul>'; |
876 | 876 | } |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | <head> |
958 | 958 | <meta charset="', $context['character_set'], '"> |
959 | 959 | <title>', $txt['spell_check'], '</title> |
960 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
960 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
961 | 961 | <style> |
962 | 962 | body, td |
963 | 963 | { |
@@ -990,8 +990,8 @@ discard block |
||
990 | 990 | var spell_formname = window.opener.spell_formname; |
991 | 991 | var spell_fieldname = window.opener.spell_fieldname; |
992 | 992 | </script> |
993 | - <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script> |
|
994 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
993 | + <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script> |
|
994 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
995 | 995 | <script> |
996 | 996 | ', $context['spell_js'], ' |
997 | 997 | </script> |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | <head> |
1034 | 1034 | <meta charset="', $context['character_set'], '"> |
1035 | 1035 | <title>', $txt['retrieving_quote'], '</title> |
1036 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
1036 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
1037 | 1037 | </head> |
1038 | 1038 | <body> |
1039 | 1039 | ', $txt['retrieving_quote'], ' |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | 'height' => array('optional' => true, 'match' => '(\d+)'), |
1098 | 1098 | ), |
1099 | 1099 | 'content' => '$1', |
1100 | - 'validate' => function (&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt) |
|
1100 | + 'validate' => function(&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt) |
|
1101 | 1101 | { |
1102 | 1102 | $returnContext = ''; |
1103 | 1103 | |
@@ -1132,7 +1132,7 @@ discard block |
||
1132 | 1132 | } |
1133 | 1133 | |
1134 | 1134 | if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}'])) |
1135 | - $returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '" class="atc_img"></a>'; |
|
1135 | + $returnContext .= '<a href="' . $currentAttachment['href'] . ';image" id="link_' . $currentAttachment['id'] . '" onclick="' . $currentAttachment['thumbnail']['javascript'] . '"><img src="' . $currentAttachment['thumbnail']['href'] . '"' . $alt . $title . ' id="thumb_' . $currentAttachment['id'] . '" class="atc_img"></a>'; |
|
1136 | 1136 | else |
1137 | 1137 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>'; |
1138 | 1138 | } |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | 'type' => 'unparsed_content', |
1162 | 1162 | 'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>', |
1163 | 1163 | // @todo Maybe this can be simplified? |
1164 | - 'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context) |
|
1164 | + 'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context) |
|
1165 | 1165 | { |
1166 | 1166 | if (!isset($disabled['code'])) |
1167 | 1167 | { |
@@ -1198,7 +1198,7 @@ discard block |
||
1198 | 1198 | 'type' => 'unparsed_equals_content', |
1199 | 1199 | 'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> ($2) <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>', |
1200 | 1200 | // @todo Maybe this can be simplified? |
1201 | - 'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context) |
|
1201 | + 'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context) |
|
1202 | 1202 | { |
1203 | 1203 | if (!isset($disabled['code'])) |
1204 | 1204 | { |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | 'type' => 'unparsed_content', |
1243 | 1243 | 'content' => '<a href="mailto:$1" class="bbc_email">$1</a>', |
1244 | 1244 | // @todo Should this respect guest_hideContacts? |
1245 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1245 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1246 | 1246 | { |
1247 | 1247 | $data = strtr($data, array('<br>' => '')); |
1248 | 1248 | }, |
@@ -1261,7 +1261,7 @@ discard block |
||
1261 | 1261 | 'type' => 'unparsed_commas_content', |
1262 | 1262 | 'test' => '\d+,\d+\]', |
1263 | 1263 | 'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">', |
1264 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1264 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1265 | 1265 | { |
1266 | 1266 | if (isset($disabled['url'])) |
1267 | 1267 | $tag['content'] = '$1'; |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | 'test' => '(left|right)(\s+max=\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)?\]', |
1278 | 1278 | 'before' => '<div $1>', |
1279 | 1279 | 'after' => '</div>', |
1280 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1280 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1281 | 1281 | { |
1282 | 1282 | $class = 'class="bbc_float float' . (strpos($data, 'left') === 0 ? 'left' : 'right') . '"'; |
1283 | 1283 | |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | 'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'), |
1327 | 1327 | ), |
1328 | 1328 | 'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">', |
1329 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1329 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1330 | 1330 | { |
1331 | 1331 | global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
1332 | 1332 | |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | 'tag' => 'img', |
1350 | 1350 | 'type' => 'unparsed_content', |
1351 | 1351 | 'content' => '<img src="$1" alt="" class="bbc_img">', |
1352 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1352 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1353 | 1353 | { |
1354 | 1354 | global $image_proxy_enabled, $image_proxy_secret, $boardurl; |
1355 | 1355 | |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | 'tag' => 'iurl', |
1373 | 1373 | 'type' => 'unparsed_content', |
1374 | 1374 | 'content' => '<a href="$1" class="bbc_link">$1</a>', |
1375 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1375 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1376 | 1376 | { |
1377 | 1377 | $data = strtr($data, array('<br>' => '')); |
1378 | 1378 | $scheme = parse_url($data, PHP_URL_SCHEME); |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | 'quoted' => 'optional', |
1387 | 1387 | 'before' => '<a href="$1" class="bbc_link">', |
1388 | 1388 | 'after' => '</a>', |
1389 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1389 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1390 | 1390 | { |
1391 | 1391 | if (substr($data, 0, 1) == '#') |
1392 | 1392 | $data = '#post_' . substr($data, 1); |
@@ -1466,7 +1466,7 @@ discard block |
||
1466 | 1466 | 'tag' => 'php', |
1467 | 1467 | 'type' => 'unparsed_content', |
1468 | 1468 | 'content' => '<span class="phpcode">$1</span>', |
1469 | - 'validate' => isset($disabled['php']) ? null : function (&$tag, &$data, $disabled) |
|
1469 | + 'validate' => isset($disabled['php']) ? null : function(&$tag, &$data, $disabled) |
|
1470 | 1470 | { |
1471 | 1471 | if (!isset($disabled['php'])) |
1472 | 1472 | { |
@@ -1564,7 +1564,7 @@ discard block |
||
1564 | 1564 | 'test' => '[1-7]\]', |
1565 | 1565 | 'before' => '<span style="font-size: $1;" class="bbc_size">', |
1566 | 1566 | 'after' => '</span>', |
1567 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1567 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1568 | 1568 | { |
1569 | 1569 | $sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95); |
1570 | 1570 | $data = $sizes[$data] . 'em'; |
@@ -1602,7 +1602,7 @@ discard block |
||
1602 | 1602 | 'tag' => 'time', |
1603 | 1603 | 'type' => 'unparsed_content', |
1604 | 1604 | 'content' => '$1', |
1605 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1605 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1606 | 1606 | { |
1607 | 1607 | if (is_numeric($data)) |
1608 | 1608 | $data = timeformat($data); |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | 'tag' => 'url', |
1631 | 1631 | 'type' => 'unparsed_content', |
1632 | 1632 | 'content' => '<a href="$1" class="bbc_link" target="_blank">$1</a>', |
1633 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1633 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1634 | 1634 | { |
1635 | 1635 | $data = strtr($data, array('<br>' => '')); |
1636 | 1636 | $scheme = parse_url($data, PHP_URL_SCHEME); |
@@ -1644,7 +1644,7 @@ discard block |
||
1644 | 1644 | 'quoted' => 'optional', |
1645 | 1645 | 'before' => '<a href="$1" class="bbc_link" target="_blank">', |
1646 | 1646 | 'after' => '</a>', |
1647 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1647 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1648 | 1648 | { |
1649 | 1649 | $scheme = parse_url($data, PHP_URL_SCHEME); |
1650 | 1650 | if (empty($scheme)) |
@@ -1670,7 +1670,7 @@ discard block |
||
1670 | 1670 | { |
1671 | 1671 | if (isset($temp_bbc)) |
1672 | 1672 | $bbc_codes = $temp_bbc; |
1673 | - usort($codes, function ($a, $b) { |
|
1673 | + usort($codes, function($a, $b) { |
|
1674 | 1674 | return strcmp($a['tag'], $b['tag']); |
1675 | 1675 | }); |
1676 | 1676 | return $codes; |
@@ -1908,7 +1908,7 @@ discard block |
||
1908 | 1908 | # a run of Unicode domain name characters and a dot |
1909 | 1909 | [\p{L}\p{M}\p{N}\-.:@]+\. |
1910 | 1910 | # and then a TLD valid in the DNS or the reserved "local" TLD |
1911 | - (?:'. $modSettings['tld_regex'] .'|local) |
|
1911 | + (?:'. $modSettings['tld_regex'] . '|local) |
|
1912 | 1912 | ) |
1913 | 1913 | # followed by a non-domain character or end of line |
1914 | 1914 | (?=[^\p{L}\p{N}\-.]|$) |
@@ -1976,7 +1976,7 @@ discard block |
||
1976 | 1976 | )? |
1977 | 1977 | '; |
1978 | 1978 | |
1979 | - $data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) { |
|
1979 | + $data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) { |
|
1980 | 1980 | $url = array_shift($matches); |
1981 | 1981 | |
1982 | 1982 | $scheme = parse_url($url, PHP_URL_SCHEME); |
@@ -2705,7 +2705,7 @@ discard block |
||
2705 | 2705 | for ($i = 0, $n = count($smileysfrom); $i < $n; $i++) |
2706 | 2706 | { |
2707 | 2707 | $specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES); |
2708 | - $smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')). '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" class="smiley">'; |
|
2708 | + $smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" class="smiley">'; |
|
2709 | 2709 | |
2710 | 2710 | $smileyPregReplacements[$smileysfrom[$i]] = $smileyCode; |
2711 | 2711 | |
@@ -2722,7 +2722,7 @@ discard block |
||
2722 | 2722 | |
2723 | 2723 | // Replace away! |
2724 | 2724 | $message = preg_replace_callback($smileyPregSearch, |
2725 | - function ($matches) use ($smileyPregReplacements) |
|
2725 | + function($matches) use ($smileyPregReplacements) |
|
2726 | 2726 | { |
2727 | 2727 | return $smileyPregReplacements[$matches[1]]; |
2728 | 2728 | }, $message); |
@@ -2788,13 +2788,13 @@ discard block |
||
2788 | 2788 | { |
2789 | 2789 | if (defined('SID') && SID != '') |
2790 | 2790 | $setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#]+?)(#[^"]*?)?$~', |
2791 | - function ($m) use ($scripturl) |
|
2791 | + function($m) use ($scripturl) |
|
2792 | 2792 | { |
2793 | - return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : ""); |
|
2793 | + return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : ""); |
|
2794 | 2794 | }, $setLocation); |
2795 | 2795 | else |
2796 | 2796 | $setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~', |
2797 | - function ($m) use ($scripturl) |
|
2797 | + function($m) use ($scripturl) |
|
2798 | 2798 | { |
2799 | 2799 | return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : ""); |
2800 | 2800 | }, $setLocation); |
@@ -3117,7 +3117,7 @@ discard block |
||
3117 | 3117 | |
3118 | 3118 | // Add a generic "Are you sure?" confirmation message. |
3119 | 3119 | addInlineJavaScript(' |
3120 | - var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';'); |
|
3120 | + var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';'); |
|
3121 | 3121 | |
3122 | 3122 | // Now add the capping code for avatars. |
3123 | 3123 | if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize') |
@@ -3478,7 +3478,7 @@ discard block |
||
3478 | 3478 | |
3479 | 3479 | else |
3480 | 3480 | echo ' |
3481 | - <script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>'; |
|
3481 | + <script src="', $settings['theme_url'], '/scripts/minified', ($do_deferred ? '_deferred' : ''), '.js', $minSeed, '"></script>'; |
|
3482 | 3482 | } |
3483 | 3483 | |
3484 | 3484 | // Inline JavaScript - Actually useful some times! |
@@ -3556,14 +3556,14 @@ discard block |
||
3556 | 3556 | |
3557 | 3557 | else |
3558 | 3558 | echo ' |
3559 | - <link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">'; |
|
3559 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/minified.css', $minSeed, '">'; |
|
3560 | 3560 | } |
3561 | 3561 | |
3562 | 3562 | // Print the rest after the minified files. |
3563 | 3563 | if (!empty($normal)) |
3564 | 3564 | foreach ($normal as $nf) |
3565 | 3565 | echo ' |
3566 | - <link rel="stylesheet" href="', $nf ,'">'; |
|
3566 | + <link rel="stylesheet" href="', $nf, '">'; |
|
3567 | 3567 | |
3568 | 3568 | if ($db_show_debug === true) |
3569 | 3569 | { |
@@ -3579,7 +3579,7 @@ discard block |
||
3579 | 3579 | <style>'; |
3580 | 3580 | |
3581 | 3581 | foreach ($context['css_header'] as $css) |
3582 | - echo $css .' |
|
3582 | + echo $css . ' |
|
3583 | 3583 | '; |
3584 | 3584 | |
3585 | 3585 | echo' |
@@ -3608,27 +3608,27 @@ discard block |
||
3608 | 3608 | return false; |
3609 | 3609 | |
3610 | 3610 | // Did we already did this? |
3611 | - $toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400); |
|
3611 | + $toCache = cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type, 86400); |
|
3612 | 3612 | |
3613 | 3613 | // Already done? |
3614 | 3614 | if (!empty($toCache)) |
3615 | 3615 | return true; |
3616 | 3616 | |
3617 | 3617 | // No namespaces, sorry! |
3618 | - $classType = 'MatthiasMullie\\Minify\\'. strtoupper($type); |
|
3618 | + $classType = 'MatthiasMullie\\Minify\\' . strtoupper($type); |
|
3619 | 3619 | |
3620 | 3620 | // Temp path. |
3621 | - $cTempPath = $settings['theme_dir'] .'/'. ($type == 'css' ? 'css' : 'scripts') .'/'; |
|
3621 | + $cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/'; |
|
3622 | 3622 | |
3623 | 3623 | // What kind of file are we going to create? |
3624 | - $toCreate = $cTempPath .'minified'. ($do_deferred ? '_deferred' : '') .'.'. $type; |
|
3624 | + $toCreate = $cTempPath . 'minified' . ($do_deferred ? '_deferred' : '') . '.' . $type; |
|
3625 | 3625 | |
3626 | 3626 | // File has to exists, if it isn't try to create it. |
3627 | 3627 | if ((!file_exists($toCreate) && @fopen($toCreate, 'w') === false) || !smf_chmod($toCreate)) |
3628 | 3628 | { |
3629 | 3629 | loadLanguage('Errors'); |
3630 | 3630 | log_error(sprintf($txt['file_not_created'], $toCreate), 'general'); |
3631 | - cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null); |
|
3631 | + cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null); |
|
3632 | 3632 | |
3633 | 3633 | // The process failed so roll back to print each individual file. |
3634 | 3634 | return $data; |
@@ -3663,14 +3663,14 @@ discard block |
||
3663 | 3663 | { |
3664 | 3664 | loadLanguage('Errors'); |
3665 | 3665 | log_error(sprintf($txt['file_not_created'], $toCreate), 'general'); |
3666 | - cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null); |
|
3666 | + cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null); |
|
3667 | 3667 | |
3668 | 3668 | // The process failed so roll back to print each individual file. |
3669 | 3669 | return $data; |
3670 | 3670 | } |
3671 | 3671 | |
3672 | 3672 | // And create a long lived cache entry. |
3673 | - cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, $toCreate, 86400); |
|
3673 | + cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, $toCreate, 86400); |
|
3674 | 3674 | |
3675 | 3675 | return true; |
3676 | 3676 | } |
@@ -3730,7 +3730,7 @@ discard block |
||
3730 | 3730 | else |
3731 | 3731 | $path = $modSettings['attachmentUploadDir']; |
3732 | 3732 | |
3733 | - return $path . '/' . $attachment_id . '_' . $file_hash .'.dat'; |
|
3733 | + return $path . '/' . $attachment_id . '_' . $file_hash . '.dat'; |
|
3734 | 3734 | } |
3735 | 3735 | |
3736 | 3736 | /** |
@@ -3774,10 +3774,10 @@ discard block |
||
3774 | 3774 | $valid_low = isValidIP($ip_parts[0]); |
3775 | 3775 | $valid_high = isValidIP($ip_parts[1]); |
3776 | 3776 | $count = 0; |
3777 | - $mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.'); |
|
3777 | + $mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.'); |
|
3778 | 3778 | $max = ($mode == ':' ? 'ffff' : '255'); |
3779 | 3779 | $min = 0; |
3780 | - if(!$valid_low) |
|
3780 | + if (!$valid_low) |
|
3781 | 3781 | { |
3782 | 3782 | $ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]); |
3783 | 3783 | $valid_low = isValidIP($ip_parts[0]); |
@@ -3791,7 +3791,7 @@ discard block |
||
3791 | 3791 | } |
3792 | 3792 | |
3793 | 3793 | $count = 0; |
3794 | - if(!$valid_high) |
|
3794 | + if (!$valid_high) |
|
3795 | 3795 | { |
3796 | 3796 | $ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]); |
3797 | 3797 | $valid_high = isValidIP($ip_parts[1]); |
@@ -3804,7 +3804,7 @@ discard block |
||
3804 | 3804 | } |
3805 | 3805 | } |
3806 | 3806 | |
3807 | - if($valid_high && $valid_low) |
|
3807 | + if ($valid_high && $valid_low) |
|
3808 | 3808 | { |
3809 | 3809 | $ip_array['low'] = $ip_parts[0]; |
3810 | 3810 | $ip_array['high'] = $ip_parts[1]; |
@@ -3986,7 +3986,7 @@ discard block |
||
3986 | 3986 | addInlineJavaScript(' |
3987 | 3987 | var user_menus = new smc_PopupMenu(); |
3988 | 3988 | user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup"); |
3989 | - user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true); |
|
3989 | + user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true); |
|
3990 | 3990 | if ($context['allow_pm']) |
3991 | 3991 | addInlineJavaScript(' |
3992 | 3992 | user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true); |
@@ -4611,7 +4611,7 @@ discard block |
||
4611 | 4611 | // No? try a fallback to $sourcedir |
4612 | 4612 | else |
4613 | 4613 | { |
4614 | - $absPath = $sourcedir .'/'. $file; |
|
4614 | + $absPath = $sourcedir . '/' . $file; |
|
4615 | 4615 | |
4616 | 4616 | if (file_exists($absPath)) |
4617 | 4617 | require_once($absPath); |
@@ -4692,15 +4692,15 @@ discard block |
||
4692 | 4692 | |
4693 | 4693 | // UTF-8 occurences of MS special characters |
4694 | 4694 | $findchars_utf8 = array( |
4695 | - "\xe2\80\x9a", // single low-9 quotation mark |
|
4696 | - "\xe2\80\x9e", // double low-9 quotation mark |
|
4697 | - "\xe2\80\xa6", // horizontal ellipsis |
|
4698 | - "\xe2\x80\x98", // left single curly quote |
|
4699 | - "\xe2\x80\x99", // right single curly quote |
|
4700 | - "\xe2\x80\x9c", // left double curly quote |
|
4701 | - "\xe2\x80\x9d", // right double curly quote |
|
4702 | - "\xe2\x80\x93", // en dash |
|
4703 | - "\xe2\x80\x94", // em dash |
|
4695 | + "\xe2\80\x9a", // single low-9 quotation mark |
|
4696 | + "\xe2\80\x9e", // double low-9 quotation mark |
|
4697 | + "\xe2\80\xa6", // horizontal ellipsis |
|
4698 | + "\xe2\x80\x98", // left single curly quote |
|
4699 | + "\xe2\x80\x99", // right single curly quote |
|
4700 | + "\xe2\x80\x9c", // left double curly quote |
|
4701 | + "\xe2\x80\x9d", // right double curly quote |
|
4702 | + "\xe2\x80\x93", // en dash |
|
4703 | + "\xe2\x80\x94", // em dash |
|
4704 | 4704 | ); |
4705 | 4705 | |
4706 | 4706 | // windows 1252 / iso equivalents |
@@ -4718,15 +4718,15 @@ discard block |
||
4718 | 4718 | |
4719 | 4719 | // safe replacements |
4720 | 4720 | $replacechars = array( |
4721 | - ',', // ‚ |
|
4722 | - ',,', // „ |
|
4723 | - '...', // … |
|
4724 | - "'", // ‘ |
|
4725 | - "'", // ’ |
|
4726 | - '"', // “ |
|
4727 | - '"', // ” |
|
4728 | - '-', // – |
|
4729 | - '--', // — |
|
4721 | + ',', // ‚ |
|
4722 | + ',,', // „ |
|
4723 | + '...', // … |
|
4724 | + "'", // ‘ |
|
4725 | + "'", // ’ |
|
4726 | + '"', // “ |
|
4727 | + '"', // ” |
|
4728 | + '-', // – |
|
4729 | + '--', // — |
|
4730 | 4730 | ); |
4731 | 4731 | |
4732 | 4732 | if ($context['utf8']) |
@@ -5089,7 +5089,7 @@ discard block |
||
5089 | 5089 | */ |
5090 | 5090 | function inet_dtop($bin) |
5091 | 5091 | { |
5092 | - if(empty($bin)) |
|
5092 | + if (empty($bin)) |
|
5093 | 5093 | return ''; |
5094 | 5094 | |
5095 | 5095 | global $db_type; |
@@ -5120,28 +5120,28 @@ discard block |
||
5120 | 5120 | */ |
5121 | 5121 | function _safe_serialize($value) |
5122 | 5122 | { |
5123 | - if(is_null($value)) |
|
5123 | + if (is_null($value)) |
|
5124 | 5124 | return 'N;'; |
5125 | 5125 | |
5126 | - if(is_bool($value)) |
|
5127 | - return 'b:'. (int) $value .';'; |
|
5126 | + if (is_bool($value)) |
|
5127 | + return 'b:' . (int) $value . ';'; |
|
5128 | 5128 | |
5129 | - if(is_int($value)) |
|
5130 | - return 'i:'. $value .';'; |
|
5129 | + if (is_int($value)) |
|
5130 | + return 'i:' . $value . ';'; |
|
5131 | 5131 | |
5132 | - if(is_float($value)) |
|
5133 | - return 'd:'. str_replace(',', '.', $value) .';'; |
|
5132 | + if (is_float($value)) |
|
5133 | + return 'd:' . str_replace(',', '.', $value) . ';'; |
|
5134 | 5134 | |
5135 | - if(is_string($value)) |
|
5136 | - return 's:'. strlen($value) .':"'. $value .'";'; |
|
5135 | + if (is_string($value)) |
|
5136 | + return 's:' . strlen($value) . ':"' . $value . '";'; |
|
5137 | 5137 | |
5138 | - if(is_array($value)) |
|
5138 | + if (is_array($value)) |
|
5139 | 5139 | { |
5140 | 5140 | $out = ''; |
5141 | - foreach($value as $k => $v) |
|
5141 | + foreach ($value as $k => $v) |
|
5142 | 5142 | $out .= _safe_serialize($k) . _safe_serialize($v); |
5143 | 5143 | |
5144 | - return 'a:'. count($value) .':{'. $out .'}'; |
|
5144 | + return 'a:' . count($value) . ':{' . $out . '}'; |
|
5145 | 5145 | } |
5146 | 5146 | |
5147 | 5147 | // safe_serialize cannot serialize resources or objects. |
@@ -5183,7 +5183,7 @@ discard block |
||
5183 | 5183 | function _safe_unserialize($str) |
5184 | 5184 | { |
5185 | 5185 | // Input is not a string. |
5186 | - if(empty($str) || !is_string($str)) |
|
5186 | + if (empty($str) || !is_string($str)) |
|
5187 | 5187 | return false; |
5188 | 5188 | |
5189 | 5189 | $stack = array(); |
@@ -5197,40 +5197,40 @@ discard block |
||
5197 | 5197 | * 3 - in array, expecting value or another array |
5198 | 5198 | */ |
5199 | 5199 | $state = 0; |
5200 | - while($state != 1) |
|
5200 | + while ($state != 1) |
|
5201 | 5201 | { |
5202 | 5202 | $type = isset($str[0]) ? $str[0] : ''; |
5203 | - if($type == '}') |
|
5203 | + if ($type == '}') |
|
5204 | 5204 | $str = substr($str, 1); |
5205 | 5205 | |
5206 | - else if($type == 'N' && $str[1] == ';') |
|
5206 | + else if ($type == 'N' && $str[1] == ';') |
|
5207 | 5207 | { |
5208 | 5208 | $value = null; |
5209 | 5209 | $str = substr($str, 2); |
5210 | 5210 | } |
5211 | - else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches)) |
|
5211 | + else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches)) |
|
5212 | 5212 | { |
5213 | 5213 | $value = $matches[1] == '1' ? true : false; |
5214 | 5214 | $str = substr($str, 4); |
5215 | 5215 | } |
5216 | - else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches)) |
|
5216 | + else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches)) |
|
5217 | 5217 | { |
5218 | - $value = (int)$matches[1]; |
|
5218 | + $value = (int) $matches[1]; |
|
5219 | 5219 | $str = $matches[2]; |
5220 | 5220 | } |
5221 | - else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches)) |
|
5221 | + else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches)) |
|
5222 | 5222 | { |
5223 | - $value = (float)$matches[1]; |
|
5223 | + $value = (float) $matches[1]; |
|
5224 | 5224 | $str = $matches[3]; |
5225 | 5225 | } |
5226 | - else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";') |
|
5226 | + else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";') |
|
5227 | 5227 | { |
5228 | - $value = substr($matches[2], 0, (int)$matches[1]); |
|
5229 | - $str = substr($matches[2], (int)$matches[1] + 2); |
|
5228 | + $value = substr($matches[2], 0, (int) $matches[1]); |
|
5229 | + $str = substr($matches[2], (int) $matches[1] + 2); |
|
5230 | 5230 | } |
5231 | - else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches)) |
|
5231 | + else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches)) |
|
5232 | 5232 | { |
5233 | - $expectedLength = (int)$matches[1]; |
|
5233 | + $expectedLength = (int) $matches[1]; |
|
5234 | 5234 | $str = $matches[2]; |
5235 | 5235 | } |
5236 | 5236 | |
@@ -5238,10 +5238,10 @@ discard block |
||
5238 | 5238 | else |
5239 | 5239 | return false; |
5240 | 5240 | |
5241 | - switch($state) |
|
5241 | + switch ($state) |
|
5242 | 5242 | { |
5243 | 5243 | case 3: // In array, expecting value or another array. |
5244 | - if($type == 'a') |
|
5244 | + if ($type == 'a') |
|
5245 | 5245 | { |
5246 | 5246 | $stack[] = &$list; |
5247 | 5247 | $list[$key] = array(); |
@@ -5250,7 +5250,7 @@ discard block |
||
5250 | 5250 | $state = 2; |
5251 | 5251 | break; |
5252 | 5252 | } |
5253 | - if($type != '}') |
|
5253 | + if ($type != '}') |
|
5254 | 5254 | { |
5255 | 5255 | $list[$key] = $value; |
5256 | 5256 | $state = 2; |
@@ -5261,29 +5261,29 @@ discard block |
||
5261 | 5261 | return false; |
5262 | 5262 | |
5263 | 5263 | case 2: // in array, expecting end of array or a key |
5264 | - if($type == '}') |
|
5264 | + if ($type == '}') |
|
5265 | 5265 | { |
5266 | 5266 | // Array size is less than expected. |
5267 | - if(count($list) < end($expected)) |
|
5267 | + if (count($list) < end($expected)) |
|
5268 | 5268 | return false; |
5269 | 5269 | |
5270 | 5270 | unset($list); |
5271 | - $list = &$stack[count($stack)-1]; |
|
5271 | + $list = &$stack[count($stack) - 1]; |
|
5272 | 5272 | array_pop($stack); |
5273 | 5273 | |
5274 | 5274 | // Go to terminal state if we're at the end of the root array. |
5275 | 5275 | array_pop($expected); |
5276 | 5276 | |
5277 | - if(count($expected) == 0) |
|
5277 | + if (count($expected) == 0) |
|
5278 | 5278 | $state = 1; |
5279 | 5279 | |
5280 | 5280 | break; |
5281 | 5281 | } |
5282 | 5282 | |
5283 | - if($type == 'i' || $type == 's') |
|
5283 | + if ($type == 'i' || $type == 's') |
|
5284 | 5284 | { |
5285 | 5285 | // Array size exceeds expected length. |
5286 | - if(count($list) >= end($expected)) |
|
5286 | + if (count($list) >= end($expected)) |
|
5287 | 5287 | return false; |
5288 | 5288 | |
5289 | 5289 | $key = $value; |
@@ -5296,7 +5296,7 @@ discard block |
||
5296 | 5296 | |
5297 | 5297 | // Expecting array or value. |
5298 | 5298 | case 0: |
5299 | - if($type == 'a') |
|
5299 | + if ($type == 'a') |
|
5300 | 5300 | { |
5301 | 5301 | $data = array(); |
5302 | 5302 | $list = &$data; |
@@ -5305,7 +5305,7 @@ discard block |
||
5305 | 5305 | break; |
5306 | 5306 | } |
5307 | 5307 | |
5308 | - if($type != '}') |
|
5308 | + if ($type != '}') |
|
5309 | 5309 | { |
5310 | 5310 | $data = $value; |
5311 | 5311 | $state = 1; |
@@ -5318,7 +5318,7 @@ discard block |
||
5318 | 5318 | } |
5319 | 5319 | |
5320 | 5320 | // Trailing data in input. |
5321 | - if(!empty($str)) |
|
5321 | + if (!empty($str)) |
|
5322 | 5322 | return false; |
5323 | 5323 | |
5324 | 5324 | return $data; |
@@ -5372,7 +5372,7 @@ discard block |
||
5372 | 5372 | // Set different modes. |
5373 | 5373 | $chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666); |
5374 | 5374 | |
5375 | - foreach($chmodValues as $val) |
|
5375 | + foreach ($chmodValues as $val) |
|
5376 | 5376 | { |
5377 | 5377 | // If it's writable, break out of the loop. |
5378 | 5378 | if (is_writable($file)) |
@@ -5407,13 +5407,13 @@ discard block |
||
5407 | 5407 | $returnArray = @json_decode($json, $returnAsArray); |
5408 | 5408 | |
5409 | 5409 | // PHP 5.3 so no json_last_error_msg() |
5410 | - switch(json_last_error()) |
|
5410 | + switch (json_last_error()) |
|
5411 | 5411 | { |
5412 | 5412 | case JSON_ERROR_NONE: |
5413 | 5413 | $jsonError = false; |
5414 | 5414 | break; |
5415 | 5415 | case JSON_ERROR_DEPTH: |
5416 | - $jsonError = 'JSON_ERROR_DEPTH'; |
|
5416 | + $jsonError = 'JSON_ERROR_DEPTH'; |
|
5417 | 5417 | break; |
5418 | 5418 | case JSON_ERROR_STATE_MISMATCH: |
5419 | 5419 | $jsonError = 'JSON_ERROR_STATE_MISMATCH'; |
@@ -5441,10 +5441,10 @@ discard block |
||
5441 | 5441 | loadLanguage('Errors'); |
5442 | 5442 | |
5443 | 5443 | if (!empty($jsonDebug)) |
5444 | - log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']); |
|
5444 | + log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']); |
|
5445 | 5445 | |
5446 | 5446 | else |
5447 | - log_error($txt['json_'. $jsonError], 'critical'); |
|
5447 | + log_error($txt['json_' . $jsonError], 'critical'); |
|
5448 | 5448 | |
5449 | 5449 | // Everyone expects an array. |
5450 | 5450 | return array(); |
@@ -5548,7 +5548,7 @@ discard block |
||
5548 | 5548 | }); |
5549 | 5549 | |
5550 | 5550 | // Convert Punycode to Unicode |
5551 | - $tlds = array_map(function ($input) { |
|
5551 | + $tlds = array_map(function($input) { |
|
5552 | 5552 | $prefix = 'xn--'; |
5553 | 5553 | $safe_char = 0xFFFC; |
5554 | 5554 | $base = 36; |
@@ -5564,7 +5564,7 @@ discard block |
||
5564 | 5564 | |
5565 | 5565 | foreach ($enco_parts as $encoded) |
5566 | 5566 | { |
5567 | - if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0) |
|
5567 | + if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0) |
|
5568 | 5568 | { |
5569 | 5569 | $output_parts[] = $encoded; |
5570 | 5570 | continue; |
@@ -5575,7 +5575,7 @@ discard block |
||
5575 | 5575 | $idx = 0; |
5576 | 5576 | $char = 0x80; |
5577 | 5577 | $decoded = array(); |
5578 | - $output=''; |
|
5578 | + $output = ''; |
|
5579 | 5579 | $delim_pos = strrpos($encoded, '-'); |
5580 | 5580 | |
5581 | 5581 | if ($delim_pos > strlen($prefix)) |
@@ -5591,7 +5591,7 @@ discard block |
||
5591 | 5591 | |
5592 | 5592 | for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) |
5593 | 5593 | { |
5594 | - for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base) |
|
5594 | + for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base) |
|
5595 | 5595 | { |
5596 | 5596 | $cp = ord($encoded{$enco_idx++}); |
5597 | 5597 | $digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base)); |
@@ -5632,15 +5632,15 @@ discard block |
||
5632 | 5632 | |
5633 | 5633 | // 2 bytes |
5634 | 5634 | elseif ($v < (1 << 11)) |
5635 | - $output .= chr(192+($v >> 6)) . chr(128+($v & 63)); |
|
5635 | + $output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63)); |
|
5636 | 5636 | |
5637 | 5637 | // 3 bytes |
5638 | 5638 | elseif ($v < (1 << 16)) |
5639 | - $output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63)); |
|
5639 | + $output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); |
|
5640 | 5640 | |
5641 | 5641 | // 4 bytes |
5642 | 5642 | elseif ($v < (1 << 21)) |
5643 | - $output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63)); |
|
5643 | + $output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); |
|
5644 | 5644 | |
5645 | 5645 | // 'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k |
5646 | 5646 | else |
@@ -5747,7 +5747,7 @@ discard block |
||
5747 | 5747 | } |
5748 | 5748 | |
5749 | 5749 | // This recursive function creates the index array from the strings |
5750 | - $add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index) |
|
5750 | + $add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index) |
|
5751 | 5751 | { |
5752 | 5752 | static $depth = 0; |
5753 | 5753 | $depth++; |
@@ -5774,7 +5774,7 @@ discard block |
||
5774 | 5774 | }; |
5775 | 5775 | |
5776 | 5776 | // This recursive function turns the index array into a regular expression |
5777 | - $index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex) |
|
5777 | + $index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex) |
|
5778 | 5778 | { |
5779 | 5779 | static $depth = 0; |
5780 | 5780 | $depth++; |
@@ -5798,11 +5798,11 @@ discard block |
||
5798 | 5798 | |
5799 | 5799 | if (count(array_keys($value)) == 1) |
5800 | 5800 | { |
5801 | - $new_key_array = explode('(?'.'>', $sub_regex); |
|
5801 | + $new_key_array = explode('(?' . '>', $sub_regex); |
|
5802 | 5802 | $new_key .= $new_key_array[0]; |
5803 | 5803 | } |
5804 | 5804 | else |
5805 | - $sub_regex = '(?'.'>' . $sub_regex . ')'; |
|
5805 | + $sub_regex = '(?' . '>' . $sub_regex . ')'; |
|
5806 | 5806 | } |
5807 | 5807 | |
5808 | 5808 | if ($depth > 1) |
@@ -5842,7 +5842,7 @@ discard block |
||
5842 | 5842 | $index = $add_string_to_index($string, $index); |
5843 | 5843 | |
5844 | 5844 | while (!empty($index)) |
5845 | - $regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')'; |
|
5845 | + $regexes[] = '(?' . '>' . $index_to_regex($index, $delim) . ')'; |
|
5846 | 5846 | |
5847 | 5847 | // Restore PHP's internal character encoding to whatever it was originally |
5848 | 5848 | if (!empty($current_encoding)) |