fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11175] bkbooking: stavanger update


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [11175] bkbooking: stavanger update
Date: Fri, 14 Jun 2013 11:47:17 +0000

Revision: 11175
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11175
Author:   kjell
Date:     2013-06-14 11:47:17 +0000 (Fri, 14 Jun 2013)
Log Message:
-----------
bkbooking: stavanger update

Modified Paths:
--------------
    branches/stavangerkommune/booking/inc/class.boapplication.inc.php
    branches/stavangerkommune/booking/inc/class.soapplication.inc.php
    branches/stavangerkommune/booking/inc/class.uiapplication.inc.php
    branches/stavangerkommune/booking/inc/class.uigroup.inc.php
    branches/stavangerkommune/booking/inc/class.uiorganization.inc.php
    branches/stavangerkommune/booking/setup/default_records.inc.php
    branches/stavangerkommune/booking/setup/phpgw_no.lang
    branches/stavangerkommune/booking/setup/setup.inc.php
    branches/stavangerkommune/booking/setup/tables_update.inc.php
    branches/stavangerkommune/booking/templates/base/application.xsl
    branches/stavangerkommune/bookingfrontend/inc/class.bosearch.inc.php
    branches/stavangerkommune/bookingfrontend/setup/phpgw_no.lang

Modified: branches/stavangerkommune/booking/inc/class.boapplication.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.boapplication.inc.php   
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/inc/class.boapplication.inc.php   
2013-06-14 11:47:17 UTC (rev 11175)
@@ -126,7 +126,6 @@
                        } else {
                                $where_clauses[] = "(%%table%%.case_officer_id 
= ".intval($for_case_officer_id[1]).')';
                        }
-
                        
                        if ($building_id = phpgw::get_var('filter_building_id', 
'int', 'GET', false)) {
                                $where_clauses[] = "(%%table%%.id IN (SELECT 
DISTINCT a.id FROM bb_application a, bb_application_resource ar, bb_resource r 
WHERE ar.application_id = a.id AND ar.resource_id = r.id AND r.building_id = 
".intval($building_id)."))";

Modified: branches/stavangerkommune/booking/inc/class.soapplication.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.soapplication.inc.php   
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/inc/class.soapplication.inc.php   
2013-06-14 11:47:17 UTC (rev 11175)
@@ -268,6 +268,7 @@
                                        'application_id'                => 
array('type' => 'int'),
                                        'type'  => array('type' => 'string', 
'required' => true),
                                        'from_' => array('type' => 
'timestamp','query' => true),
-                                       'to_'   => array('type' => 
'timestamp')));
+                                       'to_'   => array('type' => 'timestamp'),
+                                       'active' => array('type' => 'int')));
                }
        }

Modified: branches/stavangerkommune/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.uiapplication.inc.php   
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/inc/class.uiapplication.inc.php   
2013-06-14 11:47:17 UTC (rev 11175)
@@ -363,6 +363,7 @@
                                $association['to_'] = 
pretty_timestamp($association['to_']);
                                $association['link'] = 
self::link(array('menuaction' => 'booking.ui'.$association['type'].'.edit', 
'id'=>$association['id']));
                                $association['type'] = 
lang($association['type']);
+
                        }
                        return $this->yui_results($associations);
                }

Modified: branches/stavangerkommune/booking/inc/class.uigroup.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.uigroup.inc.php 2013-06-14 
10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/inc/class.uigroup.inc.php 2013-06-14 
11:47:17 UTC (rev 11175)
@@ -245,6 +245,9 @@
                                }
        
                                $errors = $this->bo->validate($group);
