@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | $to = explode('/', $lang_dir); |
| 540 | 540 | $relPath = $to; |
| 541 | 541 | |
| 542 | - foreach($from as $depth => $dir) |
|
| 542 | + foreach ($from as $depth => $dir) |
|
| 543 | 543 | { |
| 544 | 544 | if ($dir === $to[$depth]) |
| 545 | 545 | array_shift($relPath); |
@@ -3044,94 +3044,94 @@ discard block |
||
| 3044 | 3044 | // Translation table for the character sets not native for MySQL. |
| 3045 | 3045 | $translation_tables = array( |
| 3046 | 3046 | 'windows-1255' => array( |
| 3047 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
| 3048 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
| 3049 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
| 3050 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
| 3051 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
| 3052 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
| 3053 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
| 3054 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
| 3055 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
| 3056 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
| 3057 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
| 3058 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
| 3059 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
| 3060 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
| 3061 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
| 3062 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
| 3063 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
| 3064 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
| 3065 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
| 3066 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
| 3067 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
| 3068 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
| 3069 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
| 3070 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
| 3071 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
| 3072 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
| 3073 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
| 3074 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
| 3075 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
| 3076 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
| 3077 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
| 3078 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
| 3079 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
| 3080 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
| 3081 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
| 3082 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
| 3083 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
| 3084 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
| 3085 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
| 3086 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
| 3087 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
| 3088 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
| 3047 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
| 3048 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
| 3049 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
| 3050 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
| 3051 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
| 3052 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
| 3053 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
| 3054 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
| 3055 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
| 3056 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
| 3057 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
| 3058 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
| 3059 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
| 3060 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
| 3061 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
| 3062 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
| 3063 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
| 3064 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
| 3065 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
| 3066 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
| 3067 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
| 3068 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
| 3069 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
| 3070 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
| 3071 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
| 3072 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
| 3073 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
| 3074 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
| 3075 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
| 3076 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
| 3077 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
| 3078 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
| 3079 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
| 3080 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
| 3081 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
| 3082 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
| 3083 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
| 3084 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
| 3085 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
| 3086 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
| 3087 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
| 3088 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
| 3089 | 3089 | '0xFA' => '0xD7AA', |
| 3090 | 3090 | ), |
| 3091 | 3091 | 'windows-1253' => array( |
| 3092 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
| 3093 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
| 3094 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
| 3095 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
| 3096 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
| 3097 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
| 3098 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
| 3099 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
| 3100 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
| 3101 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
| 3102 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
| 3103 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
| 3104 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
| 3105 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
| 3106 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
| 3107 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
| 3108 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
| 3109 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
| 3110 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
| 3111 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
| 3112 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
| 3113 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
| 3114 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
| 3115 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
| 3116 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
| 3117 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
| 3118 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
| 3119 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
| 3120 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
| 3121 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
| 3122 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
| 3123 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
| 3124 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
| 3125 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
| 3126 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
| 3127 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
| 3128 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
| 3129 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
| 3130 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
| 3131 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
| 3132 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
| 3133 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
| 3134 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
| 3092 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
| 3093 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
| 3094 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
| 3095 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
| 3096 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
| 3097 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
| 3098 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
| 3099 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
| 3100 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
| 3101 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
| 3102 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
| 3103 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
| 3104 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
| 3105 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
| 3106 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
| 3107 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
| 3108 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
| 3109 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
| 3110 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
| 3111 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
| 3112 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
| 3113 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
| 3114 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
| 3115 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
| 3116 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
| 3117 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
| 3118 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
| 3119 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
| 3120 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
| 3121 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
| 3122 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
| 3123 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
| 3124 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
| 3125 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
| 3126 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
| 3127 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
| 3128 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
| 3129 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
| 3130 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
| 3131 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
| 3132 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
| 3133 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
| 3134 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
| 3135 | 3135 | ), |
| 3136 | 3136 | ); |
| 3137 | 3137 | |
@@ -3376,7 +3376,7 @@ discard block |
||
| 3376 | 3376 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
| 3377 | 3377 | $new_string = preg_replace_callback( |
| 3378 | 3378 | '~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', |
| 3379 | - function ($matches) |
|
| 3379 | + function($matches) |
|
| 3380 | 3380 | { |
| 3381 | 3381 | return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; |
| 3382 | 3382 | }, |
@@ -758,7 +758,7 @@ |
||
| 758 | 758 | // Filter out any redundant separators before we start the loop |
| 759 | 759 | $context['config_vars'] = array_filter( |
| 760 | 760 | $context['config_vars'], |
| 761 | - function ($v) use ($context) |
|
| 761 | + function($v) use ($context) |
|
| 762 | 762 | { |
| 763 | 763 | static $config_vars, $prev; |
| 764 | 764 | |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | global $context, $scripturl, $txt, $settings, $options, $modSettings; |
| 278 | 278 | |
| 279 | 279 | echo ' |
| 280 | - <div class="windowbg" id="msg', $message['id'],'"> |
|
| 280 | + <div class="windowbg" id="msg', $message['id'], '"> |
|
| 281 | 281 | <div class="post_wrapper"> |
| 282 | 282 | <div class="poster">'; |
| 283 | 283 | |
@@ -1946,7 +1946,7 @@ discard block |
||
| 1946 | 1946 | <div class="floatright smalltext righttext"> |
| 1947 | 1947 | <div class="recipient_to">« <strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), ' »</div>'; |
| 1948 | 1948 | |
| 1949 | - if(!empty($draft['recipients']['bcc'])) |
|
| 1949 | + if (!empty($draft['recipients']['bcc'])) |
|
| 1950 | 1950 | echo' |
| 1951 | 1951 | <div class="pm_bbc">« <strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), ' »</div>'; |
| 1952 | 1952 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | { |
| 379 | 379 | $val = 'CASE '; |
| 380 | 380 | foreach ($members as $k => $v) |
| 381 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
| 381 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
| 382 | 382 | |
| 383 | 383 | $val = $val . ' END'; |
| 384 | 384 | $type = 'raw'; |
@@ -1045,11 +1045,11 @@ discard block |
||
| 1045 | 1045 | // Anything that isn't a specification, punctuation mark, or whitespace. |
| 1046 | 1046 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
| 1047 | 1047 | // A series of punctuation marks (except %), possibly separated by whitespace. |
| 1048 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1048 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1049 | 1049 | // Unwanted trailing punctuation and whitespace. |
| 1050 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1050 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1051 | 1051 | // Unwanted opening punctuation and whitespace. |
| 1052 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1052 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1053 | 1053 | ), |
| 1054 | 1054 | array( |
| 1055 | 1055 | '', |
@@ -1447,7 +1447,7 @@ discard block |
||
| 1447 | 1447 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
| 1448 | 1448 | else |
| 1449 | 1449 | { |
| 1450 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
| 1450 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
| 1451 | 1451 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
| 1452 | 1452 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
| 1453 | 1453 | } |
@@ -1458,7 +1458,7 @@ discard block |
||
| 1458 | 1458 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
| 1459 | 1459 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
| 1460 | 1460 | |
| 1461 | - $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1461 | + $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1462 | 1462 | } |
| 1463 | 1463 | // Audio. |
| 1464 | 1464 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1466,7 +1466,7 @@ discard block |
||
| 1466 | 1466 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
| 1467 | 1467 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
| 1468 | 1468 | |
| 1469 | - $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
| 1469 | + $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
| 1470 | 1470 | } |
| 1471 | 1471 | // Anything else. |
| 1472 | 1472 | else |
@@ -1635,7 +1635,7 @@ discard block |
||
| 1635 | 1635 | 'type' => 'unparsed_commas_content', |
| 1636 | 1636 | 'test' => '\d+,\d+\]', |
| 1637 | 1637 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
| 1638 | - 'validate' => function (&$tag, &$data, $disabled) |
|
| 1638 | + 'validate' => function(&$tag, &$data, $disabled) |
|
| 1639 | 1639 | { |
| 1640 | 1640 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
| 1641 | 1641 | if (empty($scheme)) |
@@ -1748,8 +1748,8 @@ discard block |
||
| 1748 | 1748 | else |
| 1749 | 1749 | $url = get_proxied_url($url); |
| 1750 | 1750 | |
| 1751 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
| 1752 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
| 1751 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
| 1752 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
| 1753 | 1753 | |
| 1754 | 1754 | $data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . ' class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">'; |
| 1755 | 1755 | }, |
@@ -2166,12 +2166,12 @@ discard block |
||
| 2166 | 2166 | $codes[] = array( |
| 2167 | 2167 | 'tag' => 'cowsay', |
| 2168 | 2168 | 'parameters' => array( |
| 2169 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
| 2169 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
| 2170 | 2170 | { |
| 2171 | 2171 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2172 | 2172 | }, |
| 2173 | 2173 | ), |
| 2174 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
| 2174 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
| 2175 | 2175 | { |
| 2176 | 2176 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2177 | 2177 | }, |
@@ -3843,7 +3843,7 @@ discard block |
||
| 3843 | 3843 | if ($fp != false) |
| 3844 | 3844 | { |
| 3845 | 3845 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
| 3846 | - fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
| 3846 | + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
| 3847 | 3847 | |
| 3848 | 3848 | // Read in the HTTP/1.1 or whatever. |
| 3849 | 3849 | $test = substr(fgets($fp, 11), -1); |
@@ -4439,7 +4439,7 @@ discard block |
||
| 4439 | 4439 | |
| 4440 | 4440 | uasort( |
| 4441 | 4441 | $context['css_files'], |
| 4442 | - function ($a, $b) |
|
| 4442 | + function($a, $b) |
|
| 4443 | 4443 | { |
| 4444 | 4444 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
| 4445 | 4445 | } |
@@ -5741,7 +5741,7 @@ discard block |
||
| 5741 | 5741 | { |
| 5742 | 5742 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
| 5743 | 5743 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5744 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5744 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5745 | 5745 | if ($keep_alive) |
| 5746 | 5746 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
| 5747 | 5747 | else |
@@ -5751,7 +5751,7 @@ discard block |
||
| 5751 | 5751 | { |
| 5752 | 5752 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
| 5753 | 5753 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5754 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5754 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5755 | 5755 | if ($keep_alive) |
| 5756 | 5756 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
| 5757 | 5757 | else |
@@ -6000,13 +6000,13 @@ discard block |
||
| 6000 | 6000 | |
| 6001 | 6001 | // UTF-8 occurences of MS special characters |
| 6002 | 6002 | $findchars_utf8 = array( |
| 6003 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 6004 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 6005 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
| 6006 | - "\xe2\x80\x98", // left single curly quote |
|
| 6007 | - "\xe2\x80\x99", // right single curly quote |
|
| 6008 | - "\xe2\x80\x9c", // left double curly quote |
|
| 6009 | - "\xe2\x80\x9d", // right double curly quote |
|
| 6003 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 6004 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 6005 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
| 6006 | + "\xe2\x80\x98", // left single curly quote |
|
| 6007 | + "\xe2\x80\x99", // right single curly quote |
|
| 6008 | + "\xe2\x80\x9c", // left double curly quote |
|
| 6009 | + "\xe2\x80\x9d", // right double curly quote |
|
| 6010 | 6010 | ); |
| 6011 | 6011 | |
| 6012 | 6012 | // windows 1252 / iso equivalents |
@@ -6022,13 +6022,13 @@ discard block |
||
| 6022 | 6022 | |
| 6023 | 6023 | // safe replacements |
| 6024 | 6024 | $replacechars = array( |
| 6025 | - ',', // ‚ |
|
| 6026 | - ',,', // „ |
|
| 6027 | - '...', // … |
|
| 6028 | - "'", // ‘ |
|
| 6029 | - "'", // ’ |
|
| 6030 | - '"', // “ |
|
| 6031 | - '"', // ” |
|
| 6025 | + ',', // ‚ |
|
| 6026 | + ',,', // „ |
|
| 6027 | + '...', // … |
|
| 6028 | + "'", // ‘ |
|
| 6029 | + "'", // ’ |
|
| 6030 | + '"', // “ |
|
| 6031 | + '"', // ” |
|
| 6032 | 6032 | ); |
| 6033 | 6033 | |
| 6034 | 6034 | if ($context['utf8']) |
@@ -6389,7 +6389,7 @@ discard block |
||
| 6389 | 6389 | // We don't want abbreviations like '+03' or '-11'. |
| 6390 | 6390 | $abbrs = array_filter( |
| 6391 | 6391 | $tzvalue['abbrs'], |
| 6392 | - function ($abbr) |
|
| 6392 | + function($abbr) |
|
| 6393 | 6393 | { |
| 6394 | 6394 | return !strspn($abbr, '+-'); |
| 6395 | 6395 | } |
@@ -7364,7 +7364,7 @@ discard block |
||
| 7364 | 7364 | EXISTS ( |
| 7365 | 7365 | SELECT bpv.id_board |
| 7366 | 7366 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 7367 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
| 7367 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
| 7368 | 7368 | AND bpv.deny = 0 |
| 7369 | 7369 | AND bpv.id_board = b.id_board |
| 7370 | 7370 | )'; |
@@ -7374,7 +7374,7 @@ discard block |
||
| 7374 | 7374 | AND NOT EXISTS ( |
| 7375 | 7375 | SELECT bpv.id_board |
| 7376 | 7376 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 7377 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
| 7377 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
| 7378 | 7378 | AND bpv.deny = 1 |
| 7379 | 7379 | AND bpv.id_board = b.id_board |
| 7380 | 7380 | )'; |
@@ -7686,8 +7686,8 @@ discard block |
||
| 7686 | 7686 | $i = 0; |
| 7687 | 7687 | while (empty($done)) |
| 7688 | 7688 | { |
| 7689 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
| 7690 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
| 7689 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
| 7690 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
| 7691 | 7691 | else |
| 7692 | 7692 | $done = true; |
| 7693 | 7693 | } |
@@ -7697,8 +7697,8 @@ discard block |
||
| 7697 | 7697 | $i = 0; |
| 7698 | 7698 | while (empty($done)) |
| 7699 | 7699 | { |
| 7700 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
| 7701 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
| 7700 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
| 7701 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
| 7702 | 7702 | else |
| 7703 | 7703 | $done = true; |
| 7704 | 7704 | } |
@@ -7876,7 +7876,7 @@ discard block |
||
| 7876 | 7876 | if (empty($stringSubject)) |
| 7877 | 7877 | return ''; |
| 7878 | 7878 | |
| 7879 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
| 7879 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
| 7880 | 7880 | $toFind = array(); |
| 7881 | 7881 | $replaceWith = array(); |
| 7882 | 7882 | |
@@ -280,7 +280,6 @@ discard block |
||
| 280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
| 281 | 281 | $parameters['members'] = $members; |
| 282 | 282 | } |
| 283 | - |
|
| 284 | 283 | elseif ($members === null) |
| 285 | 284 | $condition = '1=1'; |
| 286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
| 383 | 382 | $val = $val . ' END'; |
| 384 | 383 | $type = 'raw'; |
| 385 | 384 | } |
| 386 | - |
|
| 387 | 385 | else |
| 388 | 386 | $val = alert_count($members, true); |
| 389 | 387 | } |
| 390 | - |
|
| 391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
| 392 | 389 | { |
| 393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2167,12 +2164,12 @@ discard block |
||
| 2167 | 2164 | 'tag' => 'cowsay', |
| 2168 | 2165 | 'parameters' => array( |
| 2169 | 2166 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2170 | - { |
|
| 2167 | + { |
|
| 2171 | 2168 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2172 | 2169 | }, |
| 2173 | 2170 | ), |
| 2174 | 2171 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2175 | - { |
|
| 2172 | + { |
|
| 2176 | 2173 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2177 | 2174 | }, |
| 2178 | 2175 | ), |
@@ -2501,7 +2498,8 @@ discard block |
||
| 2501 | 2498 | |
| 2502 | 2499 | foreach (array('path', 'query', 'fragment') as $part) |
| 2503 | 2500 | { |
| 2504 | - switch ($part) { |
|
| 2501 | + switch ($part) |
|
| 2502 | + { |
|
| 2505 | 2503 | case 'path': |
| 2506 | 2504 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
| 2507 | 2505 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2818,7 +2816,9 @@ discard block |
||
| 2818 | 2816 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
| 2819 | 2817 | |
| 2820 | 2818 | // A closing tag that doesn't match any open tags? Skip it. |
| 2821 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
| 2819 | + if (!in_array($look_for, array_map(function($code) |
|
| 2820 | + { |
|
| 2821 | +return $code['tag']; }, $open_tags))) |
|
| 2822 | 2822 | continue; |
| 2823 | 2823 | |
| 2824 | 2824 | $to_close = array(); |
@@ -4358,7 +4358,6 @@ discard block |
||
| 4358 | 4358 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4359 | 4359 | $minSeed = $js_file['options']['seed']; |
| 4360 | 4360 | } |
| 4361 | - |
|
| 4362 | 4361 | else |
| 4363 | 4362 | { |
| 4364 | 4363 | echo ' |
@@ -6288,7 +6287,8 @@ discard block |
||
| 6288 | 6287 | $zones[$tzkey]['tzid'] = $tzid; |
| 6289 | 6288 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
| 6290 | 6289 | |
| 6291 | - foreach ($tzinfo as $transition) { |
|
| 6290 | + foreach ($tzinfo as $transition) |
|
| 6291 | + { |
|
| 6292 | 6292 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
| 6293 | 6293 | } |
| 6294 | 6294 | |
@@ -6792,7 +6792,6 @@ discard block |
||
| 6792 | 6792 | $isWritable = true; |
| 6793 | 6793 | break; |
| 6794 | 6794 | } |
| 6795 | - |
|
| 6796 | 6795 | else |
| 6797 | 6796 | @chmod($file, $val); |
| 6798 | 6797 | } |
@@ -7881,7 +7880,8 @@ discard block |
||
| 7881 | 7880 | $replaceWith = array(); |
| 7882 | 7881 | |
| 7883 | 7882 | if (!empty($matches[1])) |
| 7884 | - foreach ($matches[1] as $token) { |
|
| 7883 | + foreach ($matches[1] as $token) |
|
| 7884 | + { |
|
| 7885 | 7885 | $toFind[] = '{' . $token . '}'; |
| 7886 | 7886 | $replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token; |
| 7887 | 7887 | } |