[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7502] bkbooking: fixed bug that booking created from
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [7502] bkbooking: fixed bug that booking created from application was not marked with application id |
Date: |
Tue, 16 Aug 2011 11:09:28 +0000 |
Revision: 7502
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7502
Author: kjell
Date: 2011-08-16 11:09:22 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
bkbooking: fixed bug that booking created from application was not marked with
application id
Modified Paths:
--------------
trunk/booking/inc/class.uibooking.inc.php
Modified: trunk/booking/inc/class.uibooking.inc.php
===================================================================
--- trunk/booking/inc/class.uibooking.inc.php 2011-08-16 09:40:10 UTC (rev
7501)
+++ trunk/booking/inc/class.uibooking.inc.php 2011-08-16 11:09:22 UTC (rev
7502)
@@ -184,7 +184,9 @@
$booking = array();
$booking['cost'] = 0;
$allocation_id = phpgw::get_var('allocation_id', 'int',
'GET');
- $application_id = phpgw::get_var('application_id',
'int', 'POST');
+ if (isset($_POST['application_id'])) {
+ $application_id =
phpgw::get_var('application_id', 'int', 'POST');
+ }
$booking['building_id'] = phpgw::get_var('building_id',
'int', 'GET');
$booking['resources'] = phpgw::get_var('resources',
'int', 'GET');
#The string replace is a workaround for a problem at Bergen
Kommune
@@ -266,7 +268,7 @@
if (!$errors && $_POST['recurring'] != 'on' &&
$_POST['outseason'] != 'on')
{
- if( isset($noallocation)) {
+ if( isset($noallocation)) {
$allocation['resources'] = $booking['resources'];
$allocation['cost'] = $booking['cost'];
$allocation['building_id'] = $booking['building_id'];
@@ -274,7 +276,9 @@
$allocation['season_id'] = $booking['season_id'];
$allocation['organization_id'] =
$booking['organization_id'];
$allocation['organization_name'] =
$booking['organization_name'];
- $allocation['application_id'] = $application_id;
+ if ($application_id != '0') {
+ $allocation['application_id'] =
$application_id;
+ }
$allocation['from_'] = $booking['from_'];
$allocation['to_'] = $booking['to_'];
$allocation['active'] = '1';
@@ -334,20 +338,26 @@
$allocation['season_id'] =
$booking['season_id'];
$allocation['organization_id'] =
$booking['organization_id'];
$allocation['organization_name'] =
$booking['organization_name'];
- $allocation['application_id'] =
$application_id;
+ if
($application_id != '0') {
+
$allocation['application_id'] = $application_id;
+ }
$allocation['from_'] = $booking['from_'];
$allocation['to_'] = $booking['to_'];
$allocation['active'] =
'1';
$allocation['completed'] = '0';
$receipt =
$this->allocation_bo->add($allocation);
$booking['allocation_id'] = $receipt['id'];
-
$booking['application_id'] = $application_id;
+ if
($application_id != '0') {
+
$booking['application_id'] = $application_id;
+ }
$booking['secret'] = $this->generate_secret();
$receipt =
$this->bo->add($booking);
$booking['allocation_id'] = '';
$this->allocation_bo->so->update_id_string();
} else {
-
$booking['application_id'] = $application_id;
+ if
($application_id != '0') {
+
$booking['application_id'] = $application_id;
+ }
$booking['secret'] = $this->generate_secret();
$receipt =
$this->bo->add($booking);
}
@@ -357,8 +367,9 @@
}
if ($step == 3)
{
- if (isset($application_id)) {
+ if ($application_id != '0') {
$this->redirect(array('menuaction' => 'booking.uiapplication.show',
'id'=>$application_id));
+
} else {
$this->redirect(array('menuaction' => 'booking.uimassbooking.schedule',
'id'=>$booking['building_id']));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7502] bkbooking: fixed bug that booking created from application was not marked with application id,
Kjell Arne Espedal <=