[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16706] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16706] more on eventplanner |
Date: |
Mon, 8 May 2017 09:49:18 -0400 (EDT) |
Revision: 16706
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16706
Author: sigurdne
Date: 2017-05-08 09:49:18 -0400 (Mon, 08 May 2017)
Log Message:
-----------
more on eventplanner
Modified Paths:
--------------
trunk/eventplanner/inc/class.uiapplication.inc.php
trunk/phpgwapi/inc/class.bocommon.inc.php
trunk/phpgwapi/inc/class.db.inc.php
Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php 2017-05-08 12:21:03 UTC
(rev 16705)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php 2017-05-08 13:49:18 UTC
(rev 16706)
@@ -153,7 +153,7 @@
'phpgw_return_as' => 'json'
)),
'allrows' => true,
- 'sorted_by' => array('key' => 6,
'dir' => 'asc'),
+ 'sorted_by' => array('key' =>
$this->currentapp == 'eventplanner' ? 6 : 3, 'dir' => 'asc'),
'new_item' =>
self::link(array('menuaction' => "{$this->currentapp}.uiapplication.add")),
'editor_action' => '',
'field' => parent::_get_fields()
Modified: trunk/phpgwapi/inc/class.bocommon.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.bocommon.inc.php 2017-05-08 12:21:03 UTC (rev
16705)
+++ trunk/phpgwapi/inc/class.bocommon.inc.php 2017-05-08 13:49:18 UTC (rev
16706)
@@ -52,12 +52,13 @@
$order = phpgw::get_var('order');
$draw = phpgw::get_var('draw', 'int');
$columns = phpgw::get_var('columns');
+ $sort = $columns[$order[0]['column']]['data'];
$params = array(
'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
'query' => $query ? $query : $search['value'],
- 'sort' => $columns[$order[0]['column']]['data'],
+ 'sort' => false,
'dir' => $order[0]['dir'],
'allrows' => phpgw::get_var('length', 'int') ==
-1,
);
@@ -68,6 +69,11 @@
{
$params['filters'][$field] =
phpgw::get_var("filter_$field", $_params['type']);
}
+
+ if($field == $order)
+ {
+ $params['sort'] = $field;
+ }
}
return $params;
Modified: trunk/phpgwapi/inc/class.db.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db.inc.php 2017-05-08 12:21:03 UTC (rev 16705)
+++ trunk/phpgwapi/inc/class.db.inc.php 2017-05-08 13:49:18 UTC (rev 16706)
@@ -284,7 +284,7 @@
$offset = $offset < 0 ? 0 : (int)$offset;
$num_rows = (int)$num_rows;
- if ($num_rows == 0)
+ if ($num_rows <= 0)
{
$maxmatches =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
$num_rows = isset($maxmatches) && $maxmatches ?
(int)$maxmatches : 15;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16706] more on eventplanner,
sigurdne <=