mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
fix query "limit" tag in other cases than page select
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8409 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
64d268ab6b
commit
68f068cf88
3 changed files with 22 additions and 15 deletions
|
|
@ -7,18 +7,22 @@
|
|||
var $list_count;
|
||||
|
||||
function LimitTag($index){
|
||||
$this->page = $index->page->attrs;
|
||||
$this->page_count = $index->page_count->attrs;
|
||||
$this->list_count = $index->list_count->attrs;
|
||||
|
||||
require_once(_XE_PATH_.'classes/xml/xmlquery/queryargument/QueryArgument.class.php');
|
||||
$this->arguments[] = new QueryArgument($index->page);
|
||||
|
||||
if($index->page->attrs && $index->page_count->attrs){
|
||||
$this->page = $index->page->attrs;
|
||||
$this->page_count = $index->page_count->attrs;
|
||||
$this->arguments[] = new QueryArgument($index->page);
|
||||
$this->arguments[] = new QueryArgument($index->page_count);
|
||||
}
|
||||
|
||||
$this->list_count = $index->list_count->attrs;
|
||||
$this->arguments[] = new QueryArgument($index->list_count);
|
||||
$this->arguments[] = new QueryArgument($index->page_count);
|
||||
}
|
||||
|
||||
function toString(){
|
||||
return sprintf("new Limit(\$%s_argument->getValue(), \$%s_argument->getValue(), \$%s_argument->getValue())", $this->page->var, $this->list_count->var, $this->page_count->var);
|
||||
if ($this->page)return sprintf("new Limit(\$%s_argument->getValue(), \$%s_argument->getValue(), \$%s_argument->getValue())",$this->list_count->var, $this->page->var, $this->page_count->var);
|
||||
else return sprintf("new Limit(\$%s_argument->getValue())", $this->list_count->var);
|
||||
}
|
||||
|
||||
function getArguments(){
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if($xml_navigation->page->attrs && $xml_navigation->list_count->attrs)
|
||||
if($xml_navigation->page->attrs || $xml_navigation->list_count->attrs)
|
||||
$this->limit = new LimitTag($xml_navigation);
|
||||
|
||||
$list_count = $xml_navigation->list_count->attrs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue