@@ -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 ' |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | |
1626 | 1626 | // Our custom error handler - does nothing but does stop public errors from XML! |
1627 | 1627 | set_error_handler( |
1628 | - function ($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1628 | + function($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1629 | 1629 | { |
1630 | 1630 | if ($support_js) |
1631 | 1631 | return true; |
@@ -2610,94 +2610,94 @@ discard block |
||
2610 | 2610 | // Translation table for the character sets not native for MySQL. |
2611 | 2611 | $translation_tables = array( |
2612 | 2612 | 'windows-1255' => array( |
2613 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2614 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2615 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2616 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2617 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2618 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2619 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2620 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2621 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2622 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2623 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2624 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2625 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2626 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2627 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2628 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2629 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2630 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2631 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2632 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2633 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2634 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2635 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2636 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2637 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2638 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2639 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2640 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2641 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2642 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2643 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2644 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2645 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2646 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2647 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2648 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2649 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2650 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2651 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2652 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2653 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2654 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2613 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2614 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2615 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2616 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2617 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2618 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2619 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2620 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2621 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2622 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2623 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2624 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2625 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2626 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2627 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2628 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2629 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2630 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2631 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2632 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2633 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2634 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2635 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2636 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2637 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2638 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2639 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2640 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2641 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2642 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2643 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2644 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2645 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2646 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2647 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2648 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2649 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2650 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2651 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2652 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2653 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2654 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2655 | 2655 | '0xFA' => '0xD7AA', |
2656 | 2656 | ), |
2657 | 2657 | 'windows-1253' => array( |
2658 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2659 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2660 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2661 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2662 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2663 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2664 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2665 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2666 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2667 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2668 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2669 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2670 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2671 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2672 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2673 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2674 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2675 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2676 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2677 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2678 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2679 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2680 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2681 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2682 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2683 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2684 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2685 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2686 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2687 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2688 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2689 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2690 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2691 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2692 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2693 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2694 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2695 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2696 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2697 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2698 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2699 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2700 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2658 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2659 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2660 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2661 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2662 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2663 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2664 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2665 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2666 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2667 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2668 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2669 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2670 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2671 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2672 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2673 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2674 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2675 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2676 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2677 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2678 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2679 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2680 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2681 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2682 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2683 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2684 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2685 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2686 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2687 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2688 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2689 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2690 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2691 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2692 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2693 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2694 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2695 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2696 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2697 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2698 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2699 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2700 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2701 | 2701 | ), |
2702 | 2702 | ); |
2703 | 2703 | |
@@ -3799,7 +3799,7 @@ discard block |
||
3799 | 3799 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
3800 | 3800 | <input type="hidden" name="backup_done" id="backup_done" value="0"> |
3801 | 3801 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
3802 | - <div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;"> |
|
3802 | + <div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;"> |
|
3803 | 3803 | <span id="debuginfo"></span> |
3804 | 3804 | </div>'; |
3805 | 3805 | |
@@ -4300,7 +4300,7 @@ discard block |
||
4300 | 4300 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4301 | 4301 | <input type="hidden" name="utf8_done" id="utf8_done" value="0"> |
4302 | 4302 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
4303 | - <div id="debug_section" style="height: ', ($is_debug ? '97' : '12') , 'px; overflow: auto;"> |
|
4303 | + <div id="debug_section" style="height: ', ($is_debug ? '97' : '12'), 'px; overflow: auto;"> |
|
4304 | 4304 | <span id="debuginfo"></span> |
4305 | 4305 | </div>'; |
4306 | 4306 | |
@@ -4401,7 +4401,7 @@ discard block |
||
4401 | 4401 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
4402 | 4402 | <input type="hidden" name="json_done" id="json_done" value="0"> |
4403 | 4403 | <strong>Completed <span id="tab_done">', $upcontext['cur_table_num'], '</span> out of ', $upcontext['table_count'], ' tables.</strong> |
4404 | - <div id="debug_section" style="height: ', ($is_debug ? '115' : '12') , 'px; overflow: auto;"> |
|
4404 | + <div id="debug_section" style="height: ', ($is_debug ? '115' : '12'), 'px; overflow: auto;"> |
|
4405 | 4405 | <span id="debuginfo"></span> |
4406 | 4406 | </div>'; |
4407 | 4407 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return array The truncated array |
25 | 25 | */ |
26 | -function truncateArray($arr, $max_length=1900) |
|
26 | +function truncateArray($arr, $max_length = 1900) |
|
27 | 27 | { |
28 | 28 | $curr_length = array_sum(array_map("strlen", $arr)); |
29 | 29 | if ($curr_length <= $max_length) |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | else |
32 | 32 | { |
33 | 33 | // Truncate each element's value to a reasonable length |
34 | - $param_max = floor($max_length/count($arr)); |
|
34 | + $param_max = floor($max_length / count($arr)); |
|
35 | 35 | foreach ($arr as $key => &$value) |
36 | 36 | $value = substr($value, 0, $param_max - strlen($key) - 5); |
37 | 37 | return $arr; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | if (filemtime($boarddir . '/db_last_error.php') === $last_db_error_change) |
198 | 198 | { |
199 | 199 | // Write the change |
200 | - $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
200 | + $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
201 | 201 | $written_bytes = file_put_contents($boarddir . '/db_last_error.php', $write_db_change, LOCK_EX); |
202 | 202 | |
203 | 203 | // survey says ... |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | ', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br> |
271 | 271 | ', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br> |
272 | 272 | ', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br> |
273 | - ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),' |
|
273 | + ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), ' |
|
274 | 274 | ', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>'; |
275 | 275 | |
276 | 276 | if (function_exists('memory_get_peak_usage')) |
@@ -251,7 +251,7 @@ |
||
251 | 251 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
252 | 252 | $fts_language[$row['cfgname']] = $row['cfgname']; |
253 | 253 | |
254 | - $config_vars = array_merge ($config_vars, array( |
|
254 | + $config_vars = array_merge($config_vars, array( |
|
255 | 255 | '', |
256 | 256 | array('search_language', $txt['search_language'], 'db', 'select', $fts_language, 'pgFulltextSearch') |
257 | 257 | ) |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | $version = $smcFunc['db_get_version'](); |
39 | 39 | // if we got a Beta Version |
40 | 40 | if (stripos($version, 'beta') !== false) |
41 | - $version = substr($version, 0, stripos($version, 'beta')).'.0'; |
|
41 | + $version = substr($version, 0, stripos($version, 'beta')) . '.0'; |
|
42 | 42 | // or RC |
43 | 43 | if (stripos($version, 'rc') !== false) |
44 | - $version = substr($version, 0, stripos($version, 'rc')).'.0'; |
|
44 | + $version = substr($version, 0, stripos($version, 'rc')) . '.0'; |
|
45 | 45 | |
46 | - if (version_compare($version,'9.5.0','>=')) |
|
46 | + if (version_compare($version, '9.5.0', '>=')) |
|
47 | 47 | $smcFunc['db_support_ignore'] = true; |
48 | 48 | } |
49 | 49 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | function smf_db_search_support($search_type) |
57 | 57 | { |
58 | - $supported_types = array('custom','fulltext'); |
|
58 | + $supported_types = array('custom', 'fulltext'); |
|
59 | 59 | |
60 | 60 | return in_array($search_type, $supported_types); |
61 | 61 | } |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | if (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0) |
110 | 110 | { |
111 | 111 | $db_string = preg_replace('~^\s*INSERT\sIGNORE~i', 'INSERT', $db_string); |
112 | - if ($smcFunc['db_support_ignore']){ |
|
112 | + if ($smcFunc['db_support_ignore']) { |
|
113 | 113 | //pg style "INSERT INTO.... ON CONFLICT DO NOTHING" |
114 | - $db_string = $db_string.' ON CONFLICT DO NOTHING'; |
|
114 | + $db_string = $db_string . ' ON CONFLICT DO NOTHING'; |
|
115 | 115 | } |
116 | 116 | else |
117 | 117 | { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $language_ftx = $modSettings['search_language']; |
169 | 169 | else |
170 | 170 | { |
171 | - $request = $smcFunc['db_query']('',' |
|
171 | + $request = $smcFunc['db_query']('', ' |
|
172 | 172 | SELECT cfgname FROM pg_ts_config WHERE oid = current_setting({string:default_language})::regconfig', |
173 | 173 | array( |
174 | 174 | 'default_language' => 'default_text_search_config' |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'value' => $txt['date'], |
137 | 137 | ), |
138 | 138 | 'data' => array( |
139 | - 'function' => function ($rowData) use ($txt) |
|
139 | + 'function' => function($rowData) use ($txt) |
|
140 | 140 | { |
141 | 141 | // Recurring every year or just a single year? |
142 | 142 | $year = $rowData['year'] == '1004' ? sprintf('(%1$s)', $txt['every_year']) : $rowData['year']; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | checkSession(); |
219 | 219 | |
220 | 220 | // Not too long good sir? |
221 | - $_REQUEST['title'] = $smcFunc['substr']($_REQUEST['title'], 0, 60); |
|
221 | + $_REQUEST['title'] = $smcFunc['substr']($_REQUEST['title'], 0, 60); |
|
222 | 222 | $_REQUEST['holiday'] = isset($_REQUEST['holiday']) ? (int) $_REQUEST['holiday'] : 0; |
223 | 223 | |
224 | 224 | if (isset($_REQUEST['delete'])) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // Just send a generic message. |
77 | 77 | else |
78 | 78 | $this->setResponse(array( |
79 | - 'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error', |
|
79 | + 'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error', |
|
80 | 80 | 'type' => 'error', |
81 | 81 | 'data' => false, |
82 | 82 | )); |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | // Gotta urlencode the filename. |
407 | 407 | if ($this->_attachResults) |
408 | 408 | foreach ($this->_attachResults as $k => $v) |
409 | - $this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']); |
|
409 | + $this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']); |
|
410 | 410 | |
411 | 411 | $this->_response = array( |
412 | 412 | 'files' => $this->_attachResults ? $this->_attachResults : false, |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | ob_start(); |
434 | 434 | |
435 | 435 | // Set the header. |
436 | - header('Content-Type: application/json; charset='. $context['character_set'] .''); |
|
436 | + header('Content-Type: application/json; charset=' . $context['character_set'] . ''); |
|
437 | 437 | |
438 | 438 | echo $smcFunc['json_encode']($this->_response ? $this->_response : array()); |
439 | 439 |
@@ -197,22 +197,22 @@ discard block |
||
197 | 197 | |
198 | 198 | case 'date': |
199 | 199 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d)$~', $replacement, $date_matches) === 1) |
200 | - return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]).'::date'; |
|
200 | + return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]) . '::date'; |
|
201 | 201 | else |
202 | 202 | smf_db_error_backtrace('Wrong value type sent to the database. Date expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
203 | 203 | break; |
204 | 204 | |
205 | 205 | case 'time': |
206 | 206 | if (preg_match('~^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $time_matches) === 1) |
207 | - return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]).'::time'; |
|
207 | + return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]) . '::time'; |
|
208 | 208 | else |
209 | 209 | smf_db_error_backtrace('Wrong value type sent to the database. Time expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
210 | 210 | break; |
211 | 211 | |
212 | 212 | case 'datetime': |
213 | 213 | 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) |
214 | - return 'to_timestamp('. |
|
215 | - 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]). |
|
214 | + return 'to_timestamp(' . |
|
215 | + 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 | 216 | ',\'YYYY-MM-DD HH24:MI:SS\')'; |
217 | 217 | else |
218 | 218 | smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | if (!empty($keys) && (count($keys) > 0) && $returnmode > 0) |
795 | 795 | { |
796 | 796 | // we only take the first key |
797 | - $returning = ' RETURNING '.$keys[0]; |
|
797 | + $returning = ' RETURNING ' . $keys[0]; |
|
798 | 798 | $with_returning = true; |
799 | 799 | } |
800 | 800 | |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
826 | 826 | VALUES |
827 | 827 | ' . implode(', |
828 | - ', $insertRows).$replace.$returning, |
|
828 | + ', $insertRows) . $replace . $returning, |
|
829 | 829 | array( |
830 | 830 | 'security_override' => true, |
831 | 831 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | if ($returnmode === 2) |
839 | 839 | $return_var = array(); |
840 | 840 | |
841 | - while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
841 | + while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
842 | 842 | { |
843 | 843 | if (is_numeric($row[0])) // try to emulate mysql limitation |
844 | 844 | { |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | 'Shitiz "Dragooon" Garg', |
591 | 591 | 'Karl "RegularExpression" Benson', |
592 | 592 | 'Matthew "Labradoodle-360" Kerle', |
593 | - $user_info['is_admin'] ? 'Matt "Grudge" Wolf': 'Grudge', |
|
593 | + $user_info['is_admin'] ? 'Matt "Grudge" Wolf' : 'Grudge', |
|
594 | 594 | 'Michael "Thantos" Miller', |
595 | 595 | 'Norv', |
596 | 596 | 'Peter "Arantor" Spicer', |
@@ -814,13 +814,13 @@ discard block |
||
814 | 814 | $credit_info = $smcFunc['json_decode']($row['credits'], true); |
815 | 815 | |
816 | 816 | $copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' © ' . $smcFunc['htmlspecialchars']($credit_info['copyright']); |
817 | - $license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="'. $smcFunc['htmlspecialchars']($credit_info['licenseurl']) .'">'. $smcFunc['htmlspecialchars']($credit_info['license']) .'</a>' : $smcFunc['htmlspecialchars']($credit_info['license'])); |
|
817 | + $license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="' . $smcFunc['htmlspecialchars']($credit_info['licenseurl']) . '">' . $smcFunc['htmlspecialchars']($credit_info['license']) . '</a>' : $smcFunc['htmlspecialchars']($credit_info['license'])); |
|
818 | 818 | $version = $txt['credits_version'] . ' ' . $row['version']; |
819 | 819 | $title = (empty($credit_info['title']) ? $row['name'] : $smcFunc['htmlspecialchars']($credit_info['title'])) . ': ' . $version; |
820 | 820 | |
821 | 821 | // build this one out and stash it away |
822 | 822 | $mod_name = empty($credit_info['url']) ? $title : '<a href="' . $credit_info['url'] . '">' . $title . '</a>'; |
823 | - $mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : ''); |
|
823 | + $mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : ''); |
|
824 | 824 | } |
825 | 825 | cache_put_data('mods_credits', $mods, 86400); |
826 | 826 | } |