[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15798] more on rental
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15798] more on rental |
Date: |
Tue, 4 Oct 2016 17:51:45 +0000 (UTC) |
Revision: 15798
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15798
Author: sigurdne
Date: 2016-10-04 17:51:45 +0000 (Tue, 04 Oct 2016)
Log Message:
-----------
more on rental
Modified Paths:
--------------
trunk/rental/inc/class.uicomposite.inc.php
trunk/rental/inc/class.uicontract.inc.php
Modified: trunk/rental/inc/class.uicomposite.inc.php
===================================================================
--- trunk/rental/inc/class.uicomposite.inc.php 2016-10-04 14:03:26 UTC (rev
15797)
+++ trunk/rental/inc/class.uicomposite.inc.php 2016-10-04 17:51:45 UTC (rev
15798)
@@ -130,22 +130,17 @@
public function query()
{
- if
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
- {
- $user_rows_per_page =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- }
- else
- {
- $user_rows_per_page = 10;
- }
+ $length = phpgw::get_var('length', 'int');
+ $user_rows_per_page = $length > 0 ? $length :
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+
$search = phpgw::get_var('search');
$order = phpgw::get_var('order');
$draw = phpgw::get_var('draw', 'int', 'REQUEST', 1);
$columns = phpgw::get_var('columns');
$start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $user_rows_per_page : phpgw::get_var('length', 'int');
+ $num_of_objects = $length == -1 ? 0 :
$user_rows_per_page;
$sort_field = ($columns[$order[0]['column']]['data']) ?
$columns[$order[0]['column']]['data'] : 'id';
$sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
$search_for = (is_array($search)) ? $search['value'] :
$search;
@@ -167,7 +162,7 @@
if ($export)
{
- $num_of_objects = null;
+ $num_of_objects = 0;
}
//Retrieve the type of query and perform type specific
logic
@@ -294,6 +289,16 @@
} */
if ($export)
{
+ /*
+ * reverse of nl2br()
+ */
+ foreach ($rows as &$row)
+ {
+ foreach ($row as $key => &$value)
+ {
+ $value =
preg_replace('#<br\s*?/?>#i', "\n", $value);
+ }
+ }
return $rows;
}
Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php 2016-10-04 14:03:26 UTC (rev
15797)
+++ trunk/rental/inc/class.uicontract.inc.php 2016-10-04 17:51:45 UTC (rev
15798)
@@ -844,7 +844,7 @@
$columns = phpgw::get_var('columns');
$start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = $length == -1 ? null :
$user_rows_per_page;
+ $num_of_objects = $length == -1 ? 0 :
$user_rows_per_page;
$sort_field = ($columns[$order[0]['column']]['data']) ?
$columns[$order[0]['column']]['data'] : 'old_contract_id';
$sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15798] more on rental,
sigurdne <=