[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13374] fix listing locations for custom functions
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13374] fix listing locations for custom functions |
Date: |
Sun, 07 Jun 2015 17:47:17 +0000 |
Revision: 13374
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13374
Author: sigurdne
Date: 2015-06-07 17:47:15 +0000 (Sun, 07 Jun 2015)
Log Message:
-----------
fix listing locations for custom functions
Modified Paths:
--------------
trunk/admin/inc/class.ui_custom.inc.php
trunk/phpgwapi/inc/class.custom_functions.inc.php
trunk/phpgwapi/inc/class.locations.inc.php
trunk/preferences/inc/class.boadmin_acl.inc.php
Modified: trunk/admin/inc/class.ui_custom.inc.php
===================================================================
--- trunk/admin/inc/class.ui_custom.inc.php 2015-06-07 17:45:23 UTC (rev
13373)
+++ trunk/admin/inc/class.ui_custom.inc.php 2015-06-07 17:47:15 UTC (rev
13374)
@@ -620,7 +620,7 @@
'lang_no_location'
=> lang('No location'),
'lang_location_statustext'
=> lang('Select submodule'),
'select_name_location'
=> 'location',
- 'location_list'
=>
$this->bolocation->select_location('filter',$location,False,True),
+ 'location_list'
=> $this->bolocation->select_location('filter',
$location, false, false, true),
);
Modified: trunk/phpgwapi/inc/class.custom_functions.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_functions.inc.php 2015-06-07 17:45:23 UTC
(rev 13373)
+++ trunk/phpgwapi/inc/class.custom_functions.inc.php 2015-06-07 17:47:15 UTC
(rev 13374)
@@ -289,10 +289,15 @@
$querymethod = '';
if($query)
{
- $querymethod = " AND file_name {$this->_like}
'%{$query}%'"
- . " OR descr
{$this->_like} '%{$query}%'";
+ $querymethod = " AND (file_name {$this->_like}
'%{$query}%'"
+ . " OR descr
{$this->_like} '%{$query}%')";
}
+ if ( isset($data['pre_commit']) )
+ {
+ $querymethod = " AND pre_commit = 1";
+ }
+
$sql = 'FROM phpgw_cust_function'
. " WHERE location_id = {$location_id}
{$querymethod}";
Modified: trunk/phpgwapi/inc/class.locations.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.locations.inc.php 2015-06-07 17:45:23 UTC (rev
13373)
+++ trunk/phpgwapi/inc/class.locations.inc.php 2015-06-07 17:47:15 UTC (rev
13374)
@@ -447,7 +447,7 @@
if($c_function)
{
- $filter .= ' AND c_function = 1';
+ $filter .= ' AND allow_c_function = 1';
}
$sql = "SELECT phpgw_locations.location_id,
phpgw_locations.name, phpgw_locations.descr FROM phpgw_locations"
Modified: trunk/preferences/inc/class.boadmin_acl.inc.php
===================================================================
--- trunk/preferences/inc/class.boadmin_acl.inc.php 2015-06-07 17:45:23 UTC
(rev 13373)
+++ trunk/preferences/inc/class.boadmin_acl.inc.php 2015-06-07 17:47:15 UTC
(rev 13374)
@@ -128,7 +128,7 @@
}
}
- function select_location($format = 'filter', $selected='',
$grant = false, $allow_c_attrib = false)
+ function select_location($format = 'filter', $selected='',
$grant = false, $allow_c_attrib = false, $allow_c_functions = false)
{
switch($format)
@@ -143,7 +143,7 @@
$location_list = array();
- $locations =
$GLOBALS['phpgw']->locations->get_locations($grant, $this->acl_app,
$allow_c_attrib);
+ $locations =
$GLOBALS['phpgw']->locations->get_locations($grant, $this->acl_app,
$allow_c_attrib, $allow_c_functions);
$i = 0;
foreach ( $locations as $loc_id => $loc_descr )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13374] fix listing locations for custom functions,
Sigurd Nes <=