mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 18:02:15 +09:00
#18630159 : reorder in prechecker of XmlQueryParser
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7206 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4daa873344
commit
4c1fa0a568
1 changed files with 14 additions and 14 deletions
|
|
@ -202,20 +202,6 @@
|
|||
$buff .= sprintf('$output->groups = array("%s");%s', implode('","',$output->groups),"\n");
|
||||
}
|
||||
|
||||
// default check
|
||||
if(count($this->default_list)) {
|
||||
foreach($this->default_list as $key => $val) {
|
||||
$pre_buff .= 'if(!isset($args->'.$key.')) $args->'.$key.' = '.$val.';'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// not null check
|
||||
if(count($this->notnull_list)) {
|
||||
foreach($this->notnull_list as $key => $val) {
|
||||
$pre_buff .= 'if(!isset($args->'.$val.')) return new Object(-1, sprintf($lang->filter->isnull, $lang->'.$val.'?$lang->'.$val.':\''.$val.'\'));'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// minlength check
|
||||
if(count($minlength_list)) {
|
||||
foreach($minlength_list as $key => $val) {
|
||||
|
|
@ -237,6 +223,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
// default check
|
||||
if(count($this->default_list)) {
|
||||
foreach($this->default_list as $key => $val) {
|
||||
$pre_buff .= 'if(!isset($args->'.$key.')) $args->'.$key.' = '.$val.';'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// not null check
|
||||
if(count($this->notnull_list)) {
|
||||
foreach($this->notnull_list as $key => $val) {
|
||||
$pre_buff .= 'if(!isset($args->'.$val.')) return new Object(-1, sprintf($lang->filter->isnull, $lang->'.$val.'?$lang->'.$val.':\''.$val.'\'));'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$buff = "<?php if(!defined('__ZBXE__')) exit();\n"
|
||||
. sprintf('$output->query_id = "%s";%s', $query_id, "\n")
|
||||
. sprintf('$output->action = "%s";%s', $action, "\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue