[Top][All Lists]
[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: |
Tue, 15 Oct 2002 17:45:56 -0400 |
=================== BUG #1308: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1308&group_id=509
Changes by: Bettina Gille <address@hidden>
Date: 2002-Oct-15 21:45 (GMT)
------------------ Additional Follow-up Comments ----------------------------
commented out the limit_query for the subs.
=================== 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: ceb
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-15 21:45 By: ceb
commented out the limit_query for the subs.
-------------------------------------------------------
Date: 2002-Oct-15 01:59 By: None
I tested the patch commited to CVS. All top level categories are shown, but if
one category has more than maxmatch subcategories, these are still invisible.
Michael
-------------------------------------------------------
Date: 2002-Oct-15 00:22 By: ceb
now it should show all of the cats.
thanks. ceb
-------------------------------------------------------
Date: 2002-Oct-10 17:14 By: totschnig
I looked somethin further into this issue, and I think I got a hold on the
problem, but for working out the right solution, I'd need help of somebody
familiar with the categories class in the API:
The problem is twofold:
- the categories class limits queries on the main categories and on the
subcategories to maxmatch,
- the uicategories classes in admin and preferences set the total parameter of
the nextmatch class to the number of records in the limited queries.
The only solution I see in the current framework, is to
- change the categories class in the API so that the return_sorted_array
function limits the main categories, but gets the unlimited subcategories.
- change the admin and preferences module so that total_records is set to the
*unlimited* number of *main* categories.
This could make the categories list in the UI work correctly with the nextmatch
class. The user only sees maxmatch main categories, but all the subcategories.
-------------------------------------------------------
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
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/09
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/10
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/10
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/14
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/14
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/14
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page,
nobody <=
- [Phpgroupware-tracker] [Bug #1308] only maxmatch categories show up in the "Edit Categories" page, nobody, 2002/10/30