fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6503] bkbooking: added search functionality for buil


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [6503] bkbooking: added search functionality for building in allocation and booking listing
Date: Wed, 20 Oct 2010 11:45:31 +0000

Revision: 6503
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6503
Author:   kjell
Date:     2010-10-20 11:45:30 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
bkbooking: added search functionality for building in allocation and booking 
listing

Modified Paths:
--------------
    trunk/booking/inc/class.soallocation.inc.php
    trunk/booking/inc/class.sobooking.inc.php
    trunk/booking/inc/class.uiallocation.inc.php
    trunk/booking/setup/setup.inc.php
    trunk/booking/setup/tables_update.inc.php
    trunk/bookingfrontend/setup/setup.inc.php

Modified: trunk/booking/inc/class.soallocation.inc.php
===================================================================
--- trunk/booking/inc/class.soallocation.inc.php        2010-10-19 20:52:15 UTC 
(rev 6502)
+++ trunk/booking/inc/class.soallocation.inc.php        2010-10-20 11:45:30 UTC 
(rev 6503)
@@ -21,6 +21,7 @@
                                        'active'                => array('type' 
=> 'int', 'required' => true),
                                        'application_id'        => array('type' 
=> 'int', 'required' => false),
                                        'organization_id'               => 
array('type' => 'int', 'required' => true),
+                                       'building_name' => array('type' => 
'string', 'required'=> true, 'query' => true),
                                        'season_id'             => array('type' 
=> 'int', 'required' => 'true'),
                                        'from_'         => array('type' => 
'string', 'required'=> true),
                                        'to_'           => array('type' => 
'string', 'required'=> true),

Modified: trunk/booking/inc/class.sobooking.inc.php
===================================================================
--- trunk/booking/inc/class.sobooking.inc.php   2010-10-19 20:52:15 UTC (rev 
6502)
+++ trunk/booking/inc/class.sobooking.inc.php   2010-10-20 11:45:30 UTC (rev 
6503)
@@ -12,6 +12,7 @@
                                        'allocation_id' => array('type' => 
'int', 'required' => false),
                                        'application_id'        => array('type' 
=> 'int', 'required' => false),
                                        'activity_id'   => array('type' => 
'int', 'required' => true),
+                                       'building_name' => array('type' => 
'string', 'required'=> true, 'query' => true),
                                        'group_id'              => array('type' 
=> 'int', 'required' => true),
                                        'from_'         => array('type' => 
'timestamp', 'required'=> true),
                                        'to_'           => array('type' => 
'timestamp', 'required'=> true),

Modified: trunk/booking/inc/class.uiallocation.inc.php
===================================================================
--- trunk/booking/inc/class.uiallocation.inc.php        2010-10-19 20:52:15 UTC 
(rev 6502)
+++ trunk/booking/inc/class.uiallocation.inc.php        2010-10-20 11:45:30 UTC 
(rev 6503)
@@ -68,6 +68,10 @@
                                                        'label' => 
lang('Organization shortname')
                                                ),
                                                array(
+                                                       'key' => 
'building_name',
+                                                       'label' => 
lang('Building')
+                                               ),
+                                               array(
                                                        'key' => 'season_name',
                                                        'label' => 
lang('Season')
                                                ),

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2010-10-19 20:52:15 UTC (rev 6502)
+++ trunk/booking/setup/setup.inc.php   2010-10-20 11:45:30 UTC (rev 6503)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.1.98';
+       $setup_info['booking']['version'] = '0.1.99';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2010-10-19 20:52:15 UTC (rev 
6502)
+++ trunk/booking/setup/tables_update.inc.php   2010-10-20 11:45:30 UTC (rev 
6503)
@@ -2349,4 +2349,21 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+  $test[] = '0.1.98';
+       function booking_upgrade0_1_98()
+       {
 
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_booking ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 'changeme'");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE bb_booking 
SET building_name = b2.name FROM bb_building b2 WHERE EXISTS (SELECT 1 FROM 
bb_booking bo,bb_season s,bb_building b WHERE bo.season_id = s.id AND 
s.building_id = b.id AND b2.id=b.id AND bb_booking.id=bo.id)");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_allocation ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 
'changeme'");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_allocation SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_allocation a,bb_season s,bb_building b WHERE s.id = 
a.season_id AND s.building_id = b.id AND b2.id=b.id AND 
bb_allocation.id=a.id)");
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.1.99';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+

Modified: trunk/bookingfrontend/setup/setup.inc.php
===================================================================
--- trunk/bookingfrontend/setup/setup.inc.php   2010-10-19 20:52:15 UTC (rev 
6502)
+++ trunk/bookingfrontend/setup/setup.inc.php   2010-10-20 11:45:30 UTC (rev 
6503)
@@ -21,7 +21,7 @@
 
        $setup_info['bookingfrontend']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98')
+               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98', '0.1.99')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(




reply via email to

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