[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15631] Stable: Merge 15620:15630 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15631] Stable: Merge 15620:15630 from trunk |
Date: |
Thu, 8 Sep 2016 15:07:45 +0000 (UTC) |
Revision: 15631
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15631
Author: sigurdne
Date: 2016-09-08 15:07:45 +0000 (Thu, 08 Sep 2016)
Log Message:
-----------
Stable: Merge 15620:15630 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
branches/Version-2_0-branch/booking/inc/class.socommon.inc.php
branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
branches/Version-2_0-branch/booking/inc/class.uiresource.inc.php
branches/Version-2_0-branch/booking/js/booking/booking.js
branches/Version-2_0-branch/booking/js/booking/event.js
branches/Version-2_0-branch/booking/js/booking/schedule.js
branches/Version-2_0-branch/booking/setup/phpgw_no.lang
branches/Version-2_0-branch/booking/templates/base/booking_edit.xsl
branches/Version-2_0-branch/booking/templates/base/booking_new.xsl
branches/Version-2_0-branch/bookingfrontend/js/bookingfrontend/schedule.js
branches/Version-2_0-branch/phpgwapi/inc/class.db_adodb.inc.php
branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
branches/Version-2_0-branch/phpgwapi/inc/class.log_message.inc.php
branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
branches/Version-2_0-branch/property/js/portico/tts.view.js
branches/Version-2_0-branch/rental/inc/class.soprice_item.inc.php
branches/Version-2_0-branch/sms/setup/setup.inc.php
branches/Version-2_0-branch/sms/setup/tables_current.inc.php
branches/Version-2_0-branch/sms/setup/tables_update.inc.php
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/booking/
branches/Version-2_0-branch/bookingfrontend/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630
Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617
+ /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630
Modified: branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/inc/class.sobooking.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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');
Modified: branches/Version-2_0-branch/booking/inc/class.socommon.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.socommon.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/inc/class.socommon.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiresource.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/inc/class.uiresource.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/js/booking/booking.js
===================================================================
--- branches/Version-2_0-branch/booking/js/booking/booking.js 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/js/booking/booking.js 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/js/booking/event.js
===================================================================
--- branches/Version-2_0-branch/booking/js/booking/event.js 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/js/booking/event.js 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/js/booking/schedule.js
===================================================================
--- branches/Version-2_0-branch/booking/js/booking/schedule.js 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/js/booking/schedule.js 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/booking/setup/phpgw_no.lang 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/setup/phpgw_no.lang 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/templates/base/booking_edit.xsl
===================================================================
--- branches/Version-2_0-branch/booking/templates/base/booking_edit.xsl
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/templates/base/booking_edit.xsl
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/booking/templates/base/booking_new.xsl
===================================================================
--- branches/Version-2_0-branch/booking/templates/base/booking_new.xsl
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/booking/templates/base/booking_new.xsl
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617
+ /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630
Modified:
branches/Version-2_0-branch/bookingfrontend/js/bookingfrontend/schedule.js
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/js/bookingfrontend/schedule.js
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/bookingfrontend/js/bookingfrontend/schedule.js
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.db_adodb.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.db_adodb.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/phpgwapi/inc/class.log_message.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.log_message.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.log_message.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/phpgwapi/js/jquery/common.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-09-08
15:07:45 UTC (rev 15631)
@@ -1275,6 +1275,19 @@
function createTableSchedule(d, u, c, r, cl, dt)
{
+// 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 (window.navigator.language != "en")
+ {
+ lang = {free: 'Ledig'};
+ }
+ else
+ {
+ lang = {free: 'free'};
+ }
+
var container = document.getElementById(d);
var xtable = document.createElement('table');
var tableHead = document.createElement('thead');
@@ -1419,7 +1432,7 @@
}
else
{
-
tableBodyTrTdText = "free";
+
tableBodyTrTdText = lang.free;
classes += "
free";
tableBodyTrTd.setAttribute('class', classes);
if
(vc['formatter'] == "frontendScheduleDateColumn")
Modified: branches/Version-2_0-branch/property/js/portico/tts.view.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/tts.view.js 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/property/js/portico/tts.view.js 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/rental/inc/class.soprice_item.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.soprice_item.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/rental/inc/class.soprice_item.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/sms/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/sms/setup/setup.inc.php 2016-09-08 15:06:00 UTC
(rev 15630)
+++ branches/Version-2_0-branch/sms/setup/setup.inc.php 2016-09-08 15:07:45 UTC
(rev 15631)
@@ -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/Version-2_0-branch/sms/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/sms/setup/tables_current.inc.php
2016-09-08 15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/sms/setup/tables_current.inc.php
2016-09-08 15:07:45 UTC (rev 15631)
@@ -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/Version-2_0-branch/sms/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/sms/setup/tables_update.inc.php 2016-09-08
15:06:00 UTC (rev 15630)
+++ branches/Version-2_0-branch/sms/setup/tables_update.inc.php 2016-09-08
15:07:45 UTC (rev 15631)
@@ -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] [15631] Stable: Merge 15620:15630 from trunk,
sigurdne <=