[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.sorequest.inc.php class.bore...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.sorequest.inc.php class.bore... |
Date: |
Wed, 19 Apr 2006 08:35:32 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/19 08:35:32
Modified files:
inc : class.sorequest.inc.php class.borequest.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sorequest.inc.php.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.borequest.inc.php.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: property/inc/class.borequest.inc.php
diff -u property/inc/class.borequest.inc.php:1.12
property/inc/class.borequest.inc.php:1.13
--- property/inc/class.borequest.inc.php:1.12 Mon Apr 17 11:36:05 2006
+++ property/inc/class.borequest.inc.php Wed Apr 19 08:35:32 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.borequest.inc.php,v 1.12 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.borequest.inc.php,v 1.13 2006/04/19 08:35:32
sigurdne Exp $
*/
/**
@@ -495,11 +495,8 @@
}
$request['location_code']=implode("-", $location);
- $start_date =
$this->bocommon->date_array($request['start_date']);
- $end_date =
$this->bocommon->date_array($request['end_date']);
-
- $request['start_date'] = mktime
(2,0,0,$start_date['month'],$start_date['day'],$start_date['year']);
- $request['end_date'] = mktime
(2,0,0,$end_date['month'],$end_date['day'],$end_date['year']);
+ $request['start_date'] =
$this->bocommon->date_to_timestamp($request['start_date']);
+ $request['end_date'] =
$this->bocommon->date_to_timestamp($request['end_date']);
if ($action=='edit')
{
Index: property/inc/class.sorequest.inc.php
diff -u property/inc/class.sorequest.inc.php:1.15
property/inc/class.sorequest.inc.php:1.16
--- property/inc/class.sorequest.inc.php:1.15 Mon Apr 17 11:36:05 2006
+++ property/inc/class.sorequest.inc.php Wed Apr 19 08:35:32 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.sorequest.inc.php,v 1.15 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.sorequest.inc.php,v 1.16 2006/04/19 08:35:32
sigurdne Exp $
*/
/**
@@ -331,23 +331,23 @@
if ($this->db->next_record())
{
$request['request_id']
= $this->db->f('id');
- $request['title']
= $this->db->f('title');
+ $request['title']
= $this->db->f('title');
$request['location_code']
= $this->db->f('location_code');
- $request['descr']
= $this->db->f('descr');
- $request['status']
= $this->db->f('status');
- $request['budget']
= (int)$this->db->f('budget');
+ $request['descr']
= $this->db->f('descr');
+ $request['status']
= $this->db->f('status');
+ $request['budget']
= (int)$this->db->f('budget');
$request['tenant_id']
= $this->db->f('tenant_id');
- $request['owner']
= $this->db->f('owner');
+ $request['owner']
= $this->db->f('owner');
$request['coordinator']
= $this->db->f('coordinator');
- $request['access']
= $this->db->f('access');
+ $request['access']
= $this->db->f('access');
$request['start_date']
= $this->db->f('start_date');
$request['end_date']
= $this->db->f('end_date');
- $request['cat_id']
= $this->db->f('category');
+ $request['cat_id']
= $this->db->f('category');
$request['branch_id']
= $this->db->f('branch_id');
$request['authorities_demands']
= $this->db->f('authorities_demands');
- $request['score']
= $this->db->f('score');
- $request['p_num']
= $this->db->f('p_num');
+ $request['score']
= $this->db->f('score');
+ $request['p_num']
= $this->db->f('p_num');
$request['p_entity_id']
= $this->db->f('p_entity_id');
$request['p_cat_id']
= $this->db->f('p_cat_id');
$request['contact_phone']
= $this->db->f('contact_phone');
@@ -565,6 +565,7 @@
$vals = "," . implode(",",$vals);
}
+//_debug_array($vals);
if($request['street_name'])
{
$address[]= $request['street_name'];
@@ -583,8 +584,31 @@
$request['title'] =
$this->db->db_addslashes($request['title']);
//_debug_array($request);
+ $value_set=array(
+ 'status' => $request['status'],
+ 'category' => $request['cat_id'],
+ 'start_date' =>
$request['start_date'],
+ 'end_date' => $request['end_date'],
+ 'coordinator' =>
$request['coordinator'],
+ 'descr' => $request['descr'],
+ 'budget' =>
(int)$request['budget'],
+ 'location_code' =>
$request['location_code'],
+ 'address' => $address
+ );
+
+ $value_set =
$this->bocommon->validate_db_update($value_set);
+
$this->db->transaction_begin();
+ $this->db->query("SELECT status,category,coordinator
FROM fm_request where id='" .$request['request_id']."'",__LINE__,__FILE__);
+ $this->db->next_record();
+
+ $old_status = $this->db->f('status');
+ $old_category = $this->db->f('category');
+ $old_coordinator = $this->db->f('coordinator');
+
+ $this->db->query("UPDATE fm_request set $value_set
$vals WHERE id= '" . $request['request_id'] ."'",__LINE__,__FILE__);
+
$this->db->query("DELETE FROM fm_request_condition
WHERE request_id='" . $request['request_id'] . "'",__LINE__,__FILE__);
while (is_array($request['condition']) &&
list($condition_type,$value_type) = each($request['condition']))
{
@@ -613,17 +637,11 @@
if($this->db->transaction_commit())
{
- $this->db->query("SELECT
status,category,coordinator FROM fm_request where id='"
.$request['request_id']."'",__LINE__,__FILE__);
- $this->db->next_record();
-
- $old_status = $this->db->f('status');
- $old_categroy = $this->db->f('category');
- $old_coordinator = $this->db->f('coordinator');
if ($old_status != $request['status'])
{
$this->historylog->add('S',$request['request_id'],$request['status']);
}
- if ($old_categroy != $request['cat_id'])
+ if ($old_category != $request['cat_id'])
{
$this->historylog->add('T',$request['request_id'],$request['cat_id']);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.sorequest.inc.php class.bore...,
Sigurd Nes <=