mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进验证类的activeUrl方法 改进Query类分页方法的参数绑定
This commit is contained in:
@@ -612,6 +612,9 @@ class Validate
|
|||||||
*/
|
*/
|
||||||
protected function activeUrl($value, $rule)
|
protected function activeUrl($value, $rule)
|
||||||
{
|
{
|
||||||
|
if (!in_array($rule, ['A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'])) {
|
||||||
|
$rule = 'MX';
|
||||||
|
}
|
||||||
return checkdnsrr($value, $rule);
|
return checkdnsrr($value, $rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -989,8 +989,8 @@ class Query
|
|||||||
|
|
||||||
if (!isset($total) && !$simple) {
|
if (!isset($total) && !$simple) {
|
||||||
$options = $this->getOptions();
|
$options = $this->getOptions();
|
||||||
$total = $this->count();
|
|
||||||
$bind = $this->bind;
|
$bind = $this->bind;
|
||||||
|
$total = $this->count();
|
||||||
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
||||||
} elseif ($simple) {
|
} elseif ($simple) {
|
||||||
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
||||||
|
|||||||
Reference in New Issue
Block a user