fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16362] separate acl_location and system_location


From: sigurdne
Subject: [Fmsystem-commits] [16362] separate acl_location and system_location
Date: Tue, 21 Feb 2017 09:55:07 -0500 (EST)

Revision: 16362
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16362
Author:   sigurdne
Date:     2017-02-21 09:55:07 -0500 (Tue, 21 Feb 2017)
Log Message:
-----------
separate acl_location and system_location

Modified Paths:
--------------
    trunk/property/inc/class.bogeneric.inc.php
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.uigeneric.inc.php

Modified: trunk/property/inc/class.bogeneric.inc.php
===================================================================
--- trunk/property/inc/class.bogeneric.inc.php  2017-02-21 13:57:56 UTC (rev 
16361)
+++ trunk/property/inc/class.bogeneric.inc.php  2017-02-21 14:55:07 UTC (rev 
16362)
@@ -134,7 +134,9 @@
                        }
 
                        $filter = array('list' => ''); // translates to "list 
IS NULL"
-                       $columns = 
$this->custom->find($this->location_info['acl_app'], 
$this->location_info['acl_location'], 0, '', '', '', true, false, $filter);
+                       $system_location = 
$this->location_info['system_location'] ? 
$this->location_info['system_location'] : $this->location_info['acl_location'];
+                       
+                       $columns = 
$this->custom->find($this->location_info['acl_app'], $system_location, 0, '', 
'', '', true, false, $filter);
                        $column_list = 
$this->bocommon->select_multi_list($selected, $columns);
 
                        return $column_list;
@@ -187,11 +189,12 @@
                                unset($data['location_info']);
                        }
                        $custom_fields = false;
+                       $system_location = 
$this->location_info['system_location'] ? 
$this->location_info['system_location'] : $this->location_info['acl_location'];
                        if 
($GLOBALS['phpgw']->locations->get_attrib_table($this->location_info['acl_app'],
 $this->location_info['acl_location']))
                        {
                                $custom_fields = true;
                                $values = array();
-                               $values['attributes'] = 
$this->custom->find($this->location_info['acl_app'], 
$this->location_info['acl_location'], 0, '', 'ASC', 'attrib_sort', true, true);
+                               $values['attributes'] = 
$this->custom->find($this->location_info['acl_app'], $system_location, 0, '', 
'ASC', 'attrib_sort', true, true);
                        }
 
                        if (isset($data['id']) && $data['id'])
@@ -200,7 +203,7 @@
                        }
                        if ($custom_fields)
                        {
-                               $values = $this->custom->prepare($values, 
$this->location_info['acl_app'], $this->location_info['acl_location'], 
$data['view']);
+                               $values = $this->custom->prepare($values, 
$this->location_info['acl_app'], $system_location, $data['view']);
                        }
                        return $values;
                }
@@ -281,7 +284,8 @@
 
                public function read_attrib_history( $data )
                {
-                       $attrib_data = $this->custom->get($data['appname'], 
$data['acl_location'], $data['attrib_id'], $inc_choices = true);
+                       $system_location = $data['system_location'] ? 
$data['system_location'] :$data['acl_location'];
+                       $attrib_data = $this->custom->get($data['appname'], 
$system_location, $data['attrib_id'], $inc_choices = true);
                        $historylog = CreateObject('property.historylog', 
$data['appname'], $data['acl_location']);
                        $history_values = $historylog->return_array(array(), 
array('SO'), 'history_timestamp', 'DESC', $data['id'], $data['attrib_id']);
 
@@ -359,8 +363,11 @@
                                }
                        }
 
-                       $attributes = 
$this->custom->find($this->location_info['acl_app'], 
$this->location_info['acl_location'], 0, '', 'ASC', 'attrib_sort', true, true);
 
+                       $system_location = 
$this->location_info['system_location'] ? 
$this->location_info['system_location'] : $this->location_info['acl_location'];
+
+                       $attributes = 
$this->custom->find($this->location_info['acl_app'], $system_location, 0, '', 
'ASC', 'attrib_sort', true, true);
+
                        $custom_filter = array();
                        foreach ($attributes as $attribute_id => $attribute)
                        {

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2017-02-21 13:57:56 UTC (rev 
16361)
+++ trunk/property/inc/class.sogeneric.inc.php  2017-02-21 14:55:07 UTC (rev 
16362)
@@ -469,6 +469,7 @@
                                                'add_msg' => lang('add'),
                                                'name' => lang('vendor'),
                                                'acl_app' => 'property',
+                                               'system_location' => '.vendor',
                                                'acl_location' => '.vendor',
                                                'menu_selection' => 
'property::economy::vendor',
                                                'default' => array
@@ -1996,6 +1997,7 @@
                                                'name' => lang('response 
template'),
                                                'acl_app' => 'property',
                                                'acl_location' => '.ticket',
+                                               'system_location' => 
'.ticket.response_template',
                                                'menu_selection' => 
'property::helpdesk::response_template',
                                                'default' => array
                                                        (
@@ -2459,6 +2461,7 @@
                                                'name' => 
$GLOBALS['phpgw']->translation->translate('office', array(), false, 'booking'),
                                                'acl_app' => 'booking',
                                                'acl_location' => '.office',
+                                               'system_location' => '.office',
                                                'menu_selection' => 
'booking::settings::office',
                                                'default' => array
                                                        (
@@ -2494,6 +2497,7 @@
                                                'name' => 
$GLOBALS['phpgw']->translation->translate('office user', array(), false, 
'booking'),
                                                'acl_app' => 'booking',
                                                'acl_location' => 
'.office.user',
+                                               'system_location' => 
'.office.user',
                                                'menu_selection' => 
'booking::settings::office::office_user',
                                                'default' => array
                                                        (

Modified: trunk/property/inc/class.uigeneric.inc.php
===================================================================
--- trunk/property/inc/class.uigeneric.inc.php  2017-02-21 13:57:56 UTC (rev 
16361)
+++ trunk/property/inc/class.uigeneric.inc.php  2017-02-21 14:55:07 UTC (rev 
16362)
@@ -608,8 +608,10 @@
                                        }
                                }
 
-                               $attributes_groups = 
$this->custom->get_attribute_groups($this->location_info['acl_app'], 
$this->acl_location, $values['attributes']);
+                               $system_location = 
$this->location_info['system_location'] ? 
$this->location_info['system_location'] : $this->location_info['acl_location'];
 
+                               $attributes_groups = 
$this->custom->get_attribute_groups($this->location_info['acl_app'], 
$system_location, $values['attributes']);
+
                                $attributes = array();
                                foreach ($attributes_groups as $group)
                                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]