[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14954] rental: prepare for php 7
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14954] rental: prepare for php 7 |
Date: |
Sat, 30 Apr 2016 12:02:11 +0000 |
Revision: 14954
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14954
Author: sigurdne
Date: 2016-04-30 12:02:10 +0000 (Sat, 30 Apr 2016)
Log Message:
-----------
rental: prepare for php 7
Modified Paths:
--------------
trunk/rental/inc/SnappyMedia.php
trunk/rental/inc/class.bofellesdata.inc.php
trunk/rental/inc/class.soadjustment.inc.php
trunk/rental/inc/class.sobilling.inc.php
trunk/rental/inc/class.sobilling_info.inc.php
trunk/rental/inc/class.socommon.inc.php
trunk/rental/inc/class.socomposite.inc.php
trunk/rental/inc/class.socontract.inc.php
trunk/rental/inc/class.socontract_price_item.inc.php
trunk/rental/inc/class.sodocument.inc.php
trunk/rental/inc/class.soinvoice.inc.php
trunk/rental/inc/class.soinvoice_price_item.inc.php
trunk/rental/inc/class.sonotification.inc.php
trunk/rental/inc/class.soparty.inc.php
trunk/rental/inc/class.soprice_item.inc.php
trunk/rental/inc/class.sounit.inc.php
trunk/rental/inc/class.soworkbench_notification.inc.php
trunk/rental/inc/class.uicontract.inc.php
trunk/rental/inc/class.uiprice_item.inc.php
trunk/rental/inc/model/class.adjustment.inc.php
trunk/rental/inc/model/class.billing.inc.php
trunk/rental/inc/model/class.billing_info.inc.php
trunk/rental/inc/model/class.composite.inc.php
trunk/rental/inc/model/class.contract.inc.php
trunk/rental/inc/model/class.contract_price_item.inc.php
trunk/rental/inc/model/class.invoice_price_item.inc.php
trunk/rental/inc/model/class.model.inc.php
trunk/rental/inc/model/class.party.inc.php
trunk/rental/inc/model/class.price_item.inc.php
trunk/rental/templates/base/party.xsl
Modified: trunk/rental/inc/SnappyMedia.php
===================================================================
--- trunk/rental/inc/SnappyMedia.php 2016-04-30 00:23:17 UTC (rev 14953)
+++ trunk/rental/inc/SnappyMedia.php 2016-04-30 12:02:10 UTC (rev 14954)
@@ -52,7 +52,7 @@
*
* @param string Url of the page
* @param string Path of the future image
- * @return boolean True if success
+ * @return bool True if success
*/
public function save( $url, $path )
{
Modified: trunk/rental/inc/class.bofellesdata.inc.php
===================================================================
--- trunk/rental/inc/class.bofellesdata.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.bofellesdata.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -172,7 +172,7 @@
return;
}
- $sql = "SELECT $column FROM $table WHERE
V_ORG_ENHET.RESULTATENHET = $result_unit";
+ $sql = "SELECT $column FROM $table WHERE
V_ORG_ENHET.RESULTATENHET = '$result_unit'";
if ($level)
{
$sql = "$sql AND V_ORG_ENHET.ORG_NIVAA
= $level";
Modified: trunk/rental/inc/class.soadjustment.inc.php
===================================================================
--- trunk/rental/inc/class.soadjustment.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.soadjustment.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -30,7 +30,7 @@
return self::$so;
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.sobilling.inc.php
===================================================================
--- trunk/rental/inc/class.sobilling.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.sobilling.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -31,7 +31,7 @@
return self::$so;
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
if ($sort_field == 'description')
@@ -330,7 +330,7 @@
* @param $billing_term
* @param $year
* @param $month
- * @return boolean true if the period has been billed before,
false if not.
+ * @return bool true if the period has been billed before,
false if not.
*/
public function has_been_billed( $contract_type, $billing_term,
$year, $month )
{
Modified: trunk/rental/inc/class.sobilling_info.inc.php
===================================================================
--- trunk/rental/inc/class.sobilling_info.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/class.sobilling_info.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -28,7 +28,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.socommon.inc.php
===================================================================
--- trunk/rental/inc/class.socommon.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.socommon.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -23,7 +23,7 @@
/**
* Begin transaction
*
- * @return integer|boolean current transaction id
+ * @return integer|bool current transaction id
*/
public function transaction_begin()
{
@@ -33,7 +33,7 @@
/**
* Complete the transaction
*
- * @return boolean True if sucessful, False if fails
+ * @return bool True if sucessful, False if fails
*/
public function transaction_commit()
{
@@ -43,7 +43,7 @@
/**
* Rollback the current transaction
*
- * @return boolean True if sucessful, False if fails
+ * @return bool True if sucessful, False if fails
*/
public function transaction_abort()
{
@@ -91,16 +91,16 @@
{
if ($type == 'bool')
{
- return (boolean)$value;
+ return (bool)$value;
}
+ elseif ($type == 'int')
+ {
+ return (int)$value;
+ }
elseif ($value === null || $value == 'NULL')
{
return null;
}
- elseif ($type == 'int')
- {
- return intval($value);
- }
elseif ($type == 'float')
{
return floatval($value);
@@ -140,7 +140,7 @@
*/
public function get_single( int $id )
{
- $objects = $this->get(null, null, null, null, null,
null, array($this->get_id_field_name() => $id));
+ $objects = $this->get(0, 0, '', false, '', '',
array($this->get_id_field_name() => $id));
if (count($objects) > 0)
{
$keys = array_keys($objects);
@@ -163,7 +163,7 @@
* @param $start_index int with index of first object.
* @param $num_of_objects int with max number of objects to
return.
* @param $sort_field string representing the object field to
sort on.
- * @param $ascending boolean true for ascending sort on sort
field, false
+ * @param $ascending bool true for ascending sort on sort
field, false
* for descending.
* @param $search_for string with free text search query.
* @param $search_type string with the query type.
@@ -171,7 +171,7 @@
* @return array of objects. May return an empty
* array, never null. The array keys are the respective index
numbers.
*/
- public function get( int $start_index, int $num_of_objects,
string $sort_field, boolean $ascending, string $search_for, string
$search_type, array $filters )
+ public function get( int $start_index, int $num_of_objects,
string $sort_field, bool $ascending, string $search_for, string $search_type,
array $filters )
{
$results = array(); // Array to store result objects
$map = array(); // Array to hold number of records per
target object
@@ -347,7 +347,7 @@
*/
public function get_count( string $search_for, string
$search_type, array $filters )
{
- return $this->get_query_count($this->get_query(null,
null, $search_for, $search_type, $filters, true));
+ return $this->get_query_count($this->get_query('',
false, $search_for, $search_type, $filters, true));
}
/**
@@ -364,16 +364,16 @@
* @param $start_index int with index of first object.
* @param $num_of_objects int with max number of objects to
return.
* @param $sort_field string representing the object field to
sort on.
- * @param $ascending boolean true for ascending sort on sort
field, false
+ * @param $ascending bool true for ascending sort on sort
field, false
* for descending.
* @param $search_for string with free text search query.
* @param $search_type string with the query type.
* @param $filters array with key => value of filters.
- * @param $return_count boolean telling to return only the
count of the
+ * @param $return_count bool telling to return only the count
of the
* matching objects, or the objects themself.
* @return string with SQL.
*/
- protected abstract function get_query( string $sort_field,
boolean $ascending, string $search_for, string $search_type, array $filters,
boolean $return_count );
+ protected abstract function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count );
protected abstract function populate( int $object_id, &$object
);
Modified: trunk/rental/inc/class.socomposite.inc.php
===================================================================
--- trunk/rental/inc/class.socomposite.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.socomposite.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -25,7 +25,7 @@
return self::$so;
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$location_id_into =
$GLOBALS['phpgw']->locations->get_id('rental', '.RESPONSIBILITY.INTO');
Modified: trunk/rental/inc/class.socontract.inc.php
===================================================================
--- trunk/rental/inc/class.socontract.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.socontract.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -65,7 +65,7 @@
*
* @see rental/inc/rental_socommon#get_query($sort_field,
$ascending, $search_for, $search_type, $filters, $return_count)
*/
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- trunk/rental/inc/class.socontract_price_item.inc.php 2016-04-30
00:23:17 UTC (rev 14953)
+++ trunk/rental/inc/class.socontract_price_item.inc.php 2016-04-30
12:02:10 UTC (rev 14954)
@@ -25,7 +25,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.sodocument.inc.php
===================================================================
--- trunk/rental/inc/class.sodocument.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.sodocument.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -43,7 +43,7 @@
return $ret;
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.soinvoice.inc.php
===================================================================
--- trunk/rental/inc/class.soinvoice.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.soinvoice.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -25,7 +25,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
if (isset($filters[$this->get_id_field_name()]))
Modified: trunk/rental/inc/class.soinvoice_price_item.inc.php
===================================================================
--- trunk/rental/inc/class.soinvoice_price_item.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/class.soinvoice_price_item.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -25,7 +25,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
if (isset($filters[$this->get_id_field_name()]))
Modified: trunk/rental/inc/class.sonotification.inc.php
===================================================================
--- trunk/rental/inc/class.sonotification.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/class.sonotification.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -28,7 +28,7 @@
return 'notification_id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.soparty.inc.php
===================================================================
--- trunk/rental/inc/class.soparty.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.soparty.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -61,14 +61,14 @@
* the party is involved in.
*
* @param string $sort_field
- * @param boolean $ascending
+ * @param bool $ascending
* @param string $search_for
* @param string $search_type
* @param array $filters
- * @param boolean $return_count
+ * @param bool $return_count
* @return string SQL
*/
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
@@ -336,7 +336,7 @@
* Update the database values for an existing party object.
*
* @param $party the party to be updated
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
function update( $party )
{
Modified: trunk/rental/inc/class.soprice_item.inc.php
===================================================================
--- trunk/rental/inc/class.soprice_item.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.soprice_item.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -429,7 +429,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.sounit.inc.php
===================================================================
--- trunk/rental/inc/class.sounit.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.sounit.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -48,7 +48,7 @@
return self::$so;
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
$filter_clauses = array();
Modified: trunk/rental/inc/class.soworkbench_notification.inc.php
===================================================================
--- trunk/rental/inc/class.soworkbench_notification.inc.php 2016-04-30
00:23:17 UTC (rev 14953)
+++ trunk/rental/inc/class.soworkbench_notification.inc.php 2016-04-30
12:02:10 UTC (rev 14954)
@@ -24,7 +24,7 @@
return 'id';
}
- protected function get_query( string $sort_field, boolean
$ascending, string $search_for, string $search_type, array $filters, boolean
$return_count )
+ protected function get_query( string $sort_field, bool
$ascending, string $search_for, string $search_type, array $filters, bool
$return_count )
{
$clauses = array('1=1');
Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.uicontract.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -2495,7 +2495,7 @@
* Public function. Add a composite to a contract.
* @param HTTP::contract_id the contract id
* @param HTTP::composite_id the composite id
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
public function add_composite()
{
@@ -2527,7 +2527,7 @@
* Public function. Remove a composite from a contract.
* @param HTTP::contract_id the contract id
* @param HTTP::composite_id the composite id
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
public function remove_composite()
{
@@ -2559,7 +2559,7 @@
* Public function. Add a price item to a contract
* @param HTTP::contract_id the contract id
* @param HTTP::price_item_id the price item id
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
public function add_price_item()
{
@@ -2593,7 +2593,7 @@
* Public function. Remove a price item from a contract
* @param HTTP::contract_id the contract id
* @param HTTP::price_item_id the price item id
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
public function remove_price_item()
{
@@ -2625,7 +2625,7 @@
* Public function. Reset a price item on a contract
* @param HTTP::contract_id the contract id
* @param HTTP::price_item_id the price item id
- * @return boolean true if successful, false otherwise
+ * @return bool true if successful, false otherwise
*/
public function reset_price_item()
{
Modified: trunk/rental/inc/class.uiprice_item.inc.php
===================================================================
--- trunk/rental/inc/class.uiprice_item.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/class.uiprice_item.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -482,6 +482,7 @@
break;
default:
//$filters = array('price_item_status'
=> 'active','responsibility_id' => phpgw::get_var('responsibility_id'));
+ $filters = array();
$result_objects =
rental_soprice_item::get_instance()->get($start_index, $num_of_objects,
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
$object_count =
rental_soprice_item::get_instance()->get_count($search_for, $search_type,
$filters);
break;
Modified: trunk/rental/inc/model/class.adjustment.inc.php
===================================================================
--- trunk/rental/inc/model/class.adjustment.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.adjustment.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -104,7 +104,7 @@
public function set_is_manual( $is_manual )
{
- $this->is_manual = (boolean)$is_manual;
+ $this->is_manual = (bool)$is_manual;
}
public function get_is_executed()
@@ -119,7 +119,7 @@
public function set_is_executed( $is_executed )
{
- $this->is_executed = (boolean)$is_executed;
+ $this->is_executed = (bool)$is_executed;
}
public function get_extra_adjustment()
@@ -134,7 +134,7 @@
public function set_extra_adjustment( $extra_adjustment )
{
- $this->extra_adjustment = (boolean)$extra_adjustment;
+ $this->extra_adjustment = (bool)$extra_adjustment;
}
public function get_interval()
Modified: trunk/rental/inc/model/class.billing.inc.php
===================================================================
--- trunk/rental/inc/model/class.billing.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.billing.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -123,7 +123,7 @@
public function set_success( $success )
{
- $this->success = (boolean)$success;
+ $this->success = (bool)$success;
}
public function set_timestamp_commit( $timestamp_commit )
@@ -140,7 +140,7 @@
* Convenience method for checking if a billing job has been
commited or
* not. Checks if the timestamp for commit has been set.
*
- * @return boolean true if job has been commited, false if not.
+ * @return bool true if job has been commited, false if not.
*/
public function is_commited()
{
@@ -157,9 +157,9 @@
$this->created_by = (int)$created_by;
}
- public function set_deleted( boolean $deleted )
+ public function set_deleted( bool $deleted )
{
- $this->deleted = (boolean)$deleted;
+ $this->deleted = (bool)$deleted;
}
public function is_deleted()
@@ -177,9 +177,9 @@
return $this->has_generated_export;
}
- public function set_generated_export( boolean
$has_generated_export )
+ public function set_generated_export( bool
$has_generated_export )
{
- $this->has_generated_export =
(boolean)$has_generated_export;
+ $this->has_generated_export =
(bool)$has_generated_export;
}
public function set_export_format( $export_format )
Modified: trunk/rental/inc/model/class.billing_info.inc.php
===================================================================
--- trunk/rental/inc/model/class.billing_info.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.billing_info.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -84,9 +84,9 @@
$this->month = $month;
}
- public function set_deleted( boolean $deleted )
+ public function set_deleted( bool $deleted )
{
- $this->deleted = (boolean)$deleted;
+ $this->deleted = (bool)$deleted;
}
public function is_deleted()
Modified: trunk/rental/inc/model/class.composite.inc.php
===================================================================
--- trunk/rental/inc/model/class.composite.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.composite.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -106,7 +106,7 @@
* Checks if a unit is already added to the composite.
*
* @param $location_code string with location code.
- * @return boolean true if unit is added, false if not.
+ * @return bool true if unit is added, false if not.
*/
public function contains_unit( $location_code )
{
@@ -124,7 +124,7 @@
* Checks if a contract is already added to the composite.
*
* @param $contract_id int with contract id.
- * @return boolean true if contract is added, false if not.
+ * @return bool true if contract is added, false if not.
*/
public function contains_contract( $contract_id )
{
@@ -183,7 +183,7 @@
public function set_is_active( $is_active )
{
- $this->is_active = (boolean)$is_active;
+ $this->is_active = (bool)$is_active;
}
public function is_active()
Modified: trunk/rental/inc/model/class.contract.inc.php
===================================================================
--- trunk/rental/inc/model/class.contract.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.contract.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -784,7 +784,7 @@
// The contract is active only parts of the current
year, we must calculate the total sum using the billing logic
$total_sum = 0; // Holding the total price of the
contract current year
- $contract_price_items =
rental_socontract_price_item::get_instance()->get(null, null, null, null, null,
null, array(
+ $contract_price_items =
rental_socontract_price_item::get_instance()->get(0, 0, '', false, '', '',
array(
'contract_id' => $this->get_id()));
@@ -1031,7 +1031,7 @@
public function set_adjustable( $adjustable )
{
- $this->adjustable = (boolean)$adjustable;
+ $this->adjustable = (bool)$adjustable;
}
public function is_adjustable()
@@ -1200,7 +1200,7 @@
public function set_publish_comment( $publish_comment )
{
- $this->publish_comment = (boolean)$publish_comment;
+ $this->publish_comment = (bool)$publish_comment;
}
/**
Modified: trunk/rental/inc/model/class.contract_price_item.inc.php
===================================================================
--- trunk/rental/inc/model/class.contract_price_item.inc.php 2016-04-30
00:23:17 UTC (rev 14953)
+++ trunk/rental/inc/model/class.contract_price_item.inc.php 2016-04-30
12:02:10 UTC (rev 14954)
@@ -123,7 +123,7 @@
* Returns true if the price item is active at the given date,
false otherwise
*
* @param $date the date to check
- * @return boolean
+ * @return bool
*/
public function is_active_at( $date )
{
@@ -212,7 +212,7 @@
public function set_is_billed( $is_billed )
{
- $this->is_billed = (boolean)$is_billed;
+ $this->is_billed = (bool)$is_billed;
}
public function is_billed()
@@ -222,7 +222,7 @@
public function set_is_one_time( $is_one_time )
{
- $this->is_one_time = (boolean)$is_one_time;
+ $this->is_one_time = (bool)$is_one_time;
}
public function is_one_time()
Modified: trunk/rental/inc/model/class.invoice_price_item.inc.php
===================================================================
--- trunk/rental/inc/model/class.invoice_price_item.inc.php 2016-04-30
00:23:17 UTC (rev 14953)
+++ trunk/rental/inc/model/class.invoice_price_item.inc.php 2016-04-30
12:02:10 UTC (rev 14954)
@@ -21,14 +21,14 @@
protected $timestamp_end; // End date for the given invoice
public static $so;
- public function __construct( int $decimals, int $id, int
$invoice_id, string $title, string $agresso_id, boolean $is_area, float
$price_per_year, float $area, int $count, int $timestamp_start, int
$timestamp_end )
+ public function __construct( int $decimals, int $id, int
$invoice_id, string $title, string $agresso_id, bool $is_area, float
$price_per_year, float $area, int $count, int $timestamp_start, int
$timestamp_end )
{
$this->decimals = (int)$decimals;
$this->id = (int)$id;
$this->invoice_id = (int)$invoice_id;
$this->title = $title;
$this->agresso_id = $agresso_id;
- $this->is_area = (boolean)$is_area;
+ $this->is_area = (bool)$is_area;
$this->price_per_year = (float)$price_per_year;
$this->area = (float)$area;
$this->count = (int)$count;
@@ -47,9 +47,9 @@
return $this->invoice_id;
}
- public function set_is_area( boolean $is_area )
+ public function set_is_area( bool $is_area )
{
- $this->is_area = (boolean)$is_area;
+ $this->is_area = (bool)$is_area;
$this->total_price = null; // Needs to be re-calculated
}
Modified: trunk/rental/inc/model/class.model.inc.php
===================================================================
--- trunk/rental/inc/model/class.model.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/model/class.model.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -100,7 +100,7 @@
* in order to validate against the standard database rules.
The subclasses can in addition
* add their own specific validation logic.
*
- * @return boolean true if the object is valid, false otherwise
+ * @return bool true if the object is valid, false otherwise
*/
public function validates()
{
Modified: trunk/rental/inc/model/class.party.inc.php
===================================================================
--- trunk/rental/inc/model/class.party.inc.php 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/inc/model/class.party.inc.php 2016-04-30 12:02:10 UTC (rev
14954)
@@ -438,7 +438,7 @@
}
$location_name =
$GLOBALS['phpgw']->locations->get_name($this->location_id);
- $result_unit_number =
result_unit::get_identifier_from_name($location_name['location']);
+ $result_unit_number =
result_unit::get_identifier_from_name((string)$location_name['location']);
return array(
'id' => $this->id,
Modified: trunk/rental/inc/model/class.price_item.inc.php
===================================================================
--- trunk/rental/inc/model/class.price_item.inc.php 2016-04-30 00:23:17 UTC
(rev 14953)
+++ trunk/rental/inc/model/class.price_item.inc.php 2016-04-30 12:02:10 UTC
(rev 14954)
@@ -91,7 +91,7 @@
public function set_is_area( $is_area )
{
- $this->is_area = (boolean)$is_area;
+ $this->is_area = (bool)$is_area;
}
public function is_inactive()
@@ -113,7 +113,7 @@
public function set_is_inactive( $is_inactive )
{
- $this->is_inactive = (boolean)$is_inactive;
+ $this->is_inactive = (bool)$is_inactive;
}
public function get_price()
@@ -279,7 +279,7 @@
public function set_is_adjustable( $is_adjustable )
{
- $this->is_adjustable = (boolean)$is_adjustable;
+ $this->is_adjustable = (bool)$is_adjustable;
}
public function is_standard()
@@ -301,14 +301,14 @@
public function set_standard( $standard )
{
- $this->standard = (boolean)$standard;
+ $this->standard = (bool)$standard;
}
/* public function is_one_time(){
return $this->is_one_time;
}
public function set_is_one_time($is_one_time){
- $this->is_one_time = (boolean)$is_one_time;
+ $this->is_one_time = (bool)$is_one_time;
}
*/
}
\ No newline at end of file
Modified: trunk/rental/templates/base/party.xsl
===================================================================
--- trunk/rental/templates/base/party.xsl 2016-04-30 00:23:17 UTC (rev
14953)
+++ trunk/rental/templates/base/party.xsl 2016-04-30 12:02:10 UTC (rev
14954)
@@ -350,6 +350,9 @@
<!-- view -->
<xsl:template xmlns:php="http://php.net/xsl" match="view">
<xsl:call-template name="top-toolbar" />
+ <script type="text/javascript">
+ var lang = <xsl:value-of select="php:function('js_lang', 'Name
or company is required')"/>;
+ </script>
<div>
<form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
<div id="tab-content">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14954] rental: prepare for php 7,
Sigurd Nes <=