@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $to = explode('/', $lang_dir); |
547 | 547 | $relPath = $to; |
548 | 548 | |
549 | - foreach($from as $depth => $dir) |
|
549 | + foreach ($from as $depth => $dir) |
|
550 | 550 | { |
551 | 551 | if ($dir === $to[$depth]) |
552 | 552 | array_shift($relPath); |
@@ -3067,94 +3067,94 @@ discard block |
||
3067 | 3067 | // Translation table for the character sets not native for MySQL. |
3068 | 3068 | $translation_tables = array( |
3069 | 3069 | 'windows-1255' => array( |
3070 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3071 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3072 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3073 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3074 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3075 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3076 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3077 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3078 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3079 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3080 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3081 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3082 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3083 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3084 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3085 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3086 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3087 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3088 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3089 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3090 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3091 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3092 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3093 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3094 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3095 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3096 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3097 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3098 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3099 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3100 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3101 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3102 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3103 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3104 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3105 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3106 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3107 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3108 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3109 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3110 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3111 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3070 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3071 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3072 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3073 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3074 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3075 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3076 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3077 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3078 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3079 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3080 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3081 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3082 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3083 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3084 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3085 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3086 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3087 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3088 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3089 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3090 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3091 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3092 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3093 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3094 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3095 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3096 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3097 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3098 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3099 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3100 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3101 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3102 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3103 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3104 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3105 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3106 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3107 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3108 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3109 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3110 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3111 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3112 | 3112 | '0xFA' => '0xD7AA', |
3113 | 3113 | ), |
3114 | 3114 | 'windows-1253' => array( |
3115 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3116 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3117 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3118 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3119 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3120 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3121 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3122 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3123 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3124 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3125 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3126 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3127 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3128 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3129 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3130 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3131 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3132 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3133 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3134 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3135 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3136 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3137 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3138 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3139 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3140 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3141 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3142 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3143 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3144 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3145 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3146 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3147 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3148 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3149 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3150 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3151 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3152 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3153 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3154 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3155 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3156 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3157 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3115 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3116 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3117 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3118 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3119 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3120 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3121 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3122 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3123 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3124 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3125 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3126 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3127 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3128 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3129 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3130 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3131 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3132 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3133 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3134 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3135 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3136 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3137 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3138 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3139 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3140 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3141 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3142 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3143 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3144 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3145 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3146 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3147 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3148 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3149 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3150 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3151 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3152 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3153 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3154 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3155 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3156 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3157 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3158 | 3158 | ), |
3159 | 3159 | ); |
3160 | 3160 | |
@@ -3414,7 +3414,7 @@ discard block |
||
3414 | 3414 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
3415 | 3415 | $new_string = preg_replace_callback( |
3416 | 3416 | '~\bs:(\d+):"(.*?)";(?=$|[bidsaO]:|[{}}]|N;)~s', |
3417 | - function ($matches) |
|
3417 | + function($matches) |
|
3418 | 3418 | { |
3419 | 3419 | return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; |
3420 | 3420 | }, |
@@ -41,7 +41,8 @@ discard block |
||
41 | 41 | 'mysql' => array( |
42 | 42 | 'name' => 'MySQL', |
43 | 43 | 'version' => '5.6.0', |
44 | - 'version_check' => function() { |
|
44 | + 'version_check' => function() |
|
45 | + { |
|
45 | 46 | global $db_connection; |
46 | 47 | if (!function_exists('mysqli_fetch_row')) |
47 | 48 | return false; |
@@ -52,7 +53,8 @@ discard block |
||
52 | 53 | 'postgresql' => array( |
53 | 54 | 'name' => 'PostgreSQL', |
54 | 55 | 'version' => '9.6', |
55 | - 'version_check' => function() { |
|
56 | + 'version_check' => function() |
|
57 | + { |
|
56 | 58 | if (!function_exists('pg_version')) |
57 | 59 | return false; |
58 | 60 | $version = pg_version(); |
@@ -222,7 +222,7 @@ |
||
222 | 222 | if (!function_exists('mb_encode_numericentity')) |
223 | 223 | return false; |
224 | 224 | |
225 | - $entity = mb_encode_numericentity($string, array(0x0,0x10FFFF,0x0,0xFFFFFF), $encoding); |
|
225 | + $entity = mb_encode_numericentity($string, array(0x0, 0x10FFFF, 0x0, 0xFFFFFF), $encoding); |
|
226 | 226 | |
227 | 227 | if (strpos($entity, '&#') !== 0) |
228 | 228 | return false; |
@@ -2060,7 +2060,7 @@ |
||
2060 | 2060 | new RecursiveIteratorIterator( |
2061 | 2061 | new RecursiveCallbackFilterIterator( |
2062 | 2062 | new RecursiveDirectoryIterator($dirname, FilesystemIterator::UNIX_PATHS), |
2063 | - function ($fileInfo, $currentFile, $iterator) |
|
2063 | + function($fileInfo, $currentFile, $iterator) |
|
2064 | 2064 | { |
2065 | 2065 | // Allow recursion |
2066 | 2066 | if ($iterator->hasChildren()) |
@@ -2214,7 +2214,6 @@ |
||
2214 | 2214 | $hookData['pureFunc'] = $hookData['method']; |
2215 | 2215 | $hookData['call'] = $modFunc; |
2216 | 2216 | } |
2217 | - |
|
2218 | 2217 | else |
2219 | 2218 | $hookData['call'] = $hookData['pureFunc'] = $modFunc; |
2220 | 2219 |
@@ -256,7 +256,7 @@ |
||
256 | 256 | return array(); |
257 | 257 | |
258 | 258 | // preparse code does a few things which might mess with our parsing |
259 | - $body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
259 | + $body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
260 | 260 | |
261 | 261 | if (empty(self::$excluded_bbc_regex)) |
262 | 262 | self::setExcludedBbcRegex(); |
@@ -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'; |
@@ -2344,12 +2341,12 @@ discard block |
||
2344 | 2341 | 'tag' => 'cowsay', |
2345 | 2342 | 'parameters' => array( |
2346 | 2343 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2347 | - { |
|
2344 | + { |
|
2348 | 2345 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2349 | 2346 | }, |
2350 | 2347 | ), |
2351 | 2348 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2352 | - { |
|
2349 | + { |
|
2353 | 2350 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2354 | 2351 | }, |
2355 | 2352 | ), |
@@ -2711,7 +2708,8 @@ discard block |
||
2711 | 2708 | |
2712 | 2709 | foreach (array('path', 'query', 'fragment') as $part) |
2713 | 2710 | { |
2714 | - switch ($part) { |
|
2711 | + switch ($part) |
|
2712 | + { |
|
2715 | 2713 | case 'path': |
2716 | 2714 | $part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&'; |
2717 | 2715 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -3048,7 +3046,9 @@ discard block |
||
3048 | 3046 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
3049 | 3047 | |
3050 | 3048 | // A closing tag that doesn't match any open tags? Skip it. |
3051 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
3049 | + if (!in_array($look_for, array_map(function($code) |
|
3050 | + { |
|
3051 | +return $code['tag']; }, $open_tags))) |
|
3052 | 3052 | continue; |
3053 | 3053 | |
3054 | 3054 | $to_close = array(); |
@@ -4588,7 +4588,6 @@ discard block |
||
4588 | 4588 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4589 | 4589 | $minSeed = $js_file['options']['seed']; |
4590 | 4590 | } |
4591 | - |
|
4592 | 4591 | else |
4593 | 4592 | { |
4594 | 4593 | echo ' |
@@ -6513,7 +6512,8 @@ discard block |
||
6513 | 6512 | $zones[$tzkey]['tzid'] = $tzid; |
6514 | 6513 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6515 | 6514 | |
6516 | - foreach ($tzinfo as $transition) { |
|
6515 | + foreach ($tzinfo as $transition) |
|
6516 | + { |
|
6517 | 6517 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6518 | 6518 | } |
6519 | 6519 | |
@@ -7035,7 +7035,6 @@ discard block |
||
7035 | 7035 | $isWritable = true; |
7036 | 7036 | break; |
7037 | 7037 | } |
7038 | - |
|
7039 | 7038 | else |
7040 | 7039 | @chmod($file, $val); |
7041 | 7040 | } |
@@ -8125,7 +8124,8 @@ discard block |
||
8125 | 8124 | $replaceWith = array(); |
8126 | 8125 | |
8127 | 8126 | if (!empty($matches[1])) |
8128 | - foreach ($matches[1] as $token) { |
|
8127 | + foreach ($matches[1] as $token) |
|
8128 | + { |
|
8129 | 8129 | $toFind[] = '{' . $token . '}'; |
8130 | 8130 | $replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token; |
8131 | 8131 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | $val = 'CASE '; |
381 | 381 | foreach ($members as $k => $v) |
382 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
382 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
383 | 383 | |
384 | 384 | $val = $val . ' END'; |
385 | 385 | $type = 'raw'; |
@@ -851,12 +851,12 @@ discard block |
||
851 | 851 | // Anything that isn't a specification, punctuation mark, or whitespace. |
852 | 852 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
853 | 853 | // Repeated punctuation marks (except %), possibly separated by whitespace. |
854 | - '~(?'.'>([^%\P{P}])\s*(?=\1))*~u', |
|
855 | - '~([^%\P{P}])(?'.'>\1(?!$))*~u', |
|
854 | + '~(?' . '>([^%\P{P}])\s*(?=\1))*~u', |
|
855 | + '~([^%\P{P}])(?' . '>\1(?!$))*~u', |
|
856 | 856 | // Unwanted trailing punctuation and whitespace. |
857 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
857 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
858 | 858 | // Unwanted opening punctuation and whitespace. |
859 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
859 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
860 | 860 | // Runs of horizontal whitespace. |
861 | 861 | '~\s+~', |
862 | 862 | ), |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | { |
1164 | 1164 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1165 | 1165 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1166 | - function ($matches) |
|
1166 | + function($matches) |
|
1167 | 1167 | { |
1168 | 1168 | switch ($matches[2]) |
1169 | 1169 | { |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1298 | 1298 | { |
1299 | 1299 | // Get whatever the default replacement character is for this encoding. |
1300 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1300 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1301 | 1301 | } |
1302 | 1302 | else |
1303 | 1303 | $substitute = '?'; |
@@ -1747,7 +1747,7 @@ discard block |
||
1747 | 1747 | |
1748 | 1748 | // parseAttachBBC will return a string ($txt key) rather than dying with a fatal_error. Up to you to decide what to do. |
1749 | 1749 | if (is_string($currentAttachment)) |
1750 | - return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1750 | + return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1751 | 1751 | |
1752 | 1752 | // We need a display mode. |
1753 | 1753 | if (empty($params['{display}'])) |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1774 | 1774 | else |
1775 | 1775 | { |
1776 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1776 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1777 | 1777 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1778 | 1778 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1779 | 1779 | } |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1785 | 1785 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1786 | 1786 | |
1787 | - $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>' : ''); |
|
1787 | + $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>' : ''); |
|
1788 | 1788 | } |
1789 | 1789 | // Audio. |
1790 | 1790 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1793 | 1793 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1794 | 1794 | |
1795 | - $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>'; |
|
1795 | + $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>'; |
|
1796 | 1796 | } |
1797 | 1797 | // Anything else. |
1798 | 1798 | else |
@@ -1961,7 +1961,7 @@ discard block |
||
1961 | 1961 | 'type' => 'unparsed_commas_content', |
1962 | 1962 | 'test' => '\d+,\d+\]', |
1963 | 1963 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1964 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1964 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1965 | 1965 | { |
1966 | 1966 | $data[0] = normalize_iri(strtr(trim($data[0]), array('<br>' => '', ' ' => '%20'))); |
1967 | 1967 | |
@@ -2087,8 +2087,8 @@ discard block |
||
2087 | 2087 | else |
2088 | 2088 | $url = get_proxied_url($url); |
2089 | 2089 | |
2090 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2091 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2090 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2091 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2092 | 2092 | |
2093 | 2093 | $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">'; |
2094 | 2094 | }, |
@@ -2526,12 +2526,12 @@ discard block |
||
2526 | 2526 | $codes[] = array( |
2527 | 2527 | 'tag' => 'cowsay', |
2528 | 2528 | 'parameters' => array( |
2529 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2529 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2530 | 2530 | { |
2531 | 2531 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2532 | 2532 | }, |
2533 | 2533 | ), |
2534 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2534 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2535 | 2535 | { |
2536 | 2536 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2537 | 2537 | }, |
@@ -4236,7 +4236,7 @@ discard block |
||
4236 | 4236 | if ($fp != false) |
4237 | 4237 | { |
4238 | 4238 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4239 | - 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"); |
|
4239 | + 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"); |
|
4240 | 4240 | |
4241 | 4241 | // Read in the HTTP/1.1 or whatever. |
4242 | 4242 | $test = substr(fgets($fp, 11), -1); |
@@ -4832,7 +4832,7 @@ discard block |
||
4832 | 4832 | |
4833 | 4833 | uasort( |
4834 | 4834 | $context['css_files'], |
4835 | - function ($a, $b) |
|
4835 | + function($a, $b) |
|
4836 | 4836 | { |
4837 | 4837 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4838 | 4838 | } |
@@ -6152,7 +6152,7 @@ discard block |
||
6152 | 6152 | { |
6153 | 6153 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6154 | 6154 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6155 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6155 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6156 | 6156 | if ($keep_alive) |
6157 | 6157 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6158 | 6158 | else |
@@ -6162,7 +6162,7 @@ discard block |
||
6162 | 6162 | { |
6163 | 6163 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6164 | 6164 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6165 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6165 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6166 | 6166 | if ($keep_alive) |
6167 | 6167 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6168 | 6168 | else |
@@ -6411,13 +6411,13 @@ discard block |
||
6411 | 6411 | |
6412 | 6412 | // UTF-8 occurences of MS special characters |
6413 | 6413 | $findchars_utf8 = array( |
6414 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6415 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6416 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6417 | - "\xe2\x80\x98", // left single curly quote |
|
6418 | - "\xe2\x80\x99", // right single curly quote |
|
6419 | - "\xe2\x80\x9c", // left double curly quote |
|
6420 | - "\xe2\x80\x9d", // right double curly quote |
|
6414 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6415 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6416 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6417 | + "\xe2\x80\x98", // left single curly quote |
|
6418 | + "\xe2\x80\x99", // right single curly quote |
|
6419 | + "\xe2\x80\x9c", // left double curly quote |
|
6420 | + "\xe2\x80\x9d", // right double curly quote |
|
6421 | 6421 | ); |
6422 | 6422 | |
6423 | 6423 | // windows 1252 / iso equivalents |
@@ -6433,13 +6433,13 @@ discard block |
||
6433 | 6433 | |
6434 | 6434 | // safe replacements |
6435 | 6435 | $replacechars = array( |
6436 | - ',', // ‚ |
|
6437 | - ',,', // „ |
|
6438 | - '...', // … |
|
6439 | - "'", // ‘ |
|
6440 | - "'", // ’ |
|
6441 | - '"', // “ |
|
6442 | - '"', // ” |
|
6436 | + ',', // ‚ |
|
6437 | + ',,', // „ |
|
6438 | + '...', // … |
|
6439 | + "'", // ‘ |
|
6440 | + "'", // ’ |
|
6441 | + '"', // “ |
|
6442 | + '"', // ” |
|
6443 | 6443 | ); |
6444 | 6444 | |
6445 | 6445 | if ($context['utf8']) |
@@ -6802,7 +6802,7 @@ discard block |
||
6802 | 6802 | // We don't want abbreviations like '+03' or '-11'. |
6803 | 6803 | $abbrs = array_filter( |
6804 | 6804 | $tzvalue['abbrs'], |
6805 | - function ($abbr) |
|
6805 | + function($abbr) |
|
6806 | 6806 | { |
6807 | 6807 | return !strspn($abbr, '+-'); |
6808 | 6808 | } |
@@ -7791,7 +7791,7 @@ discard block |
||
7791 | 7791 | EXISTS ( |
7792 | 7792 | SELECT bpv.id_board |
7793 | 7793 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7794 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7794 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7795 | 7795 | AND bpv.deny = 0 |
7796 | 7796 | AND bpv.id_board = b.id_board |
7797 | 7797 | )'; |
@@ -7801,7 +7801,7 @@ discard block |
||
7801 | 7801 | AND NOT EXISTS ( |
7802 | 7802 | SELECT bpv.id_board |
7803 | 7803 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7804 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7804 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7805 | 7805 | AND bpv.deny = 1 |
7806 | 7806 | AND bpv.id_board = b.id_board |
7807 | 7807 | )'; |
@@ -8214,8 +8214,8 @@ discard block |
||
8214 | 8214 | $i = 0; |
8215 | 8215 | while (empty($done)) |
8216 | 8216 | { |
8217 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8218 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8217 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8218 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8219 | 8219 | else |
8220 | 8220 | $done = true; |
8221 | 8221 | } |
@@ -8225,8 +8225,8 @@ discard block |
||
8225 | 8225 | $i = 0; |
8226 | 8226 | while (empty($done)) |
8227 | 8227 | { |
8228 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8229 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8228 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8229 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8230 | 8230 | else |
8231 | 8231 | $done = true; |
8232 | 8232 | } |
@@ -8407,7 +8407,7 @@ discard block |
||
8407 | 8407 | if (empty($stringSubject)) |
8408 | 8408 | return ''; |
8409 | 8409 | |
8410 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8410 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8411 | 8411 | $toFind = array(); |
8412 | 8412 | $replaceWith = array(); |
8413 | 8413 |
@@ -1107,7 +1107,7 @@ |
||
1107 | 1107 | 'left_join' => array(), |
1108 | 1108 | 'where' => array( |
1109 | 1109 | 't.id_redirect_topic = {int:not_redirected}', |
1110 | - 't.redirect_expires = {int:never_expires}', |
|
1110 | + 't.redirect_expires = {int:never_expires}', |
|
1111 | 1111 | ), |
1112 | 1112 | ); |
1113 | 1113 |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $combining_classes = utf8_combining_classes(); |
266 | 266 | |
267 | 267 | // Replace characters with decomposed forms. |
268 | - for ($i=0; $i < count($chars); $i++) |
|
268 | + for ($i = 0; $i < count($chars); $i++) |
|
269 | 269 | { |
270 | 270 | // Hangul characters. |
271 | 271 | if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3") |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | { |
300 | 300 | $temp = $chars[$i]; |
301 | 301 | $chars[$i] = $chars[$i - 1]; |
302 | - $chars[$i -1] = $temp; |
|
302 | + $chars[$i - 1] = $temp; |
|
303 | 303 | |
304 | 304 | // Backtrack and check again. |
305 | 305 | if ($i > 1) |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | // Use placeholders to preserve known emoji from further processing. |
545 | 545 | // Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex |
546 | - $string = preg_replace_callback( |
|
546 | + $string = preg_replace_callback( |
|
547 | 547 | '/' . |
548 | 548 | // Flag emojis |
549 | 549 | '[' . $prop_classes['Regional_Indicator'] . ']{2}' . |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | ')?' . |
573 | 573 | ')*' . |
574 | 574 | '/u', |
575 | - function ($matches) use (&$placeholders) |
|
575 | + function($matches) use (&$placeholders) |
|
576 | 576 | { |
577 | 577 | // Skip lone ASCII characters that are not actully part of an emoji sequence. |
578 | 578 | // This can happen because the digits 0-9 and the '*' and '#' characters are |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Use placeholders for sanctioned variation selectors. |
604 | 604 | $string = preg_replace_callback( |
605 | 605 | $patterns, |
606 | - function ($matches) use (&$placeholders) |
|
606 | + function($matches) use (&$placeholders) |
|
607 | 607 | { |
608 | 608 | $placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C"; |
609 | 609 | return $placeholders[$matches[0]]; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | // Do the thing. |
684 | 684 | $string = preg_replace_callback( |
685 | 685 | '/' . $pattern . '/u', |
686 | - function ($matches) use ($placeholders) |
|
686 | + function($matches) use ($placeholders) |
|
687 | 687 | { |
688 | 688 | return strtr($matches[0], $placeholders); |
689 | 689 | }, |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | } |
753 | 753 | } |
754 | 754 | // This sort works decently well to ensure widely used scripts are ranked before rare scripts. |
755 | -uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b) |
|
755 | +uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b) |
|
756 | 756 | { |
757 | 757 | if ($a['stats']['age'] == $b['stats']['age']) |
758 | 758 | { |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | } |
829 | 829 | } |
830 | 830 | // Again, sort commonly used scripts before rare scripts. |
831 | -uasort($funcs['utf8_regex_indic']['data'], function ($a, $b) |
|
831 | +uasort($funcs['utf8_regex_indic']['data'], function($a, $b) |
|
832 | 832 | { |
833 | 833 | if ($a['stats']['age'] == $b['stats']['age']) |
834 | 834 | { |
@@ -156,7 +156,6 @@ discard block |
||
156 | 156 | $diff = $cur_profile['date_registered'] - strtotime(smf_strftime('%Y-%m-%d', $cur_profile['date_registered'])); |
157 | 157 | $value = $value + $diff; |
158 | 158 | } |
159 | - |
|
160 | 159 | else |
161 | 160 | $value = $cur_profile['date_registered']; |
162 | 161 | |
@@ -507,7 +506,7 @@ discard block |
||
507 | 506 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
508 | 507 | |
509 | 508 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
510 | - { |
|
509 | + { |
|
511 | 510 | return $v != $set; |
512 | 511 | }); |
513 | 512 | } |
@@ -3518,7 +3517,6 @@ discard block |
||
3518 | 3517 | } |
3519 | 3518 | } |
3520 | 3519 | } |
3521 | - |
|
3522 | 3520 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
3523 | 3521 | { |
3524 | 3522 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |