[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla... |
Date: |
Mon, 09 Oct 2006 15:54:42 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/10/09 15:54:42
Modified files:
inc : class.soadmin_location.inc.php
class.uiadmin_location.inc.php
Log message:
fix
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_location.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_location.inc.php?cvsroot=phpgroupware&r1=1.19&r2=1.20
Patches:
Index: class.soadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- class.soadmin_location.inc.php 3 Oct 2006 09:58:09 -0000 1.26
+++ class.soadmin_location.inc.php 9 Oct 2006 15:54:42 -0000 1.27
@@ -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.26 2006/10/03
09:58:09 sigurdne Exp $
+ * @version $Id: class.soadmin_location.inc.php,v 1.27 2006/10/09
15:54:42 sigurdne Exp $
*/
/**
@@ -738,13 +738,17 @@
$table_def = $this->get_table_def($location_type);
$history_table_def =
$this->get_table_history_def($table_def,$location_type);
-
+//_debug_array($table_def);
+//_debug_array($history_table_def);
+//die();
if(!($location_type==$values[$column_name]))
{
+ $id =
$this->bocommon->next_id('fm_location_attrib',array('type_id'=>$values[$column_name]));
+
$this->init_process();
- $this->oProc->m_odb->transaction_begin();
- $this->db->transaction_begin();
+// $this->oProc->m_odb->transaction_begin();
+// $this->db->transaction_begin();
if($this->oProc->AddColumn('fm_location'.$values[$column_name],$column_name,
$column_info) &&
$this->oProc->AddColumn('fm_location'.$values[$column_name] .
'_history',$column_name, $column_info))
{
@@ -762,6 +766,34 @@
$this->db->query("UPDATE
fm_location_config set
location_type = '".
$values[$column_name] . "' WHERE column_name='" . $column_name .
"'",__LINE__,__FILE__);
+ $values= array(
+ $id,
+ $column_name,
+ $column_name,
+ $column_name,
+ $values[$column_name],
+ $column_info['type'],
+ $column_info['precision'],
+ $column_info['scale'],
+ $column_info['default'],
+ $column_info['nullable'],
+ );
+
+ $values =
$this->bocommon->validate_db_insert($values);
+
+ $this->db->query("INSERT INTO
fm_location_attrib (id,column_name, input_text, statustext,
type_id,datatype,precision_,scale,default_value,nullable) "
+ . "VALUES
($values)",__LINE__,__FILE__);
+
+ $this->db->query("DELETE from
fm_location_attrib WHERE column_name = '$column_name' AND type_id =
'$location_type'",__LINE__,__FILE__);
+
+ $ok = true;
+ }
+
+ if(isset($ok) && $ok)
+ {
+// $this->db->transaction_commit();
+//
$this->oProc->m_odb->transaction_commit();
+
$receipt['message'][] = array('msg'
=> lang('column %1 has been moved',$column_name));
}
else
@@ -769,8 +801,6 @@
$receipt['message'][] = array('msg'
=> lang('column %1 could not be moved',$column_name));
}
- $this->db->transaction_commit();
- $this->oProc->m_odb->transaction_commit();
}
return $receipt;
Index: class.uiadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- class.uiadmin_location.inc.php 5 Oct 2006 11:33:53 -0000 1.19
+++ class.uiadmin_location.inc.php 9 Oct 2006 15:54:42 -0000 1.20
@@ -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.19 2006/10/05
11:33:53 sigurdne Exp $
+ * @version $Id: class.uiadmin_location.inc.php,v 1.20 2006/10/09
15:54:42 sigurdne Exp $
*/
/**
@@ -763,17 +763,11 @@
$GLOBALS['phpgw']->xslttpl->add_file(array('admin_location'));
- if ($values['save'])
- {
-
- if (!$receipt['error'])
+ if (isset($values['save']) && $values['save'])
{
-
$receipt =
$this->bo->save_config($values,$column_name);
}
- }
-
$type_id =
$this->bo->read_config_single($column_name);
$function_msg = lang('edit location config for') . ' '
.$column_name;
@@ -784,7 +778,7 @@
'column_name' => $column_name
);
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
+ $msgbox_data =
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
$data = array
(
@@ -797,15 +791,15 @@
'lang_save' =>
lang('save'),
'lang_done' =>
lang('done'),
'column_name' =>
$column_name,
- 'value_name' =>
$values['name'],
+ 'value_name' =>
(isset($values['name'])?$values['name']:''),
'location_list' =>
$this->bo->select_location_type($type_id),
'lang_config_statustext' =>
lang('Select the level for this information'),
'lang_done_standardtext' =>
lang('Back to the list'),
'lang_save_standardtext' =>
lang('Save the standard'),
- 'type_id' =>
$values['type_id'],
- 'value_descr' =>
$values['descr']
+ 'type_id'
=> (isset($values['type_id'])?$values['type_id']:''),
+ 'value_descr' =>
(isset($values['descr'])?$values['descr']:'')
);
$appname = lang('location');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla...,
Sigurd Nes <=