/[cvs]/nfo/php/libs/org.netfrag.patches/phphtmllib/drivers/MemoryDataSource.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.patches/phphtmllib/drivers/MemoryDataSource.php

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

revision 1.1 by jonen, Thu Mar 27 01:10:57 2003 UTC revision 1.2 by joko, Fri Mar 28 02:59:07 2003 UTC
# Line 21  Line 21 
21   * $Id$   * $Id$
22   *   *
23   * $Log$   * $Log$
24     * Revision 1.2  2003/03/28 02:59:07  joko
25     * minor fix: prevent php-error if result is empty
26     *
27   * Revision 1.1  2003/03/27 01:10:57  jonen   * Revision 1.1  2003/03/27 01:10:57  jonen
28   * + moved from com.newsblob.phphtmllib tree(was MemoryDataListSource.inc)   * + moved from com.newsblob.phphtmllib tree(was MemoryDataListSource.inc)
29   *   *
# Line 202  class MemoryDataSource extends DataListS Line 205  class MemoryDataSource extends DataListS
205         $this->propagate_result();         $this->propagate_result();
206      }      }
207    
208          function propagate_result() {      function propagate_result() {
209            $this->debug('propagate_result', "PROPAGATE RESULT!");        $this->debug('propagate_result', "PROPAGATE RESULT!");
210                  foreach ($this->_result as $value) {        
211          $count = 0;
212          if (is_array($this->_result)) {
213            foreach ($this->_result as $value) {
214            $this->trace_payload("propagate_result", $value);            $this->trace_payload("propagate_result", $value);
215                          if ($this->add_data_row( $value)) {            if ($this->add_data_row($value)) {
216                                  $count++;              $count++;
217                          }            }
218                  }          }
219                  $this->set_total_rows( $count );        }
220                  $this->sort();        
221          $this->set_total_rows( $count );
222          $this->sort();
223          
224      }      }
225    
226          /**          /**
# Line 265  class MemoryDataSource extends DataListS Line 274  class MemoryDataSource extends DataListS
274                          return;                          return;
275                          }                          }
276  */  */
277    
278        if (!is_array($this->_schema[labels] )) {
279          logp(get_class($this) . "->propagate_schema: No schema data could be read from result.", PEAR_LOG_WARNING);
280          return;
281        }
282    
283                    foreach($this->_schema[labels] as $value) {                    foreach($this->_schema[labels] as $value) {
284                        $this->debug("propagate_schema", "label: $value");                        $this->debug("propagate_schema", "label: $value");
285                                  array_push($this->_data_keys, $value);                                  array_push($this->_data_keys, $value);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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