[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15558] rental: More on application
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15558] rental: More on application |
Date: |
Thu, 1 Sep 2016 08:16:46 +0000 (UTC) |
Revision: 15558
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15558
Author: sigurdne
Date: 2016-09-01 08:16:46 +0000 (Thu, 01 Sep 2016)
Log Message:
-----------
rental: More on application
Modified Paths:
--------------
trunk/rental/inc/class.boapplication.inc.php
trunk/rental/inc/class.uiapplication.inc.php
Modified: trunk/rental/inc/class.boapplication.inc.php
===================================================================
--- trunk/rental/inc/class.boapplication.inc.php 2016-09-01 00:26:01 UTC
(rev 15557)
+++ trunk/rental/inc/class.boapplication.inc.php 2016-09-01 08:16:46 UTC
(rev 15558)
@@ -36,6 +36,7 @@
$bo,
$fields;
+ public $acl_location = '.application';
public function __construct()
{
@@ -58,7 +59,48 @@
public function store($object)
{
- return
rental_soapplication::get_instance()->store($object);
+ $criteria = array(
+ 'appname' => 'rental',
+ 'location' => $this->bo->acl_location,
+ 'allrows' => true
+ );
+
+ $custom_functions =
$GLOBALS['phpgw']->custom_functions->find($criteria);
+
+ foreach ($custom_functions as $entry)
+ {
+ // prevent path traversal
+ if (preg_match('/\.\./', $entry['file_name']))
+ {
+ continue;
+ }
+
+ $file = PHPGW_SERVER_ROOT .
"/rental/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+ if ($entry['active'] && is_file($file) &&
!$entry['client_side'])
+ {
+ require $file;
+ }
+ }
+
+ $ret =
rental_soapplication::get_instance()->store($object);
+
+ reset($custom_functions);
+
+ foreach ($custom_functions as $entry)
+ {
+ // prevent path traversal
+ if (preg_match('/\.\./', $entry['file_name']))
+ {
+ continue;
+ }
+
+ $file = PHPGW_SERVER_ROOT .
"/rental/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+ if ($entry['active'] && is_file($file) &&
!$entry['client_side'] && !$entry['pre_commit'])
+ {
+ require $file;
+ }
+ }
+ return $ret;
}
public function read($params)
Modified: trunk/rental/inc/class.uiapplication.inc.php
===================================================================
--- trunk/rental/inc/class.uiapplication.inc.php 2016-09-01 00:26:01 UTC
(rev 15557)
+++ trunk/rental/inc/class.uiapplication.inc.php 2016-09-01 08:16:46 UTC
(rev 15558)
@@ -55,7 +55,7 @@
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('application');
$this->bo = createObject('rental.boapplication');
$this->acl = & $GLOBALS['phpgw']->acl;
- $this->acl_location = '.application';
+ $this->acl_location = $this->bo->acl_location;
$this->acl_read =
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'rental');
$this->acl_add = $this->acl->check($this->acl_location,
PHPGW_ACL_ADD, 'rental');
$this->acl_edit =
$this->acl->check($this->acl_location, PHPGW_ACL_EDIT, 'rental');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15558] rental: More on application,
sigurdne <=