phpgroupware-tracker
[Top][All Lists]
Advanced

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

[Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in t


From: nobody
Subject: [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page
Date: Thu, 10 Oct 2002 11:05:55 -0400

=================== BUG #1308: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1308&group_id=509

Changes by: Michael Totschnig <address@hidden>
Date: 2002-Oct-10 15:05 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Hello,

I should have said that I discovered that the patch I posted is far from a real 
solution since it does not deal at all with the problem of categories and 
subcategories:
When there are 10 top level categories and 10 subcategories and the user's 
maxmatch preference is 10, then without my patch the user only sees half of the 
categories without any access to the rest. with my patch, the user sees all 10 
top level categories + the 10 subcategories, and the arrows of the nextmatch 
class give bogus indications. I am not sure how the nextmatch class can be used 
in this situation of a hierarchical tree.



=================== BUG #1308: FULL BUG SNAPSHOT ===================


Submitted by: totschnig                 Project: phpGroupWare                   
Submitted on: 2002-Oct-01 03:10
Category:  API - Preferences            Bug Group:  None                        
Severity:  5 - Major                    Priority:  None                         
Resolution:  None                       Assigned to:  skwashd                   
Status:  Open                           Component Version:  None                
Platform Version:  None                 Reproducibility:  None                  

Summary:  only maxmatch categories show up in the "Edit Categories" page

Original Submission:  When there are more categories than  
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] only 
maxmatch categories are shown without any indication of the remaining 
categories.
The problem is that the member variable total_records of the phpgwapi 
categories class gives the number of records of the limited query which is 
never more than maxmatch.
The same problem applies to the admin module.

The following patches solve the problem, but it might be cleaner to change the 
categories class in the API so that total_records always gives the *total* 
number of records.

--- class.uicategories.inc.php.orig     Sat Sep 28 23:08:23 2002
+++ class.uicategories.inc.php  Mon Sep 30 23:00:44 2002
@@ -134,16 +134,18 @@
                        }
 
                        $this->bo->cats->app_name = $cats_app;
+                       $cats = $this->bo->get_list_unlimited($global_cats);
+                       $total_records = $this->bo->cats->total_records;
                        $cats = $this->bo->get_list($global_cats);
 
 //--------------------------------- nextmatch 
--------------------------------------------
 
-                       $left  = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
-                       $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
+                       $left  = 
$this->nextmatchs->left('/index.php',$this->start,$total_records,$link_data);
+                       $right = 
$this->nextmatchs->right('/index.php',$this->start,$total_records,$link_data);
                        $this->t->set_var('left',$left);
                        $this->t->set_var('right',$right);
 
-                       
$this->t->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
+                       
$this->t->set_var('lang_showing',$this->nextmatchs->show_hits($total_records,$this->start));
 
 // ------------------------------ end nextmatch 
------------------------------------------
 
--- class.bocategories.inc.php.orig     Sat Sep 28 23:15:04 2002
+++ class.bocategories.inc.php  Sat Sep 28 23:26:24 2002
@@ -68,6 +68,12 @@
                        $this->order  = $data['order'];
                }
 
+
+               function get_list_unlimited($global_cats)
+               {
+                       return 
$this->cats->return_sorted_array($this->start,False,$this->query,$this->sort,$this->order,$global_cats);
+               }
+
                function get_list($global_cats)
                {
                        return 
$this->cats->return_sorted_array($this->start,True,$this->query,$this->sort,$this->order,$global_cats);






Follow-up Comments
*******************

-------------------------------------------------------
Date: 2002-Oct-10 15:05             By: totschnig
Hello,

I should have said that I discovered that the patch I posted is far from a real 
solution since it does not deal at all with the problem of categories and 
subcategories:
When there are 10 top level categories and 10 subcategories and the user's 
maxmatch preference is 10, then without my patch the user only sees half of the 
categories without any access to the rest. with my patch, the user sees all 10 
top level categories + the 10 subcategories, and the arrows of the nextmatch 
class give bogus indications. I am not sure how the nextmatch class can be used 
in this situation of a hierarchical tree.

-------------------------------------------------------
Date: 2002-Oct-10 03:50             By: skwashd
Thanks Michael,

Will test this one.

Cheers


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1308&group_id=509




reply via email to

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