[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin/inc class.uicategories.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] admin/inc class.uicategories.inc.php |
Date: |
Wed, 04 Oct 2006 01:31:09 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: admin
Changes by: Dave Hall <skwashd> 06/10/04 01:31:08
Modified files:
inc : class.uicategories.inc.php
Log message:
more notices
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.uicategories.inc.php?cvsroot=phpgroupware&r1=1.45&r2=1.46
Patches:
Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- class.uicategories.inc.php 18 Apr 2006 13:50:10 -0000 1.45
+++ class.uicategories.inc.php 4 Oct 2006 01:31:08 -0000 1.46
@@ -9,7 +9,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\**************************************************************************/
- /* $Id: class.uicategories.inc.php,v 1.45 2006/04/18 13:50:10 skwashd
Exp $ */
+ /* $Id: class.uicategories.inc.php,v 1.46 2006/10/04 01:31:08 skwashd
Exp $ */
/* $Source:
/cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v $ */
class uicategories
@@ -141,6 +141,7 @@
))
);
+ $content = array();
while (is_array($categories) && list(,$cat) =
each($categories))
{
$level = $cat['level'];
@@ -155,7 +156,7 @@
$main = 'no';
}
- $descr =
$GLOBALS['phpgw']->strip_html($cat['descr']);
+ $descr =
$GLOBALS['phpgw']->strip_html($cat['description']);
if ($_REQUEST['appname'] && $cat['app_name'] ==
'phpgw')
{
@@ -199,7 +200,7 @@
}
$link_data['menuaction'] =
'admin.uicategories.edit';
- $link_data['parent'] = $cat['cat_id'];
+ $link_data['parent'] = $cat['id'];
unset($link_data['cat_id']);
$add_sub_url =
$GLOBALS['phpgw']->link('/index.php',$link_data);
@@ -207,7 +208,6 @@
(
'name' =>
$cat_name . $appendix,
'descr' =>
$descr,
- 'date' =>
$note['date'],
'main' =>
$main,
'add_sub_url' =>
$add_sub_url,
'edit_url' =>
$edit_url,
@@ -238,7 +238,7 @@
$nm = array
(
'start_record' => $this->start,
- 'num_records' => count($categoris),
+ 'num_records' => count($categories),
'all_records' =>
$this->bo->cats->total_records,
'link_data' => $link_data
);
@@ -262,6 +262,7 @@
$parent = get_var('parent',array('GET'));
$values = get_var('values',array('POST'));
+ $message = '';
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
@@ -269,12 +270,13 @@
'global_cats' => $global_cats
);
- if ($values['cancel'])
+ if ( isset($values['cancel']) && $values['cancel'] )
{
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
}
- if ($values['save'] || $values['apply'])
+ if ( (isset($values['save']) && $values['save'] )
+ || (isset($values['apply']) &&
$values['apply']) )
{
$values['cat_id'] = $this->cat_id;
$values['access'] = 'public';
@@ -287,7 +289,7 @@
else
{
$this->cat_id =
$this->bo->save_cat($values);
- if ($values['apply'])
+ if ( isset($values['apply']) &&
$values['apply'] )
{
$message = lang('Category %1
has been saved !',$values['name']);
}
@@ -301,8 +303,18 @@
if ($this->cat_id)
{
$cats =
$this->bo->cats->return_single($this->cat_id);
- $parent = $cats['parent'];
}
+ else
+ {
+ $cats = array(array
+ (
+ 'id' => 0,
+ 'name' => '',
+ 'description' => '',
+ 'parent' => 0
+ ));
+ }
+ $parent = $cats[0]['parent'];
if ($_REQUEST['appname'])
{
@@ -332,7 +344,7 @@
'lang_color_selector' => lang('color
selector'),
'lang_descr' =>
lang('description'),
'lang_parent' => lang('parent
category'),
- 'old_parent' =>
$cats['parent'],
+ 'old_parent' => $parent,
'lang_save' => lang('save'),
'lang_apply' =>
lang('apply'),
'lang_cancel' =>
lang('cancel'),
@@ -412,6 +424,13 @@
'cat_id' => $this->cat_id
));
+ //Initialize our variables
+ $msgbox_error = '';
+ $show_done = '';
+ $subs = '';
+ $lang_sub_select_move = '';
+ $lang_sub_select_drop = '';
+
if ($apps_cats)
{
$error = array('This category is currently
being used by applications as a parent category',
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin/inc class.uicategories.inc.php,
Dave Hall <=