phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] notes/inc class.bonotes.inc.php class.sonotes.i...


From: Bettina Gille
Subject: [Phpgroupware-cvs] notes/inc class.bonotes.inc.php class.sonotes.i...
Date: Mon, 13 Nov 2006 12:42:57 +0000

CVSROOT:        /sources/phpgroupware
Module name:    notes
Changes by:     Bettina Gille <ceb>     06/11/13 12:42:57

Modified files:
        inc            : class.bonotes.inc.php class.sonotes.inc.php 
                         class.uinotes.inc.php 

Log message:
        fix xslt paging

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.bonotes.inc.php?cvsroot=phpgroupware&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.sonotes.inc.php?cvsroot=phpgroupware&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/notes/inc/class.uinotes.inc.php?cvsroot=phpgroupware&r1=1.37&r2=1.38

Patches:
Index: class.bonotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.bonotes.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- class.bonotes.inc.php       28 Apr 2005 18:33:52 -0000      1.25
+++ class.bonotes.inc.php       13 Nov 2006 12:42:57 -0000      1.26
@@ -6,7 +6,7 @@
        * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation, 
Inc. http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package notes
-       * @version $Id: class.bonotes.inc.php,v 1.25 2005/04/28 18:33:52 
powerstat Exp $
+       * @version $Id: class.bonotes.inc.php,v 1.26 2006/11/13 12:42:57 ceb 
Exp $
        */
 
 
@@ -23,6 +23,7 @@
                var $sort;
                var $order;
                var $cat_id;
+               var $limit;
                var $map;
 
                var $public_functions = array
@@ -61,6 +62,7 @@
                        $this->sort             = 'DESC';
                        $this->order    = '';
                        $this->cat_id   = 0;
+                       $this->limit    = True;
 
                        $this->map = array();
 
@@ -78,6 +80,12 @@
 
                                $this->start = (isset($start)?$start:0);
 
+                               if($this->start == 'all')
+                               {
+                                       $this->limit = False;
+                                       $this->start = 0;
+                               }
+
                                if(isset($query))
                                {
                                        $this->query = $query;
@@ -202,7 +210,7 @@
                function read()
                {
                        $notes = $this->sonotes->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id));
+                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'limit' => 
$this->limit));
                        $this->total_records = $this->sonotes->total_records;
 
                        for ($i=0; $i<count($notes); $i++)

Index: class.sonotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.sonotes.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- class.sonotes.inc.php       28 Apr 2005 18:33:52 -0000      1.13
+++ class.sonotes.inc.php       13 Nov 2006 12:42:57 -0000      1.14
@@ -6,7 +6,7 @@
        * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation, 
Inc. http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package notes
-       * @version $Id: class.sonotes.inc.php,v 1.13 2005/04/28 18:33:52 
powerstat Exp $
+       * @version $Id: class.sonotes.inc.php,v 1.14 2006/11/13 12:42:57 ceb 
Exp $
        */
 
 
@@ -40,6 +40,7 @@
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
                                $order = 
(isset($data['order'])?$data['order']:'');
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:0);
+                               $limit = 
(isset($data['limit'])?$data['limit']:True);
                        }
 
                        $start  = intval($start);
@@ -96,9 +97,13 @@
 
                        $sql = "SELECT * FROM phpgw_notes WHERE $filtermethod 
$querymethod";
 
-                       $this->db2->query($sql,__LINE__,__FILE__);
-                       $this->total_records = $this->db2->num_rows();
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       $this->total_records = $this->db->num_rows();
+
+                       if($limit)
+                       {
                        $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
+                       }
 
                        while ($this->db->next_record())
                        {

Index: class.uinotes.inc.php
===================================================================
RCS file: /sources/phpgroupware/notes/inc/class.uinotes.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- class.uinotes.inc.php       16 May 2006 06:57:51 -0000      1.37
+++ class.uinotes.inc.php       13 Nov 2006 12:42:57 -0000      1.38
@@ -6,7 +6,7 @@
        * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation, 
Inc. http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package notes
-       * @version $Id: class.uinotes.inc.php,v 1.37 2006/05/16 06:57:51 ceb 
Exp $
+       * @version $Id: class.uinotes.inc.php,v 1.38 2006/11/13 12:42:57 ceb 
Exp $
        */
 
        /**
@@ -140,6 +140,7 @@
 
                        $nm = array
                        (
+                               'start'                 => $this->start,
                                'start_record'  => $this->start,
                                'num_records'   => count($notes_list),
                                'all_records'   => 
$this->bonotes->total_records,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]