Browse Source

add filter rules

main
ghost 3 years ago
parent
commit
eb83ec9297
  1. 58
      src/system/helper/filter.php

58
src/system/helper/filter.php

@ -105,33 +105,45 @@ class Filter {
foreach ((array) $userPost as $key => $value) { foreach ((array) $userPost as $key => $value) {
switch ($key) { switch ($key) {
case 'height': case 'sig_userpost':
$result[$key] = self::int($value);
break;
case 'time':
$result[$key] = self::int($value);
break;
case 'k':
$result[$key] = self::int($value);
break;
case 'lastk':
$result[$key] = self::int($value);
break;
case 'n':
$result[$key] = self::userName($value);
break;
case 'msg':
$result[$key] = self::post($value);
break;
case 'msg2':
$result[$key] = self::post($value);
break;
case 'sig_rt':
$result[$key] = self::sigUserPost($value); $result[$key] = self::sigUserPost($value);
break; break;
case 'rt': case 'userpost':
$result[$key] = self::userPost($value); $result[$key] = self::userPost($value);
break; break;
default:
switch ($key) {
case 'height':
$result[$key] = self::int($value);
break;
case 'time':
$result[$key] = self::int($value);
break;
case 'k':
$result[$key] = self::int($value);
break;
case 'lastk':
$result[$key] = self::int($value);
break;
case 'n':
$result[$key] = self::userName($value);
break;
case 'msg':
$result[$key] = self::post($value);
break;
case 'msg2':
$result[$key] = self::post($value);
break;
case 'sig_rt':
$result[$key] = self::sigUserPost($value);
break;
case 'rt':
$result[$key] = self::userPost($value);
break;
case 'reply':
$result[$key] = self::userPost($value);
break;
}
} }
} }

Loading…
Cancel
Save