phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uiadmin_location.inc.php cla...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.uiadmin_location.inc.php cla...
Date: Sun, 15 Oct 2006 20:14:14 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/15 20:14:14

Modified files:
        inc            : class.uiadmin_location.inc.php 
                         class.soadmin_location.inc.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_location.inc.php?cvsroot=phpgroupware&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_location.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28

Patches:
Index: class.uiadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- class.uiadmin_location.inc.php      12 Oct 2006 09:09:27 -0000      1.21
+++ class.uiadmin_location.inc.php      15 Oct 2006 20:14:14 -0000      1.22
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.uiadmin_location.inc.php,v 1.21 2006/10/12 
09:09:27 sigurdne Exp $
+       * @version $Id: class.uiadmin_location.inc.php,v 1.22 2006/10/15 
20:14:14 sigurdne Exp $
        */
 
        /**
@@ -354,7 +354,7 @@
                        {
                                $content[] = array
                                (
-                                       'name'                          => 
$attrib['name'],
+               //                      'name'                          => 
$attrib['name'],
                                        'type_name'                     => 
$attrib['type_name'],
                                        'datatype'                      => 
$attrib['datatype'],
                                        'column_name'                   => 
$attrib['column_name'],
@@ -482,7 +482,7 @@
 //_debug_array($values);
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('admin_location'));
 
-                       if ($values['save'])
+                       if (isset($values['save']) && $values['save'])
                        {
                                if($id)
                                {
@@ -553,8 +553,7 @@
                        if ($id)
                        {
                                $values = 
$this->bo->read_single_attrib($type_id,$id);
-                               $type_name=$attrib['type_name'];
-                               $function_msg = lang('edit attribute'). ' ' . 
lang($type_name);
+                               $function_msg = lang('edit attribute'). ' ' . 
$values['input_text'];
                                $action='edit';
                        }
                        else
@@ -571,13 +570,14 @@
                        );
 //_debug_array($values);
 
+                       $multiple_choice = '';
                        if($values['column_info']['type']=='R' || 
$values['column_info']['type']=='CH' || $values['column_info']['type']=='LB')
                        {
                                $multiple_choice= True;
                        }
 
 
-                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+                       $msgbox_data = 
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
 
                        $data = array
                        (
@@ -585,7 +585,7 @@
                                'lang_new_value'                        => 
lang('New value'),
                                'lang_new_value_statustext'             => 
lang('New value for multiple choice'),
                                'multiple_choice'                       => 
$multiple_choice,
-                               'value_choice'                          => 
$values['choice'],
+                               'value_choice'                          => 
(isset($values['choice'])?$values['choice']:''),
                                'lang_delete_value'                     => 
lang('Delete value'),
                                'lang_value'                            => 
lang('value'),
                                'lang_delete_choice_statustext'         => 
lang('Delete this value from the list of multiple choice'),

Index: class.soadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- class.soadmin_location.inc.php      9 Oct 2006 15:54:42 -0000       1.27
+++ class.soadmin_location.inc.php      15 Oct 2006 20:14:14 -0000      1.28
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.soadmin_location.inc.php,v 1.27 2006/10/09 
15:54:42 sigurdne Exp $
+       * @version $Id: class.soadmin_location.inc.php,v 1.28 2006/10/15 
20:14:14 sigurdne Exp $
        */
 
        /**
@@ -456,13 +456,13 @@
                        {
                                $table_def = $this->get_table_def($type_id);
                                $table = 'fm_location_attrib';
-
-                               $this->db->query("SELECT column_name,type_id 
FROM fm_location_attrib WHERE id='" . $id . "'",__LINE__,__FILE__);
+                               $this->db->query("SELECT column_name,type_id 
FROM fm_location_attrib WHERE type_id = '$type_id' AND id='" . $id . 
"'",__LINE__,__FILE__);
                                $this->db->next_record();
                                $ColumnName = $this->db->f('column_name');
 
                                $this->oProc->DropColumn('fm_location' 
.$type_id ,$table_def['fm_location'.$type_id], $ColumnName);
                                $this->oProc->DropColumn('fm_location' 
.$type_id . '_history',$table_def['fm_location'.$type_id . '_history'], 
$ColumnName);
+                               $this->db->query("DELETE FROM $table WHERE 
type_id = '$type_id' AND id='" . $id . "'",__LINE__,__FILE__);
                        }
                        else
                        {
@@ -486,8 +486,9 @@
                                $attrib_table   = 'fm_location_attrib';
                                $this->db->query("DELETE FROM $attrib_table 
WHERE type_id='" . $id . "'",__LINE__,__FILE__);
                                $this->db->query("DELETE FROM 
fm_location_choice WHERE type_id='" . $id . "'",__LINE__,__FILE__);
-                       }
                        $this->db->query("DELETE FROM $table WHERE id='" . $id 
. "'",__LINE__,__FILE__);
+                       }
+
                        $this->db->transaction_commit();
                        $this->oProc->m_odb->transaction_commit();
                }




reply via email to

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