diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index c6f038caa..0011f4056 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -57,7 +57,6 @@ class AbuseFilter { 'length(string)' => 'length', 'lcase(string)' => 'lcase', 'ccnorm(string)' => 'ccnorm', - 'convert("vairant", string)' => 'convert', 'rmdoubles(string)' => 'rmdoubles', 'specialratio(string)' => 'specialratio', 'norm(string)' => 'norm', diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php index ccf473634..7800d2014 100644 --- a/AbuseFilter.i18n.php +++ b/AbuseFilter.i18n.php @@ -246,7 +246,6 @@ Please ask a user with permission to add restricted actions to make the change f 'abusefilter-edit-builder-funcs-length' => 'String length (length)', 'abusefilter-edit-builder-funcs-lcase' => 'To lower case (lcase)', 'abusefilter-edit-builder-funcs-ccnorm' => 'Normalise confusable characters (ccnorm)', - 'abusefilter-edit-builder-funcs-convert' => 'Convert string to specified variant (convert)', 'abusefilter-edit-builder-funcs-rmdoubles' => 'Remove double-characters (rmdoubles)', 'abusefilter-edit-builder-funcs-specialratio' => 'Special characters / total characters (specialratio)', 'abusefilter-edit-builder-funcs-norm' => 'Normalise (norm)', @@ -17712,7 +17711,6 @@ $messages['zh-hans'] = array( 'abusefilter-edit-builder-funcs-length' => '字符串长度(length)', 'abusefilter-edit-builder-funcs-lcase' => '字母小写化(lcase)', 'abusefilter-edit-builder-funcs-ccnorm' => '规范化易混淆字符(ccnorm)', - 'abusefilter-edit-builder-funcs-convert' => '转换字符串到指定语言(convert)', 'abusefilter-edit-builder-funcs-rmdoubles' => '去除双字节字符(rmdoubles)', 'abusefilter-edit-builder-funcs-specialratio' => '特殊字符比(specialratio)', 'abusefilter-edit-builder-funcs-norm' => '规范化(norm)', @@ -18073,14 +18071,13 @@ $messages['zh-hant'] = array( 'abusefilter-edit-builder-misc-cond' => '條件式(if X then Y else Z)', 'abusefilter-edit-builder-group-funcs' => '函數', 'abusefilter-edit-builder-funcs-length' => '字串長度(length)', - 'abusefilter-edit-builder-funcs-lcase' => '改為小寫(lcase)', - 'abusefilter-edit-builder-funcs-ccnorm' => '修正混淆字符(ccnorm)', - 'abusefilter-edit-builder-funcs-convert' => '轉換字串到指定語言(convert)', - 'abusefilter-edit-builder-funcs-rmdoubles' => '去除雙字元(rmdoubles)', - 'abusefilter-edit-builder-funcs-specialratio' => '特殊字元數與整體字元數比(specialratio)', + 'abusefilter-edit-builder-funcs-lcase' => '改為小寫(lcase)', + 'abusefilter-edit-builder-funcs-ccnorm' => '修正混淆字符(ccnorm)', + 'abusefilter-edit-builder-funcs-rmdoubles' => '去除雙字元(rmdoubles)', + 'abusefilter-edit-builder-funcs-specialratio' => '特殊字元數與整體字元數比(specialratio)', 'abusefilter-edit-builder-funcs-norm' => '正常化(norm)', - 'abusefilter-edit-builder-funcs-count' => '字串 X 在字串 Y 裡出現的次數(count)', - 'abusefilter-edit-builder-funcs-rcount' => '正則表示式 X 出現在字串 Y 的次數(rcount)', + 'abusefilter-edit-builder-funcs-count' => '字串 X 在字串 Y 裡出現的次數(count)', + 'abusefilter-edit-builder-funcs-rcount' => '正則表示式 X 出現在字串 Y 的次數(rcount)', 'abusefilter-edit-builder-funcs-rmwhitespace' => '去除空白字元(rmwhitespace)', 'abusefilter-edit-builder-funcs-rmspecials' => '去除特殊字元(rmspecials)', 'abusefilter-edit-builder-funcs-ip_in_range' => 'IP是否在範圍內?(ip_in_range)', diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php index 7ad35426b..c0f2679d9 100644 --- a/AbuseFilter.parser.php +++ b/AbuseFilter.parser.php @@ -365,7 +365,6 @@ class AbuseFilterParser { 'bool' => 'castBool', 'norm' => 'funcNorm', 'ccnorm' => 'funcCCNorm', - 'convert' => 'funcConvert', 'specialratio' => 'funcSpecialRatio', 'rmspecials' => 'funcRMSpecials', 'rmdoubles' => 'funcRMDoubles', @@ -1257,16 +1256,6 @@ class AbuseFilterParser { return new AFPData( AFPData::DString, $wgContLang->lc( $s ) ); } - protected function funcConvert( $args ) { - global $wgContLang; - if( count( $args ) < 2 ) - throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos, - array( 'lang_convert', 2, count($args) ) ); - $v = $args[0]->toString(); - $s = $args[1]->toString(); - return new AFPData( AFPData::DString, $wgContLang->convert( $s, false, $v ) ); - } - protected function funcLen( $args ) { if( count( $args ) < 1 ) throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,