[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15653] Syncromind: merge 15612:15652 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15653] Syncromind: merge 15612:15652 from trunk |
Date: |
Sun, 11 Sep 2016 20:30:50 +0000 (UTC) |
Revision: 15653
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15653
Author: sigurdne
Date: 2016-09-11 20:30:50 +0000 (Sun, 11 Sep 2016)
Log Message:
-----------
Syncromind: merge 15612:15652 from trunk
Modified Paths:
--------------
branches/dev-syncromind-2/booking/inc/class.bobooking.inc.php
branches/dev-syncromind-2/booking/inc/class.sobooking.inc.php
branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
branches/dev-syncromind-2/booking/inc/class.uiapplication.inc.php
branches/dev-syncromind-2/booking/inc/class.uibooking.inc.php
branches/dev-syncromind-2/booking/inc/class.uiresource.inc.php
branches/dev-syncromind-2/booking/inc/schedule.php
branches/dev-syncromind-2/booking/js/booking/allocation_list.js
branches/dev-syncromind-2/booking/js/booking/booking.js
branches/dev-syncromind-2/booking/js/booking/completed_reservation.js
branches/dev-syncromind-2/booking/js/booking/event.js
branches/dev-syncromind-2/booking/js/booking/schedule.js
branches/dev-syncromind-2/booking/setup/phpgw_no.lang
branches/dev-syncromind-2/booking/templates/base/booking_edit.xsl
branches/dev-syncromind-2/booking/templates/base/booking_new.xsl
branches/dev-syncromind-2/bookingfrontend/js/bookingfrontend/schedule.js
branches/dev-syncromind-2/controller/inc/class.uicalendar.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.db_adodb.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.log_message.inc.php
branches/dev-syncromind-2/property/inc/class.solocation.inc.php
branches/dev-syncromind-2/property/inc/class.uitts.inc.php
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
branches/dev-syncromind-2/property/js/portico/tts.view.js
branches/dev-syncromind-2/rental/inc/class.soprice_item.inc.php
branches/dev-syncromind-2/rental/inc/class.uiapplication.inc.php
branches/dev-syncromind-2/sms/setup/setup.inc.php
branches/dev-syncromind-2/sms/setup/tables_current.inc.php
branches/dev-syncromind-2/sms/setup/tables_update.inc.php
Property Changed:
----------------
branches/dev-syncromind-2/
branches/dev-syncromind-2/booking/
branches/dev-syncromind-2/bookingfrontend/
Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611
+ /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652
Property changes on: branches/dev-syncromind-2/booking
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607
+ /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652
Modified: branches/dev-syncromind-2/booking/inc/class.bobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.bobooking.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.bobooking.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -875,6 +875,7 @@
$booking['shortname'] =
$booking['group_shortname'];
$booking['type'] = 'booking';
}
+
$allocations = $this->split_allocations($allocations,
$bookings);
$event_ids =
$this->so->event_ids_for_resource($resource_id, $from, $to);
@@ -920,7 +921,9 @@
foreach ($all_bookings as $b)
{
if ($b['allocation_id'] ==
$allocation['id'])
+ {
$bookings[] = $b;
+ }
}
$times = array($allocation['from_'],
$allocation['to_']);
$times = array_merge(array_map("get_from2",
$bookings), $times);
@@ -931,24 +934,28 @@
{
$from_ = $times[0];
$to_ = $times[1];
- $resources = $allocation['resources'];
- $used = array();
foreach ($all_bookings as $b)
{
+ $found = false;
- if (($b['from_'] >= $from_ &&
$b['from_'] < $to_) || ($b['to_'] > $from_ && $b['to_'] <= $to_) ||
($b['from_'] <= $from_ && $b['to_'] >= $to_))
- $resources =
array_minus($resources, $b['resources']);
+ if(($b['from_'] >= $from_ && $b['from_'] <= $to_)
+ || ($b['to_'] > $from_
&& $b['to_'] < $to_)
+ || ($b['from_'] <=
$from_ && $b['to_'] >= $to_))
+ {
+ $found = true;
+ }
+ if (!$found)
+ {
+ $a = $allocation;
+ $a['from_'] = $from_;
+ $a['to_'] = $to_;
+ $new_allocations[] = $a;
+ }
}
- if ($resources)
- {
- $a = $allocation;
- $a['from_'] = $times[0];
- $a['to_'] = $times[1];
- $new_allocations[] = $a;
- }
array_shift($times);
}
}
+
return $new_allocations;
}
Modified: branches/dev-syncromind-2/booking/inc/class.sobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.sobooking.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.sobooking.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -146,6 +146,11 @@
$start = $from_->format('Y-m-d H:i');
$end = $to_->format('Y-m-d H:i');
+ if ($entity['from_'] == $entity['to_'])
+ {
+ $errors['to_'] = lang('Invalid to date');
+ return; //No need to continue validation if
dates are invalid
+ }
if (strtotime($start) > strtotime($end))
{
$errors['from_'] = lang('Invalid from date');
@@ -165,7 +170,7 @@
$this->db->query("SELECT e.id FROM bb_event e
WHERE
e.active = 1 AND
e.id IN
(SELECT event_id FROM bb_event_resource WHERE resource_id IN ($rids)) AND
-
((e.from_ > '$start' AND e.from_ < '$end') OR
+
((e.from_ >= '$start' AND e.from_ < '$end') OR
(e.to_
> '$start' AND e.to_ < '$end') OR
(e.from_ < '$start' AND e.to_ > '$end'))", __LINE__, __FILE__);
if ($this->db->next_record())
@@ -176,7 +181,7 @@
$this->db->query("SELECT a.id FROM
bb_allocation a
WHERE
a.active = 1 AND a.id<>$allocation_id AND
a.id IN
(SELECT allocation_id FROM bb_allocation_resource WHERE resource_id IN ($rids))
AND
-
((a.from_ > '$start' AND a.from_ < '$end') OR
+
((a.from_ >= '$start' AND a.from_ < '$end') OR
(a.to_
> '$start' AND a.to_ < '$end') OR
(a.from_ < '$start' AND a.to_ > '$end'))", __LINE__, __FILE__);
if ($this->db->next_record())
@@ -188,7 +193,7 @@
$this->db->query("SELECT b.id FROM bb_booking b
WHERE
b.active = 1 AND b.id<>$booking_id AND
b.id IN
(SELECT booking_id FROM bb_booking_resource WHERE resource_id IN ($rids)) AND
-
((b.from_ > '$start' AND b.from_ < '$end') OR
+
((b.from_ >= '$start' AND b.from_ < '$end') OR
(b.to_
> '$start' AND b.to_ < '$end') OR
(b.from_ < '$start' AND b.to_ > '$end'))", __LINE__, __FILE__);
if ($this->db->next_record())
Modified: branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -261,7 +261,6 @@
else if ($type == 'json')
{
return "'" . json_encode($value) . "'";
- ;
}
//Sanity check
@@ -293,6 +292,10 @@
{
return json_decode($value, true);
}
+ else if ($type == 'string')
+ {
+ return
htmlspecialchars_decode(stripslashes(str_replace(array('(;',
');'), array('(', ')'), $value)),ENT_QUOTES);
+ }
//Sanity check
if (!$this->valid_field_type($type))
Modified: branches/dev-syncromind-2/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uiapplication.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.uiapplication.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -393,12 +393,12 @@
unset($filters['activity_id']);
}
$filters['status'] = 'NEW';
- if (isset($_SESSION['showall']))
+// if (isset($_SESSION['showall']))
+// {
+// $filters['status'] = array('NEW', 'PENDING',
'REJECTED', 'ACCEPTED');
+// }
+// else
{
- $filters['status'] = array('NEW', 'PENDING',
'REJECTED', 'ACCEPTED');
- }
- else
- {
$test = phpgw::get_var('status', 'string',
'REQUEST', null);
if (phpgw::get_var('status') == 'none')
{
Modified: branches/dev-syncromind-2/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uibooking.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.uibooking.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -918,6 +918,11 @@
}
if ($step == 3)
{
+ $application_id =
$booking['application_id'] ? $booking['application_id'] :
$allocation['application_id'];
+ if($application_id)
+ {
+
$this->redirect(array('menuaction' => 'booking.uiapplication.show', 'id' =>
$application_id));
+ }
$building_id =
$booking['building_id'] ? $booking['building_id'] : $allocation['building_id'];
$this->redirect(array('menuaction' => 'booking.uimassbooking.schedule', 'id' =>
$building_id));
}
Modified: branches/dev-syncromind-2/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uiresource.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/inc/class.uiresource.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -447,7 +447,7 @@
{
foreach ($resource['buildings'] as $building_id)
{
- $building =
$this->bo->read_single($building_id);
+ $building =
$this->sobuilding->read_single($building_id);
$building_names[] = $building['name'];
}
$GLOBALS['phpgw_info']['flags']['app_header']
.= ' (' . implode('',$building_names) . ')';
Modified: branches/dev-syncromind-2/booking/inc/schedule.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/schedule.php 2016-09-11 19:59:39 UTC
(rev 15652)
+++ branches/dev-syncromind-2/booking/inc/schedule.php 2016-09-11 20:30:50 UTC
(rev 15653)
@@ -88,10 +88,18 @@
}
if (in_array($res['id'],
$booking['resources']))
{
- if
(!(($tempbooking[$booking['wday']]['from_'] <= $booking['from_']) and (
$tempbooking[$booking['wday']]['to_'] == $booking['to_']) and (
$tempbooking[$booking['wday']]['allocation_id'] == $booking['id']) and (
$booking['type'] == 'allocation')))
+ if
(!(($tempbooking[$booking['wday']]['from_'] <= $booking['from_'])
+ and (
$tempbooking[$booking['wday']]['to_'] == $booking['to_'])
+ and (
$tempbooking[$booking['wday']]['allocation_id'] == $booking['id'])
+ and (
$booking['type'] == 'allocation'))
+ )
{
$empty = false;
-
$row[$booking['wday']] = $booking;
+
+
if(empty($row[$booking['wday']]['type']) || $row[$booking['wday']]['type'] !=
'booking')
+ {
+
$row[$booking['wday']] = $booking;
+ }
}
if ($booking['type'] ==
'booking')
{
Modified: branches/dev-syncromind-2/booking/js/booking/allocation_list.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/allocation_list.js
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/js/booking/allocation_list.js
2016-09-11 20:30:50 UTC (rev 15653)
@@ -14,5 +14,5 @@
function requestWithBuildingFilter(sQuery)
{
- return 'query=' + sQuery + (seasonFilterBuildingId ?
'&filter_building_id=' + seasonFilterBuildingId : '');
+ return sQuery + (seasonFilterBuildingId ? '&filter_building_id=' +
seasonFilterBuildingId : '');
}
Modified: branches/dev-syncromind-2/booking/js/booking/booking.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/booking.js 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/js/booking/booking.js 2016-09-11
20:30:50 UTC (rev 15653)
@@ -2,7 +2,12 @@
var organization_id_selection = "";
$(document).ready(function ()
{
+ $("#start_date").change(function ()
+ {
+ $("#end_date").val($("#start_date").val());
+ });
+
$('#field_cost_comment').hide();
$('#field_cost').on('input propertychange paste', function ()
{
@@ -122,6 +127,50 @@
if ($.formUtils)
{
$.formUtils.addValidator({
+ name: 'time_span',
+ validatorFunction: function (value, $el, config, languaje,
$form)
+ {
+ var v = false;
+ var end_date = $("#end_date").val();
+ var start_date = $("#start_date").val();
+ if (end_date != "" && start_date != "")
+ {
+ v = true;
+ }
+ if (end_date == start_date)
+ {
+ v = false;
+ }
+ return v;
+
+ },
+ errorMessage: 'Invalid timespan',
+ errorMessageKey: ''
+ });
+
+ $.formUtils.addValidator({
+ name: 'time_span_edit',
+ validatorFunction: function (value, $el, config, languaje,
$form)
+ {
+ var v = false;
+ var end_date = $("#field_from").val();
+ var start_date = $("#field_to").val();
+ if (end_date != "" && start_date != "")
+ {
+ v = true;
+ }
+ if (end_date == start_date)
+ {
+ v = false;
+ }
+ return v;
+
+ },
+ errorMessage: 'Invalid timespan',
+ errorMessageKey: ''
+ });
+
+ $.formUtils.addValidator({
name: 'target_audience',
validatorFunction: function (value, $el, config, languaje,
$form)
{
Modified: branches/dev-syncromind-2/booking/js/booking/completed_reservation.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/completed_reservation.js
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/js/booking/completed_reservation.js
2016-09-11 20:30:50 UTC (rev 15653)
@@ -14,7 +14,7 @@
function requestWithBuildingFilter(sQuery)
{
- return 'query=' + sQuery + (seasonFilterBuildingId ?
'&filter_building_id=' + seasonFilterBuildingId : '');
+ return sQuery + (seasonFilterBuildingId ? '&filter_building_id=' +
seasonFilterBuildingId : '');
}
function export_completed_reservations()
Modified: branches/dev-syncromind-2/booking/js/booking/event.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/event.js 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/js/booking/event.js 2016-09-11
20:30:50 UTC (rev 15653)
@@ -1,6 +1,10 @@
var building_id_selection = "";
$(document).ready(function ()
{
+ $("#start_date").change(function ()
+ {
+ $("#end_date").val($("#start_date").val());
+ });
$('#field_cost_comment').hide();
$('#field_cost').on('input propertychange paste', function ()
Modified: branches/dev-syncromind-2/booking/js/booking/schedule.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/schedule.js 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/js/booking/schedule.js 2016-09-11
20:30:50 UTC (rev 15653)
@@ -15,7 +15,8 @@
var detected_lang = navigator.language || navigator.userLanguage;
var lang = {};
- if(detected_lang == 'no' || detected_lang == 'nn' || detected_lang ==
'nb' ||detected_lang == 'nb-no' || detected_lang == 'no-no' || detected_lang ==
'nn-no')
+// if(detected_lang == 'no' || detected_lang == 'nn' || detected_lang ==
'nb' ||detected_lang == 'nb-no' || detected_lang == 'no-no' || detected_lang ==
'nn-no')
+ if (window.navigator.language != "en")
{
lang = {
WEEKDAYS_FULL: [
Modified: branches/dev-syncromind-2/booking/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind-2/booking/setup/phpgw_no.lang 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/setup/phpgw_no.lang 2016-09-11
20:30:50 UTC (rev 15653)
@@ -341,6 +341,7 @@
Overlaps with existing booking booking no Overlapper med eksisterende
booking
This booking is not within the selected season booking no Denne bookingen
ligger utenfor angitt sesong
Invalid from date booking no Ugyldig fradato
+invalid to date booking no Ugyldig tildato
This booking is outside the organization's allocated time booking no
Denne bookingen ligger utenfor organisasjonens tildelte tid
Overlaps other organizations allocation booking no Overlapper med
en annen organisasjons tildeling
The booking uses resources not in the containing allocation booking no
Bookingen bruker ressurser som ikke finnes i gitt tildeling
Modified: branches/dev-syncromind-2/booking/templates/base/booking_edit.xsl
===================================================================
--- branches/dev-syncromind-2/booking/templates/base/booking_edit.xsl
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/templates/base/booking_edit.xsl
2016-09-11 20:30:50 UTC (rev 15653)
@@ -157,10 +157,10 @@
</label>
<input
class="datetime" id="field_from" name="from_" type="text"
style="display:inline-block;">
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>time_span_edit</xsl:text>
</xsl:attribute>
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'Please enter a from date')" />
+
<xsl:value-of select="php:function('lang', 'Please enter a valid from date')" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="booking/from_"/>
@@ -173,10 +173,10 @@
</label>
<input
class="datetime" id="field_to" name="to_" type="text"
style="display:inline-block;">
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>time_span_edit</xsl:text>
</xsl:attribute>
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'Please enter an end date')" />
+
<xsl:value-of select="php:function('lang', 'Please enter an valid end date')" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="booking/to_"/>
Modified: branches/dev-syncromind-2/booking/templates/base/booking_new.xsl
===================================================================
--- branches/dev-syncromind-2/booking/templates/base/booking_new.xsl
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/booking/templates/base/booking_new.xsl
2016-09-11 20:30:50 UTC (rev 15653)
@@ -133,10 +133,10 @@
</label>
<input
class="datetime pure-input-2-3" id="start_date" name="from_" type="text"
style="display:inline-block;">
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>time_span</xsl:text>
</xsl:attribute>
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'Please enter a from date')" />
+
<xsl:value-of select="php:function('lang', 'Please enter a valid from date')" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="booking/from_"/>
@@ -149,10 +149,10 @@
</label>
<input
class="datetime pure-input-2-3" id="end_date" name="to_" type="text"
style="display:inline-block;">
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
+
<xsl:text>time_span</xsl:text>
</xsl:attribute>
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="php:function('lang', 'Please enter a end date')" />
+
<xsl:value-of select="php:function('lang', 'Please enter a valid end date')" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="booking/to_"/>
Property changes on: branches/dev-syncromind-2/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607
+ /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652
Modified:
branches/dev-syncromind-2/bookingfrontend/js/bookingfrontend/schedule.js
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/js/bookingfrontend/schedule.js
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/bookingfrontend/js/bookingfrontend/schedule.js
2016-09-11 20:30:50 UTC (rev 15653)
@@ -13,7 +13,8 @@
var detected_lang = navigator.language || navigator.userLanguage;
var lang = {};
- if(detected_lang == 'no' || detected_lang == 'nn' || detected_lang ==
'nb' ||detected_lang == 'nb-no' || detected_lang == 'no-no' || detected_lang ==
'nn-no')
+// if(detected_lang == 'no' || detected_lang == 'nn' || detected_lang ==
'nb' ||detected_lang == 'nb-no' || detected_lang == 'no-no' || detected_lang ==
'nn-no')
+ if (window.navigator.language != "en")
{
lang = {
WEEKDAYS_FULL: [
Modified: branches/dev-syncromind-2/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/dev-syncromind-2/controller/inc/class.uicalendar.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/controller/inc/class.uicalendar.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -505,6 +505,19 @@
unset($location);
}
+ // Sort the data with account_lastname ascending,
account_firstname ascending
+ // Add $data as the last parameter, to sort by the
common key
+ if ($locations_list)
+ {
+ $locations_location_code = array();
+ foreach ($locations_list as $key => $row)
+ {
+ $locations_location_code[$key] =
$row['location_code'];
+ }
+ array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+ }
+
+
// Validates year. If year is not set, current year is
chosen
$year = $this->validate_year($year);
@@ -515,6 +528,7 @@
$to_date_ts = $this->get_end_date_year_ts($year);
$locations_with_calendar_array = array();
+ $locations_location_code = array();
// LOCATIONS: Process aggregated values for controls
with repeat type day or week
@@ -542,12 +556,13 @@
$year_calendar_agg = new
year_calendar_agg($control, $year, $curr_location_code,
"VIEW_LOCATIONS_FOR_CONTROL");
$calendar_array =
$year_calendar_agg->build_calendar($agg_open_cases_pr_month_array);
- $locations_with_calendar_array[] = array
- (
+ $locations_with_calendar_array[] =
array(
'location' => $location,
'calendar_array' =>
$calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+ $locations_location_code[] = $location;
+
}
// COMPONENTS: Process aggregated values for
controls with repeat type day or week
@@ -612,12 +627,12 @@
$year_calendar = new
year_calendar($control, $year, null, $curr_location_code, "location");
$calendar_array =
$year_calendar->build_calendar($check_lists_array);
- $locations_with_calendar_array[] = array
- (
+ $locations_with_calendar_array[] =
array(
'location' => $location,
'calendar_array' =>
$calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+ $locations_location_code[] = $location;
}
foreach ($components_for_control_array as
$component)
@@ -691,6 +706,7 @@
$my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array = year_calendar::get_heading_array();
+ array_multisort($locations_location_code, SORT_ASC,
$locations_with_calendar_array);
$data = array
(
@@ -745,6 +761,7 @@
$bookmark_locations[] = $location_code;
}
+ $locations_list = array();
if (is_numeric($control_id) & $control_id > 0)
{
$locations_for_control_array =
$this->so_control->get_locations_for_control($control_id);
@@ -762,6 +779,17 @@
reset($locations_for_control_array);
unset($location);
}
+ // Sort the data with account_lastname ascending,
account_firstname ascending
+ // Add $data as the last parameter, to sort by the
common key
+ if ($locations_list)
+ {
+ $locations_location_code = array();
+ foreach ($locations_list as $key => $row)
+ {
+ $locations_location_code[$key] =
$row['location_code'];
+ }
+ array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+ }
// Validates year. If year is not set, current year is
chosen
$year = $this->validate_year($year);
@@ -776,7 +804,7 @@
$to_date_ts =
month_calendar::get_next_start_date_month_ts($year, intval($month));
$locations_with_calendar_array = array();
-
+ $locations_location_code = array();
foreach ($locations_for_control_array as $location)
{
$curr_location_code =
$location['location_code'];
@@ -798,6 +826,9 @@
'calendar_array' => $calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+
+ $locations_location_code[] = $location;
+
}
foreach ($components_for_control_array as $component)
@@ -868,6 +899,8 @@
$heading_array =
month_calendar::get_heading_array($year, $month);
+ array_multisort($locations_location_code, SORT_ASC,
$locations_with_calendar_array);
+
$data = array
(
'control' => $control->toArray(),
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.db_adodb.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.db_adodb.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -628,7 +628,7 @@
{
if ($strip_slashes ||
($this->auto_stripslashes && ! $strip_slashes))
{
- return
htmlspecialchars_decode(stripslashes($this->resultSet->fields[$name]));
+ return
htmlspecialchars_decode(stripslashes($this->resultSet->fields[$name]),ENT_QUOTES);
}
else
{
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.db_pdo.inc.php 2016-09-11
20:30:50 UTC (rev 15653)
@@ -831,7 +831,7 @@
{
if ($strip_slashes ||
($this->auto_stripslashes && ! $strip_slashes))
{
- return
htmlspecialchars_decode(stripslashes(str_replace(array('(;',
');'), array('(', ')'), $this->Record[$name])));
+ return
htmlspecialchars_decode(stripslashes(str_replace(array('(;',
');'), array('(', ')'), $this->Record[$name])),ENT_QUOTES);
// return
htmlspecialchars_decode(stripslashes($this->Record[$name]));
}
else
Modified: branches/dev-syncromind-2/phpgwapi/inc/class.log_message.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.log_message.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.log_message.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -61,6 +61,8 @@
$this->severity = $parms['severity'];
$this->msg = trim($etext);
}
+
+ $this->severity = $this->severity ? $this->severity :
'E';
foreach ( $parray as $key => $val )
{
Modified: branches/dev-syncromind-2/property/inc/class.solocation.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.solocation.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/property/inc/class.solocation.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -289,13 +289,13 @@
{
$sql = "SELECT * FROM phpgw_cust_attribute "
. " WHERE location_id = {$location_id}"
- . " AND custom = 1 OR column_name = 'category'";
+ . " AND (custom = 1 OR column_name =
'category')";
$this->db->query($sql, __LINE__, __FILE__);
+ $attribs = array();
while ($this->db->next_record())
{
- $attribs = array();
$id = $this->db->f('id');
$attribs[$id] = array
(
Modified: branches/dev-syncromind-2/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uitts.inc.php 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/property/inc/class.uitts.inc.php 2016-09-11
20:30:50 UTC (rev 15653)
@@ -1469,8 +1469,8 @@
'lang_no_user' => lang('Select user'),
'lang_user_statustext' => lang('Select the user
the selection belongs to. To do not use a user select NO USER'),
'select_user_name' => 'values[assignedto]',
- 'user_list' =>
$this->bocommon->get_user_list_right2('select', 4, $values['assignedto'],
$this->acl_location),
-// 'user_list' =>
$this->_get_user_list($values['assignedto']),
+// 'user_list' =>
$this->bocommon->get_user_list_right2('select', 4, $values['assignedto'],
$this->acl_location),
+ 'user_list' =>
$this->_get_user_list($values['assignedto']),
'disable_userassign_on_add' =>
isset($this->bo->config->config_data['tts_disable_userassign_on_add']) ?
$this->bo->config->config_data['tts_disable_userassign_on_add'] : '',
'lang_no_group' => lang('No group'),
'group_list' =>
$this->bo->get_group_list($values['group_id']),
@@ -2837,8 +2837,8 @@
'lang_user_statustext' => lang('Select the user
the selection belongs to. To do not use a user select NO USER'),
'select_user_name' => 'values[assignedto]',
'value_assignedto_id' => $ticket['assignedto'],
- 'user_list' =>
$this->bocommon->get_user_list_right2('select', 4, $ticket['assignedto'],
$this->acl_location),
-// 'user_list' =>
$this->_get_user_list($ticket['assignedto']),
+// 'user_list' =>
$this->bocommon->get_user_list_right2('select', 4, $ticket['assignedto'],
$this->acl_location),
+ 'user_list' =>
$this->_get_user_list($ticket['assignedto']),
'lang_no_group' => lang('No group'),
'group_list' =>
$this->bo->get_group_list($ticket['group_id']),
'select_group_name' => 'values[group_id]',
Modified:
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
===================================================================
---
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2016-09-11 19:59:39 UTC (rev 15652)
+++
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -260,6 +260,13 @@
$external_project = trim($data[0]);
$prosjektstatus = trim($data[1]);
$order_id = trim($data[2]);
+
+ if(!ctype_digit($order_id))
+ {
+ $this->receipt['error'][] = array('msg' =>
"Feil format på bestillingsnummeret: {$order_id}");
+ return false;
+
+ }
$diff_actual_cost = (float)trim($data[3]);
$this->db->query("SELECT id FROM fm_tts_tickets WHERE
order_id= '{$order_id}'", __LINE__, __FILE__);
Modified: branches/dev-syncromind-2/property/js/portico/tts.view.js
===================================================================
--- branches/dev-syncromind-2/property/js/portico/tts.view.js 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/property/js/portico/tts.view.js 2016-09-11
20:30:50 UTC (rev 15653)
@@ -262,7 +262,7 @@
relation_id: id,
relation_type: 'ticket',
query: location_code, //defined in xsl
- clear_state: 1,
+ clear_state: 1
};
var strURL = phpGWLink('index.php', oArgs);
window.open(strURL, '_self');
@@ -422,7 +422,7 @@
{
required = '';
- htmlString += "<tr><td>"
+ htmlString += "<tr><td>";
if (obj[i].required == true)
{
Modified: branches/dev-syncromind-2/rental/inc/class.soprice_item.inc.php
===================================================================
--- branches/dev-syncromind-2/rental/inc/class.soprice_item.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/rental/inc/class.soprice_item.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -365,6 +365,9 @@
*/
function add_price_item( $contract_id, $price_item_id )
{
+ $location_factor = 1;
+ $standard_factor = 1;
+ $custom_factor = 1;
$contract =
rental_socontract::get_instance()->get_single($contract_id);
$composites = $contract->get_composites();
foreach ($composites as $composite_id => $composite)
@@ -373,19 +376,29 @@
break;
}
- $custom_factor =
$composite_obj->get_custom_prize_factor();
- $custom_factor = $custom_factor ? (float)$custom_factor
: 1;
+ if(!$composite_obj)
+ {
+ $GLOBALS['phpgw']->log->message(array(
+ 'text' =>
"rental_soprice_item::add_price_item() : Contract %1 is missing composite ",
+ 'p1' => $contract_id,
+ 'line' => __LINE__,
+ 'file' => __FILE__
+ ));
+ }
+ else
+ {
+ $custom_factor =
$composite_obj->get_custom_prize_factor();
+ $custom_factor = $custom_factor ?
(float)$custom_factor : 1;
+ $location_info =
ExecMethod('property.bogeneric.read', array(
+ 'location_info'=> array('type' =>
'location_factor'),
+ 'custom_filter' =>
array('part_of_town_id = ' . (int)$composite_obj->get_part_of_town_id())
+ )
+ );
+ $location_factor =
(float)abs($location_info[0]['factor']) > 0 ?
(float)$location_info[0]['factor'] : 1;
+ $standard_info =
ExecMethod('property.bogeneric.read_single', array('type' =>
'composite_standard', 'id' => $composite_obj->get_standard_id()));
+ $standard_factor =
(float)abs($standard_info['factor']) > 0 ? (float)$standard_info['factor'] : 1;
+ }
- $location_info = ExecMethod('property.bogeneric.read',
array(
- 'location_info'=> array('type' =>
'location_factor'),
- 'custom_filter' => array('part_of_town_id = ' .
(int)$composite_obj->get_part_of_town_id())
- )
- );
- $location_factor =
(float)abs($location_info[0]['factor']) > 0 ?
(float)$location_info[0]['factor'] : 1;
-
- $standard_info =
ExecMethod('property.bogeneric.read_single', array('type' =>
'composite_standard', 'id' => $composite_obj->get_standard_id()));
- $standard_factor = (float)abs($standard_info['factor'])
> 0 ? (float)$standard_info['factor'] : 1;
-
$factor = $location_factor * $standard_factor *
$custom_factor;
$factor = $factor ? (float)$factor : 1;
$price_item = $this->get_single($price_item_id);
Modified: branches/dev-syncromind-2/rental/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/rental/inc/class.uiapplication.inc.php
2016-09-11 19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/rental/inc/class.uiapplication.inc.php
2016-09-11 20:30:50 UTC (rev 15653)
@@ -335,7 +335,7 @@
'attrib_name' => 'descr')
),
'district_list' => array('options' =>
$bocommon->select_district_list('', $application->district_id)),
- 'composite_type_list' => array('options' =>
$bocommon->select_list($application->composite_type, $composite_types)),
+ 'composite_type_list' => array('options' =>
$bocommon->select_list($application->composite_type_id, $composite_types)),
'payment_method_list' => array('options' =>
$bocommon->select_list($application->payment_method, $payment_methods)),
'status_list' => array('options' =>
$this->get_status_options($application->status)),
'mode' => $mode,
Modified: branches/dev-syncromind-2/sms/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind-2/sms/setup/setup.inc.php 2016-09-11 19:59:39 UTC
(rev 15652)
+++ branches/dev-syncromind-2/sms/setup/setup.inc.php 2016-09-11 20:30:50 UTC
(rev 15653)
@@ -9,7 +9,7 @@
* @version $Id$
*/
$setup_info['sms']['name'] = 'sms';
- $setup_info['sms']['version'] = '0.9.17.513';
+ $setup_info['sms']['version'] = '0.9.17.514';
$setup_info['sms']['app_order'] = 8;
$setup_info['sms']['enable'] = 1;
$setup_info['sms']['app_group'] = 'office';
Modified: branches/dev-syncromind-2/sms/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind-2/sms/setup/tables_current.inc.php 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/sms/setup/tables_current.inc.php 2016-09-11
20:30:50 UTC (rev 15653)
@@ -214,7 +214,7 @@
'in_sender' => array('type' => 'varchar',
'precision' => 20, 'nullable' => False),
'in_masked' => array('type' => 'varchar',
'precision' => 20, 'nullable' => False),
'in_code' => array('type' => 'varchar',
'precision' => 20, 'nullable' => False),
- 'in_msg' => array('type' => 'varchar',
'precision' => 200, 'nullable' => False),
+ 'in_msg' => array('type' => 'text', 'nullable'
=> False),
'in_datetime' => array('type' => 'timestamp',
'nullable' => False, 'default' => 'current_timestamp')
),
'pk' => array('in_id'),
@@ -287,7 +287,7 @@
'in_id' => array('type' => 'auto', 'nullable'
=> False),
'in_sender' => array('type' => 'varchar',
'precision' => 20, 'nullable' => False),
'in_uid' => array('type' => 'int', 'precision'
=> 4, 'nullable' => False, 'default' => '0'),
- 'in_msg' => array('type' => 'varchar',
'precision' => 200, 'nullable' => False),
+ 'in_msg' => array('type' => 'text', 'nullable'
=> False),
'in_datetime' => array('type' => 'timestamp',
'nullable' => False, 'default' => 'current_timestamp'),
'in_hidden' => array('type' => 'int',
'precision' => 2, 'nullable' => False,
'default' => '0')
Modified: branches/dev-syncromind-2/sms/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind-2/sms/setup/tables_update.inc.php 2016-09-11
19:59:39 UTC (rev 15652)
+++ branches/dev-syncromind-2/sms/setup/tables_update.inc.php 2016-09-11
20:30:50 UTC (rev 15653)
@@ -587,7 +587,7 @@
break;
}
}
-
+
$receipt = $custom_config->add_attrib(array(
'section_id' => $section_id,
'input_type' => 'text',
@@ -603,3 +603,29 @@
}
}
+ /**
+ * Update sms version from 0.9.17.513 to 0.9.17.514
+ *
+ */
+ $test[] = '0.9.17.513';
+
+ function sms_upgrade0_9_17_513()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_sms_tblsmsincoming',
'in_msg', array(
+ 'type' => 'text',
+ 'nullable' => false
+ ));
+
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_sms_tbluserinbox', 'in_msg',
array(
+ 'type' => 'text',
+ 'nullable' => false
+ ));
+
+ if ($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['sms']['currentver'] =
'0.9.17.514';
+ return $GLOBALS['setup_info']['sms']['currentver'];
+ }
+ }
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15653] Syncromind: merge 15612:15652 from trunk,
sigurdne <=