/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/CSVFILEDataListSource.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/CSVFILEDataListSource.inc

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

revision 1.2 by jonen, Sat Feb 22 21:08:34 2003 UTC revision 1.3 by jonen, Thu May 6 12:59:55 2004 UTC
# Line 96  class CSVFILEDataListSource extends Data Line 96  class CSVFILEDataListSource extends Data
96           * and search/sort           * and search/sort
97           */           */
98          function do_query() {          function do_query() {
99            $count = 0;
100                  while ($line = fgets($this->_fp, $this->_maxlinelength)) {                  while ($line = fgets($this->_fp, $this->_maxlinelength)) {
101                          if ($this->add_data_row( $this->_construct_row(trim($line)))) {                          if ($this->add_data_row( $this->_construct_row(trim($line)))) {
102                                  $count++;                                  $count++;
# Line 104  class CSVFILEDataListSource extends Data Line 105  class CSVFILEDataListSource extends Data
105    
106                  //close the file                  //close the file
107                  fclose($this->_fp);                  fclose($this->_fp);
108                  $this->set_total_rows( $count );          if ($count > 0) {
109                  $this->sort();              $this->set_total_rows( $count );
110                $this->sort();
111                return true;
112            } else {
113                return false;
114            }
115          }          }
116    
117          /**          /**

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

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