r7788 보완.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7795 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ysnglee2000 2010-11-04 15:30:23 +00:00
parent 7e873a110e
commit ac03cf64d5

View file

@ -802,9 +802,12 @@
//if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) { //if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) {
foreach($output->order as $key => $val) { foreach($output->order as $key => $val) {
$col = $val[0]; $col = $val[0];
if(!in_array($col, array('list_order','update_order'))) continue; if (!in_array ($col,
if($condition) $condition .= sprintf(' and %s < 2100000000 ', $col); array ('list_order', 'update_order'))) continue;
else $condition = sprintf(' where %s < 2100000000 ', $col); if ($condition)
$condition .= sprintf(' and "%s" < 2100000000 ', $col);
else
$condition = sprintf(' where "%s" < 2100000000 ', $col);
} }
//} //}
} }
@ -1001,7 +1004,7 @@
$page_count = $output->page_count['value']; $page_count = $output->page_count['value'];
if(!$page_count) $page_count = 10; if(!$page_count) $page_count = 10;
$page = $output->page['value']; $page = $output->page['value'];
if(!$page) $page = 1; if (!$page) $page = 1;
// 전체 페이지를 구함 // 전체 페이지를 구함
if ($total_count) if ($total_count)
@ -1012,14 +1015,17 @@
if ($page > $total_page) $page = $total_page; if ($page > $total_page) $page = $total_page;
$start_count = ($page - 1) * $list_count; $start_count = ($page - 1) * $list_count;
if($output->order) { if ($output->order) {
$conditions = $this->getConditionList($output); $conditions = $this->getConditionList($output);
//if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) { //if(in_array('list_order', $conditions) || in_array('update_order', $conditions)) {
foreach($output->order as $key => $val) { foreach ($output->order as $val) {
$col = $val[0]; $col = $val[0];
if(!in_array($col, array('list_order','update_order'))) continue; if (!in_array ($col,
if($condition) $condition .= sprintf(' and %s < 2100000000 ', $col); array ('list_order', 'update_order'))) continue;
else $condition = sprintf(' where %s < 2100000000 ', $col); if ($condition)
$condition .= sprintf(' and "%s" < 2100000000 ', $col);
else
$condition = sprintf(' where "%s" < 2100000000 ', $col);
} }
//} //}
} }