+                               if(strlen($_POST['name']) > 50){
+                                       $errors['name'] = lang('Lengt of name 
is to long, max 50 characters long');
+                               }
                                if(strlen($_POST['shortname']) > 11){
                                        $errors['shortname'] = lang('Lengt of 
shortname is to long, max 11 characters long');
                                }

Modified: branches/stavangerkommune/booking/inc/class.uiorganization.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.uiorganization.inc.php  
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/inc/class.uiorganization.inc.php  
2013-06-14 11:47:17 UTC (rev 11175)
@@ -188,6 +188,9 @@
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
                                list($organization, $errors) = 
$this->extract_and_validate(array('active' => 1));
+                               if(strlen($_POST['name']) > 50){
+                                       $errors['name'] = lang('Lengt of name 
is to long, max 50 characters long');
+                               }
                                if(strlen($_POST['shortname']) > 11){
                                        $errors['shortname'] = lang('Lengt of 
shortname is to long, max 11 characters long');
                                }
@@ -221,6 +224,9 @@
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
                                list($organization, $errors) = 
$this->extract_and_validate($organization);
+                               if(strlen($_POST['name']) > 50){
+                                       $errors['name'] = lang('Lengt of name 
is to long, max 50 characters long');
+                               }
                                if(strlen($_POST['shortname']) > 11){
                                        $errors['shortname'] = lang('Lengt of 
shortname is to long, max 11 characters long');
                                }

Modified: branches/stavangerkommune/booking/setup/default_records.inc.php
===================================================================
--- branches/stavangerkommune/booking/setup/default_records.inc.php     
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/setup/default_records.inc.php     
2013-06-14 11:47:17 UTC (rev 11175)
@@ -12,11 +12,11 @@
 
                        $GLOBALS['phpgw_setup']->oProc->query(
                                "CREATE OR REPLACE VIEW 
bb_application_association AS ".
-                               "SELECT 'booking' AS type, application_id, id, 
from_, to_ FROM bb_booking WHERE application_id IS NOT NULL ".
+                               "SELECT 'booking' AS type, application_id, id, 
from_, to_, active FROM bb_booking WHERE application_id IS NOT NULL ".
                                "UNION ".
-                               "SELECT 'allocation' AS type, application_id, 
id, from_, to_ FROM bb_allocation  WHERE application_id IS NOT NULL ".
+                               "SELECT 'allocation' AS type, application_id, 
id, from_, to_, active FROM bb_allocation  WHERE application_id IS NOT NULL ".
                                "UNION ".
-                               "SELECT 'event' AS type, application_id, id, 
from_, to_ FROM bb_event  WHERE application_id IS NOT NULL"
+                               "SELECT 'event' AS type, application_id, id, 
from_, to_, active FROM bb_event  WHERE application_id IS NOT NULL"
                        );
                        break;
                default:

Modified: branches/stavangerkommune/booking/setup/phpgw_no.lang
===================================================================
--- branches/stavangerkommune/booking/setup/phpgw_no.lang       2013-06-14 
10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/setup/phpgw_no.lang       2013-06-14 
11:47:17 UTC (rev 11175)
@@ -510,6 +510,7 @@
 Confirm e-mail address booking no      Bekreft e-postadressen
 The e-mail addresses you entered do not match  booking no      E-postadressene 
er ikke like
 Lengt of shortname is to long, max 11 characters long  booking no      
Kortnavn er for langt, maks 11 tegn
+Lengt of name is to long, max 50 characters long       booking no      Navn er 
for langt, maks 50 tegn
 The organization number is wrong or not present        booking no      Det er 
ikke registrert fakturainformasjon på denne organisasjonen
 The resource number is wrong or not present    booking no      Det er ikke 
registert et ressursnummer på denne organisasjonen
 Recurring allocation   booking no      Gjenta tildelingen

Modified: branches/stavangerkommune/booking/setup/setup.inc.php
===================================================================
--- branches/stavangerkommune/booking/setup/setup.inc.php       2013-06-14 
10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/setup/setup.inc.php       2013-06-14 
11:47:17 UTC (rev 11175)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.11';
+       $setup_info['booking']['version'] = '0.2.12';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: branches/stavangerkommune/booking/setup/tables_update.inc.php
===================================================================
--- branches/stavangerkommune/booking/setup/tables_update.inc.php       
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/setup/tables_update.inc.php       
2013-06-14 11:47:17 UTC (rev 11175)
@@ -2678,3 +2678,27 @@
                }
        }
 
+       $test[] = '0.2.11';
+       /**
+       * Update booking version from 0.2.11 to 0.2.12
+       * add description to bb_office
+       * 
+       */
+       function booking_upgrade0_2_11()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $GLOBALS['phpgw_setup']->oProc->query(
+                               "CREATE OR REPLACE VIEW 
bb_application_association AS ".
+                               "SELECT 'booking' AS type, application_id, id, 
from_, to_, active FROM bb_booking WHERE application_id IS NOT NULL ".
+                               "UNION ".
+                               "SELECT 'allocation' AS type, application_id, 
id, from_, to_, active FROM bb_allocation  WHERE application_id IS NOT NULL ".
+                               "UNION ".
+                               "SELECT 'event' AS type, application_id, id, 
from_, to_, active FROM bb_event  WHERE application_id IS NOT NULL"
+               );
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.12';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+

Modified: branches/stavangerkommune/booking/templates/base/application.xsl
===================================================================
--- branches/stavangerkommune/booking/templates/base/application.xsl    
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/booking/templates/base/application.xsl    
2013-06-14 11:47:17 UTC (rev 11175)
@@ -334,7 +334,8 @@
                {key: 'id', label: lang['ID'], formatter: 
YAHOO.booking.formatLink},
                {key: 'type', label: lang['Type']},
                {key: 'from_', label: lang['From']},
-               {key: 'to_', label: lang['To']}];
+               {key: 'to_', label: lang['To']},
+               {key: 'active', label: lang['Active']}];
            YAHOO.booking.inlineTableHelper('associated_container', url2, 
colDefs);
     }
 

Modified: branches/stavangerkommune/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/stavangerkommune/bookingfrontend/inc/class.bosearch.inc.php        
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/bookingfrontend/inc/class.bosearch.inc.php        
2013-06-14 11:47:17 UTC (rev 11175)
@@ -59,7 +59,7 @@
             if(!$type || $type == "event") {
                                $now = date('Y-m-d');
                                $expired_conditions = "(bb_event.active != 0 
AND bb_event.completed = 0 AND bb_event.from_ > '{$now}' AND 
bb_event.description != '')";
-                $event_result = 
$this->soevent->read(array("query"=>$searchterm, "sort"  => "name", "dir" => 
"asc",  "filters" => array("active" => "1",'where' => $expired_conditions)));
+                $event_result = 
$this->soevent->read(array("query"=>$searchterm, "sort"  => "name", "dir" => 
"asc",  "filters" => array('where' => $expired_conditions)));
                 foreach($event_result['results'] as &$event)
                 {
                     $event['name'] = $event['building_name']. ' / ' . 
$event['description'];

Modified: branches/stavangerkommune/bookingfrontend/setup/phpgw_no.lang
===================================================================
--- branches/stavangerkommune/bookingfrontend/setup/phpgw_no.lang       
2013-06-14 10:16:43 UTC (rev 11174)
+++ branches/stavangerkommune/bookingfrontend/setup/phpgw_no.lang       
2013-06-14 11:47:17 UTC (rev 11175)
@@ -320,6 +320,7 @@
 Confirm e-mail address bookingfrontend no      Bekreft e-postadressen
 The e-mail addresses you entered do not match  bookingfrontend no      
E-postadressene er ikke like
 Lengt of shortname is to long, max 11 characters long  bookingfrontend no      
Kortnavn er for langt, maks 11 tegn
+Lengt of name is to long, max 50 characters long       bookingfrontend no      
Navn er for langt, maks 50 tegn
 Go back to calendar    bookingfrontend no      Tilbake til kalender
 Agegroups kan not be larger than 9999 peoples  bookingfrontend no      
Estimert antall deltakere kan ikke være større en 9999 personer
 Contact information name is to long. max 50 characters bookingfrontend no      
Navn i kontakt informasjon er for langt. Maks 50 tegn




reply via email to

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