/[cvs]/nfo/php/libs/org.netfrag.glib/DataSource/Generic.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DataSource/Generic.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by joko, Tue Jun 15 12:50:48 2004 UTC revision 1.28 by jonen, Thu Oct 7 14:11:28 2004 UTC
# Line 14  Line 14 
14   * $Id$   * $Id$
15   *   *
16   * $Log$   * $Log$
17     * Revision 1.28  2004/10/07 14:11:28  jonen
18     * + added HACK related to DataList-filters which are mapped to backend now (page-control!)
19     *
20   * Revision 1.27  2004/06/15 12:50:48  joko   * Revision 1.27  2004/06/15 12:50:48  joko
21   * disabled caching in "datasource_handler_call"   * disabled caching in "datasource_handler_call"
22   *   *
# Line 441  class DataSource_Generic extends DesignP Line 444  class DataSource_Generic extends DesignP
444                  */                  */
445                                    
446        //$this->set_locator( $locator );        //$this->set_locator( $locator );
447          //print "query: " . Dumper($query) . "<br>";
448        $this->set_query( $query );        $this->set_query( $query );
449    
450    
# Line 915  class DataSource_Generic extends DesignP Line 919  class DataSource_Generic extends DesignP
919                    
920          // TODO: ... = $this->poll_handler_result  and  $this->get_handler_result          // TODO: ... = $this->poll_handler_result  and  $this->get_handler_result
921          $proxy = $this->get_proxy();          $proxy = $this->get_proxy();
922          $this->_result = $proxy->getResult();            //HACK 2004-10-07: page-filter done by backend now,
923              //                 before offset values filled with empty arrays
924            //$this->_result = $proxy->getResult();
925            $result = $proxy->getResult();
926            if($result['total_rows']) {
927              // debug
928              //print "result: " . Dumper($result);
929              $this->_result_count = $result['total_rows'];
930              if($result[offset]) {
931                $result_new = array();
932                for($i=0;$i<$result[offset];$i++) {
933                  array_push($result_new, array());
934                }
935                foreach($result['payload'] as $key => $value) {
936                  array_push($result_new, $value);
937                }
938                $this->_result = $result_new;
939              } else {
940                $this->_result = $result['payload'];
941              }
942            } else {
943              $this->_result = $result;
944              $this->_result_count = sizeof($this->_result);
945            }
946            //print "result: " . Dumper($this->_result);
947          //print "result: " . Dumper($this->_result); exit;          //print "result: " . Dumper($this->_result); exit;
948    
         $this->_result_count = sizeof($this->_result);  
949    
950        // trace        // trace
951          //if (constants::get('VERBOSE') && $this->_debug[notice]) {          //if (constants::get('VERBOSE') && $this->_debug[notice]) {

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed