--- nfo/php/libs/org.netfrag.glib/DataSource/Generic.php 2004/06/15 12:50:48 1.27 +++ nfo/php/libs/org.netfrag.glib/DataSource/Generic.php 2004/10/07 14:11:28 1.28 @@ -11,9 +11,12 @@ /** * Cvs-Log: * - * $Id: Generic.php,v 1.27 2004/06/15 12:50:48 joko Exp $ + * $Id: Generic.php,v 1.28 2004/10/07 14:11:28 jonen Exp $ * * $Log: Generic.php,v $ + * Revision 1.28 2004/10/07 14:11:28 jonen + * + added HACK related to DataList-filters which are mapped to backend now (page-control!) + * * Revision 1.27 2004/06/15 12:50:48 joko * disabled caching in "datasource_handler_call" * @@ -441,6 +444,7 @@ */ //$this->set_locator( $locator ); + //print "query: " . Dumper($query) . "
"; $this->set_query( $query ); @@ -915,10 +919,33 @@ // TODO: ... = $this->poll_handler_result and $this->get_handler_result $proxy = $this->get_proxy(); - $this->_result = $proxy->getResult(); + //HACK 2004-10-07: page-filter done by backend now, + // before offset values filled with empty arrays + //$this->_result = $proxy->getResult(); + $result = $proxy->getResult(); + if($result['total_rows']) { + // debug + //print "result: " . Dumper($result); + $this->_result_count = $result['total_rows']; + if($result[offset]) { + $result_new = array(); + for($i=0;$i<$result[offset];$i++) { + array_push($result_new, array()); + } + foreach($result['payload'] as $key => $value) { + array_push($result_new, $value); + } + $this->_result = $result_new; + } else { + $this->_result = $result['payload']; + } + } else { + $this->_result = $result; + $this->_result_count = sizeof($this->_result); + } + //print "result: " . Dumper($this->_result); //print "result: " . Dumper($this->_result); exit; - $this->_result_count = sizeof($this->_result); // trace //if (constants::get('VERBOSE') && $this->_debug[notice]) {