fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17122] Stable: Merge 17109:17121 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17122] Stable: Merge 17109:17121 from trunk
Date: Wed, 27 Sep 2017 04:06:20 -0400 (EDT)

Revision: 17122
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17122
Author:   sigurdne
Date:     2017-09-27 04:06:18 -0400 (Wed, 27 Sep 2017)
Log Message:
-----------
Stable: Merge 17109:17121 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/admin/inc/class.uiaccounts.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.socustomer_report.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.sovendor_report.inc.php
    branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php
    branches/Version-2_0-branch/frontend/inc/class.bofrontend.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
    branches/Version-2_0-branch/helpdesk/js/portico/tts.add.js
    branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js
    branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang
    branches/Version-2_0-branch/helpdesk/templates/base/config.tpl
    branches/Version-2_0-branch/helpdesk/templates/base/tts.xsl
    branches/Version-2_0-branch/phpgwapi/doc/Vagrantfile
    branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
    branches/Version-2_0-branch/property/inc/class.soresponsible.inc.php
    branches/Version-2_0-branch/property/inc/class.uitts.inc.php
    branches/Version-2_0-branch/property/templates/base/tts.xsl
    branches/Version-2_0-branch/rental/inc/class.uiresultunit.inc.php

Property Changed:
----------------
    branches/Version-2_0-branch/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch 2017-09-27 08:06:18 UTC (rev 17122)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16846
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108,17110-17121
\ No newline at end of property
Modified: branches/Version-2_0-branch/admin/inc/class.uiaccounts.inc.php
===================================================================
--- branches/Version-2_0-branch/admin/inc/class.uiaccounts.inc.php      
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/admin/inc/class.uiaccounts.inc.php      
2017-09-27 08:06:18 UTC (rev 17122)
@@ -71,11 +71,21 @@
                protected $_bo;
 
                /**
+                * @var object $_acl the acl object
+                */
+               protected $_acl;
+
+               /**
                 * @var object $_nextmatches pager object
                 */
                protected $_nextmatches;
 
                /**
+                * @var integer $account current user
+                */
+               protected $account;
+
+               /**
                 * @var boolean $_ldap_extended Use LDAP extended attributes
                 */
                protected $_ldap_extended = false;
@@ -98,6 +108,8 @@
                        $this->_ldap_extended = 
$GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap'
                                && 
isset($GLOBALS['phpgw_info']['server']['ldap_extra_attributes'])
                                && 
$GLOBALS['phpgw_info']['server']['ldap_extra_attributes'];
+                       $this->_acl = & $GLOBALS['phpgw']->acl;
+                       $this->account = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
 
                function query( )
@@ -105,8 +117,8 @@
                        $account_id             = phpgw::get_var('group_id', 
'int');
 
                        if ( !$account_id
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin')
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') )
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::EDIT, 'admin')
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::PRIV, 'admin') )
                        {
                                return $this->jquery_results(array('results' => 
array(), 'total_records' => 0));
                        }
@@ -143,15 +155,16 @@
                        $group_members = $accounts->member($account_id);
 
                        //local application admin
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
                                $available_apps = 
$GLOBALS['phpgw_info']['apps'];
                                $valid_users = array();
                                foreach($available_apps as $_app => $dummy)
                                {
-                                       
if($GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, $_app))
+                                       if($this->_acl->check('admin', 
phpgwapi_acl::ADD, $_app))
                                        {
-                                               $_valid_users   = 
$GLOBALS['phpgw']->acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               $_valid_users   = 
$this->_acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               
$this->_acl->set_account_id($this->account);
 
                                                foreach($_valid_users as $_user)
                                                {
@@ -272,7 +285,7 @@
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] .= 
'::groups';
 
                        if ( phpgw::get_var('done', 'bool', 'POST')
-                               || 
$GLOBALS['phpgw']->acl->check('group_access', PHPGW_ACL_READ, 'admin'))
+                               || $this->_acl->check('group_access', 
PHPGW_ACL_READ, 'admin'))
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
                                                array('menuaction' => 
'admin.uimainscreen.mainscreen'));
@@ -294,7 +307,7 @@
                                                                                
                                        . ': ' . lang('list groups');
                        $GLOBALS['phpgw']->xslttpl->add_file('groups');
 
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
                                $available_apps = 
$GLOBALS['phpgw_info']['apps'];
                                $valid_users = array();
@@ -304,15 +317,15 @@
                                        {
                                                continue;
                                        }
-                                       
if($GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, $_app))
+                                       if($this->_acl->check('admin', 
phpgwapi_acl::ADD, $_app))
                                        {
-                                               $valid_users    = 
array_merge($valid_users, $GLOBALS['phpgw']->acl->get_ids_for_location('run', 
phpgwapi_acl::READ, $_app));
+                                               $valid_users    = 
array_merge($valid_users, $this->_acl->get_ids_for_location('run', 
phpgwapi_acl::READ, $_app));
                                        }
                                }
 
                                $valid_users = array_unique($valid_users);
 
-                               $admin_groups   = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'admin');
+                               $admin_groups   = 
$this->_acl->get_ids_for_location('run', phpgwapi_acl::READ, 'admin');
 
                                $allusers = 
$GLOBALS['phpgw']->accounts->get_list('groups', -1,$this->sort, $this->order, 
$this->query);
                                foreach($allusers as  $user)
@@ -456,7 +469,7 @@
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] .= 
'::users';
 
                        if ( phpgw::get_var('done', 'bool', 'POST')
-                               || 
$GLOBALS['phpgw']->acl->check('account_access', phpgwapi_acl::READ, 'admin') )
+                               || $this->_acl->check('account_access', 
phpgwapi_acl::READ, 'admin') )
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
                                                array('menuaction' => 
'admin.uimainscreen.mainscreen'));
@@ -488,15 +501,16 @@
 
                        $GLOBALS['phpgw']->xslttpl->add_file('users');
 
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
                                $available_apps = 
$GLOBALS['phpgw_info']['apps'];
                                $valid_users = array();
                                foreach($available_apps as $_app => $dummy)
                                {
-                                       
if($GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, $_app))
+                                       if($this->_acl->check('admin', 
phpgwapi_acl::ADD, $_app))
                                        {
-                                               $_valid_users   = 
$GLOBALS['phpgw']->acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               $_valid_users   = 
$this->_acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               
$this->_acl->set_account_id($this->account);
        
                                                foreach($_valid_users as $_user)
                                                {
@@ -737,9 +751,9 @@
 
                        if ( phpgw::get_var('cancel', 'bool', 'POST')
                                || ( !$account_id
-                                       && 
$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin') )
+                                       && $this->_acl->check('group_access', 
phpgwapi_acl::EDIT, 'admin') )
                                || ( $account_id
-                                       && 
$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') ) )
+                                       && $this->_acl->check('group_access', 
phpgwapi_acl::PRIV, 'admin') ) )
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
                                                array('menuaction' => 
'admin.uiaccounts.list_groups'));
@@ -793,15 +807,16 @@
                        $group_members = $accounts->member($account_id);
 
 /*                     //local application admin
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
                                $available_apps = 
$GLOBALS['phpgw_info']['apps'];
                                $valid_users = array();
                                foreach($available_apps as $_app => $dummy)
                                {
-                                       
if($GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, $_app))
+                                       if($this->_acl->check('admin', 
phpgwapi_acl::ADD, $_app))
                                        {
-                                               $_valid_users   = 
$GLOBALS['phpgw']->acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               $_valid_users   = 
$this->_acl->get_user_list_right(phpgwapi_acl::READ, 'run', $_app);
+                                               
$this->_acl->set_account_id($this->account);
        
                                                foreach($_valid_users as $_user)
                                                {
@@ -874,9 +889,9 @@
                        $apps = array_keys($GLOBALS['phpgw_info']['apps']);
                        asort($apps);
 
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
-                               $valid_apps = 
$GLOBALS['phpgw']->acl->get_app_list_for_id('admin', phpgwapi_acl::ADD, 
$GLOBALS['phpgw_info']['user']['account_id']);
+                               $valid_apps = 
$this->_acl->get_app_list_for_id('admin', phpgwapi_acl::ADD, 
$GLOBALS['phpgw_info']['user']['account_id']);
                        }
                        else
                        {
@@ -991,8 +1006,8 @@
                        $account_user   = (array)phpgw::get_var('account_user', 
'int');
 
                        if ( !$group_id
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin')
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') )
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::EDIT, 'admin')
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::PRIV, 'admin') )
                        {
                                return array('error' => 'error');
                        }
@@ -1000,8 +1015,8 @@
                        /**
                         * Go away
                         */
-                       $test_admins = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'admin');
-                       if(in_array($group_id, $test_admins) && 
!$GLOBALS['phpgw']->acl->check('run', phpgwapi_acl::READ, 'admin'))
+                       $test_admins = $this->_acl->get_ids_for_location('run', 
phpgwapi_acl::READ, 'admin');
+                       if(in_array($group_id, $test_admins) && 
!$this->_acl->check('run', phpgwapi_acl::READ, 'admin'))
                        {
                                        return array('error' => 'error');
                        }
@@ -1022,7 +1037,7 @@
                                        
$GLOBALS['phpgw']->accounts->delete_account4group($user_id, $group_id);
                                        //Delete cached menu for members of 
group
                                        phpgwapi_cache::user_clear('phpgwapi', 
'menu', $user_id);
-                                       
$GLOBALS['phpgw']->acl->clear_user_cache($user_id);
+                                       $this->_acl->clear_user_cache($user_id);
                                }
                                return array('message' => 'OK');
                        }
@@ -1034,8 +1049,8 @@
                        $account_user   = array();
 
                        if ( !$group_id
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin')
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') )
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::EDIT, 'admin')
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::PRIV, 'admin') )
                        {
                                return array('error' => 'error');
                        }
@@ -1057,7 +1072,7 @@
                                        
$GLOBALS['phpgw']->accounts->delete_account4group($entry['account_id'], 
$group_id);
                                        //Delete cached menu for members of 
group
                                        phpgwapi_cache::user_clear('phpgwapi', 
'menu', $entry['account_id']);
-                                       
$GLOBALS['phpgw']->acl->clear_user_cache($entry['account_id']);
+                                       
$this->_acl->clear_user_cache($entry['account_id']);
                                }
                                return array('message' => 'OK');
                        }
@@ -1069,8 +1084,8 @@
                        $account_user   = (array)phpgw::get_var('account_user', 
'int');
 
                        if ( !$group_id
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin')
-                               && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') )
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::EDIT, 'admin')
+                               && !$this->_acl->check('group_access', 
phpgwapi_acl::PRIV, 'admin') )
                        {
                                return array('error' => 'error');
                        }
@@ -1078,8 +1093,8 @@
                        /**
                         * Do not get to elevate to admin rights
                         */
-                       $test_admins = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'admin');
-                       if(in_array($group_id, $test_admins) && 
!$GLOBALS['phpgw']->acl->check('run', phpgwapi_acl::READ, 'admin'))
+                       $test_admins = $this->_acl->get_ids_for_location('run', 
phpgwapi_acl::READ, 'admin');
+                       if(in_array($group_id, $test_admins) && 
!$this->_acl->check('run', phpgwapi_acl::READ, 'admin'))
                        {
                                        return array('error' => 'error');
                        }
@@ -1091,7 +1106,7 @@
                                        
$GLOBALS['phpgw']->accounts->add_user2group($user_id, $group_id);
                                        //Delete cached menu for members of 
group
                                        phpgwapi_cache::user_clear('phpgwapi', 
'menu', $user_id);
-                                       
$GLOBALS['phpgw']->acl->clear_user_cache($user_id);
+                                       $this->_acl->clear_user_cache($user_id);
                                }
                                return array('message' => 'OK');
                        }
@@ -1429,7 +1444,7 @@
                                $loginshell = "<input name=\"loginshell\" 
value=\"{$user_data['loginshell']}\">";
                        }
 
-                       $add_masters    = 
$GLOBALS['phpgw']->acl->get_ids_for_location('addressmaster', 7, 'addressbook');
+                       $add_masters    = 
$this->_acl->get_ids_for_location('addressmaster', 7, 'addressbook');
                        $add_users              = 
$GLOBALS['phpgw']->accounts->return_members($add_masters);
                        $masters                = $add_users['users'];
 
@@ -1481,9 +1496,9 @@
 
 
                        $all_groups = $account->get_list('groups');
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
-                               $test_admins = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'admin');
+                               $test_admins = 
$this->_acl->get_ids_for_location('run', phpgwapi_acl::READ, 'admin');
                                foreach ($test_admins as $test_admin)
                                {
                                        unset($all_groups[$test_admin]); // not 
allowed to elevate privileges
@@ -1492,9 +1507,9 @@
                                $valid_groups = array();
                                foreach($available_apps as $_app => $dummy)
                                {
-                                       
if($GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, $_app))
+                                       if($this->_acl->check('admin', 
phpgwapi_acl::ADD, $_app))
                                        {
-                                               $valid_groups   = 
array_merge($valid_groups,$GLOBALS['phpgw']->acl->get_ids_for_location('run', 
phpgwapi_acl::READ, $_app));
+                                               $valid_groups   = 
array_merge($valid_groups,$this->_acl->get_ids_for_location('run', 
phpgwapi_acl::READ, $_app));
                                        }
                                }
 
@@ -1534,13 +1549,13 @@
                        $apps = createObject('phpgwapi.applications', 
$account_id ? $account_id : -1);
                        $db_perms = $apps->read_account_specific();
 
-                       $apps_admin = 
$GLOBALS['phpgw']->acl->get_app_list_for_id('admin', phpgwapi_acl::ADD, 
$account_id ? $account_id : -1);
+                       $apps_admin = $this->_acl->get_app_list_for_id('admin', 
phpgwapi_acl::ADD, $account_id ? $account_id : -1);
                        
                        $available_apps = $GLOBALS['phpgw_info']['apps'];
                        asort($available_apps);
-                       if(!$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       if(!$this->_acl->check('run', phpgwapi_acl::READ, 
'admin'))
                        {
-                               $valid_apps = 
$GLOBALS['phpgw']->acl->get_app_list_for_id('admin', phpgwapi_acl::ADD, 
$GLOBALS['phpgw_info']['user']['account_id']);
+                               $valid_apps = 
$this->_acl->get_app_list_for_id('admin', phpgwapi_acl::ADD, 
$GLOBALS['phpgw_info']['user']['account_id']);
                        }
                        else
                        {
@@ -1653,7 +1668,7 @@
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] .= 
'::users';
 
                        $account_id = phpgw::get_var('account_id', 'int', 
'GET');
-                       if ( $GLOBALS['phpgw']->acl->check('account_access', 
phpgwapi_acl::DELETE, 'admin')
+                       if ( $this->_acl->check('account_access', 
phpgwapi_acl::DELETE, 'admin')
                                        || !$account_id )
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
@@ -1763,7 +1778,7 @@
                        $account_id = phpgw::get_var('account_id', 'int');
 
                        if ( phpgw::get_var('cancel', 'bool', 'POST')
-                               || 
$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::GROUP_MANAGERS, 
'admin') )
+                               || $this->_acl->check('group_access', 
phpgwapi_acl::GROUP_MANAGERS, 'admin') )
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
                                                array('menuaction' => 
'admin.uiaccounts.list_groups'));
@@ -1811,7 +1826,7 @@
                {
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] .= 
'::users';
 
-                       if ( $GLOBALS['phpgw']->acl->check('account_access', 
phpgwapi_acl::GROUP_MANAGERS, 'admin')
+                       if ( $this->_acl->check('account_access', 
phpgwapi_acl::GROUP_MANAGERS, 'admin')
                                || $GLOBALS['phpgw_info']['user']['account_id'] 
== phpgw::get_var('account_id', 'int', 'GET') )
                        {
                                $this->list_users();
@@ -1924,13 +1939,13 @@
 
                function clear_user_cache()
                {
-                       if(     $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin') )
+                       if(     $this->_acl->check('run', phpgwapi_acl::READ, 
'admin') )
                        {
                                set_time_limit(1500);
                                $account_list = 
$GLOBALS['phpgw']->accounts->get_list('both', -1);
                                foreach ( $account_list as  $id => $account)
                                {
-                                       
$GLOBALS['phpgw']->acl->clear_user_cache($id);
+                                       $this->_acl->clear_user_cache($id);
                                }
                        }
                        $GLOBALS['phpgw']->redirect_link('/admin/index.php');
@@ -1943,7 +1958,7 @@
 
                function global_message()
                {
-                       if(     !$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin') )
+                       if(     !$this->_acl->check('run', phpgwapi_acl::READ, 
'admin') )
                        {
                                
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
                        }
@@ -1980,7 +1995,7 @@
 
                function home_screen_message()
                {
-                       if(     !$GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin') )
+                       if(     !$this->_acl->check('run', phpgwapi_acl::READ, 
'admin') )
                        {
                                
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
                        }
@@ -2033,7 +2048,7 @@
                        $account_id = phpgw::get_var('account_id', 'int');
 
                        if ( phpgw::get_var('cancel', 'bool', 'POST')
-                               || 
$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::GROUP_MANAGERS, 
'admin') )
+                               || $this->_acl->check('group_access', 
phpgwapi_acl::GROUP_MANAGERS, 'admin') )
                        {
                                $GLOBALS['phpgw']->redirect_link('/index.php',
                                                array('menuaction' => 
'admin.uimainscreen.mainscreen'));

Modified: 
branches/Version-2_0-branch/eventplanner/inc/class.socustomer_report.inc.php
===================================================================
--- 
branches/Version-2_0-branch/eventplanner/inc/class.socustomer_report.inc.php    
    2017-09-26 14:29:12 UTC (rev 17121)
+++ 
branches/Version-2_0-branch/eventplanner/inc/class.socustomer_report.inc.php    
    2017-09-27 08:06:18 UTC (rev 17122)
@@ -39,6 +39,7 @@
                        $this->acl_location = 
eventplanner_customer_report::acl_location;
                        $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
                        $this->cats->supress_info = true;
+                       $this->use_acl = true;
                }
 
                /**
@@ -55,7 +56,38 @@
                        return self::$so;
                }
 
+               function get_acl_condition( )
+               {
+                       $acl_condition = parent::get_acl_condition();
 
+                       if($this->relaxe_acl)
+                       {
+                               return $acl_condition;
+                       }
+
+                       $sql = "SELECT object_id, permission FROM 
eventplanner_permission WHERE subject_id = {$this->account}";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       $object_ids = array(-1);
+                       while ($this->db->next_record())
+                       {
+                               $permission = $this->db->f('permission');
+                               if($permission & PHPGW_ACL_READ)
+                               {
+                                       $object_ids[] = 
$this->db->f('object_id');
+                               }
+                       }
+
+                       if($acl_condition)
+                       {
+                               return '(' . $acl_condition . ' OR 
eventplanner_booking_customer_report.id IN (' . implode(',', $object_ids) . 
'))';
+                       }
+                       else
+                       {
+                               return 'eventplanner_booking_customer_report.id 
IN (' . implode(',', $object_ids) . ')';
+                       }
+
+               }
+
                protected function populate( array $data )
                {
                        $object = new eventplanner_customer_report();

Modified: 
branches/Version-2_0-branch/eventplanner/inc/class.sovendor_report.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.sovendor_report.inc.php  
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/eventplanner/inc/class.sovendor_report.inc.php  
2017-09-27 08:06:18 UTC (rev 17122)
@@ -39,6 +39,7 @@
                        $this->acl_location = 
eventplanner_vendor_report::acl_location;
                        $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
                        $this->cats->supress_info = true;
+                       $this->use_acl = true;
                }
 
                /**
@@ -55,7 +56,81 @@
                        return self::$so;
                }
 
+               function get_acl_condition( )
+               {
+                       $clause = '';
 
+                       if(!$this->relaxe_acl && ($this->use_acl && 
$this->currentapp && $this->acl_location))
+                       {
+                               $paranthesis = false;
+
+                               $grants = 
$this->acl->get_grants2($this->currentapp, $this->acl_location);
+                               $public_user_list = array();
+                               if (is_array($grants['accounts']) && 
$grants['accounts'])
+                               {
+                                       foreach($grants['accounts'] as $user => 
$_right)
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_user_list);
+                                       $clause .= 
"({$this->table_name}.owner_id IN(" . implode(',', $public_user_list) . ")";
+                                       $paranthesis = true;
+                               }
+
+                               $public_group_list = array();
+                               if (is_array($grants['groups']) && 
$grants['groups'])
+                               {
+                                       foreach($grants['groups'] as $user => 
$_right)
+                                       {
+                                               $public_group_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_group_list);
+                                       $where = $public_user_list ? 'OR' : 
'AND';
+                                       if(!$paranthesis)
+                                       {
+                                               $clause .='(';
+                                       }
+                                       $clause .= " $where 
phpgw_group_map.group_id IN(" . implode(',', $public_group_list) . ")";
+
+                                       $paranthesis = true;
+                               }
+
+                               if($this->currentapp == 'eventplannerfrontend')
+                               {
+
+                                       $org_id = 
$this->db->db_addslashes(phpgw::get_var('org_id','string' , 'SESSION', -1));
+
+
+                                       $sql = "SELECT eventplanner_booking.id 
as booking_id"
+                                               . " FROM eventplanner_booking"
+                                               . " JOIN eventplanner_calendar 
ON eventplanner_booking.calendar_id = eventplanner_calendar.id"
+                                               . " JOIN 
eventplanner_application ON eventplanner_calendar.application_id = 
eventplanner_application.id"
+                                               . " JOIN eventplanner_vendor ON 
eventplanner_application.vendor_id = eventplanner_vendor.id"
+                                               . " WHERE organization_number = 
'{$org_id}'";
+
+                                               $bookings = array(-1);
+                                               $this->db->query($sql);
+                                               while ($this->db->next_record())
+                                               {
+                                                       $bookings[] = 
$this->db->f('booking_id');
+                                               }
+
+                                       $where = $clause ? 'OR' : 'AND';
+                                       $clause .= " {$where} 
eventplanner_booking_vendor_report.booking_id IN (" . implode(',', $bookings) . 
')';
+                               }
+
+                               if($paranthesis)
+                               {
+                                       $clause .=')';
+                               }
+                       }
+
+                       return $clause;
+
+               }
+
                protected function populate( array $data )
                {
                        $object = new eventplanner_vendor_report();

Modified: branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/eventplanner/inc/class.uibooking.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -177,10 +177,12 @@
                                'link' => '#first_tab',
                                'function' => "set_tab('first_tab')"
                        );
+
                        $tabs['reports'] = array(
                                'label' => lang('reports'),
                                'link' => '#reports',
-                               'function' => "set_tab('reports')"
+                               'function' => "set_tab('reports')",
+                               'disable'       => $booking->customer_id ? 
false : true
                        );
 
                        $bocommon = CreateObject('property.bocommon');

Modified: branches/Version-2_0-branch/frontend/inc/class.bofrontend.inc.php
===================================================================
--- branches/Version-2_0-branch/frontend/inc/class.bofrontend.inc.php   
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/frontend/inc/class.bofrontend.inc.php   
2017-09-27 08:06:18 UTC (rev 17122)
@@ -260,7 +260,7 @@
                public static function add_delegate( int $account_id, int 
$owner_id, $org_unit_id, $org_name )
                {
                        // The owner id is th current user if not set
-                       if (!isset($owner_id))
+                       if (empty($owner_id))
                        {
                                $owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }

Modified: branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -844,11 +844,19 @@
                        if(!$get_message && 
!empty($this->config->config_data['new_message']))
                        {
                                $link_text = 
"<H2>{$this->config->config_data['new_message']}</H2>";
-                               $link_text = nl2br(str_replace(array('__ID__'), 
array($id, $num_updates), $link_text));
+                               $link_text = nl2br(str_replace(array('__ID__'), 
array($id), $link_text));
                        }
 
+                       $set_user_id = false;
+                       if(!$get_message && 
!empty($this->config->config_data['set_user_message']) && 
$_POST['values']['set_user_id'])
+                       {
+                               $set_user_id = (int) 
$_POST['values']['set_user_id'];
+                               $link_text = 
"<H2>{$this->config->config_data['set_user_message']}</H2>";
+                               $link_text = nl2br(str_replace(array('__ID__'), 
array($id), $link_text));
+                       }
+
                        // Normal update message
-                       if(!$get_message && 
!empty($this->config->config_data['update_message']) && $messages_sendt)
+                       if(!$get_message && 
!empty($this->config->config_data['update_message']) && $messages_sendt && 
!$set_user_id)
                        {
                                $link_text = 
"<H2>{$this->config->config_data['update_message']}</H2>";
                                $link_text = nl2br(str_replace(array('__ID__', 
'__#__'), array($id, $num_updates), $link_text));
@@ -1003,7 +1011,9 @@
                                        && 
($GLOBALS['phpgw']->preferences->data['helpdesk']['tts_notify_me'] == 1)
                                )
                                || 
($this->config->config_data['ownernotification'] && $ticket['user_id'])
-                               || ($ticket['user_id'] && $send_mail))
+                               || ($ticket['user_id'] && $send_mail)
+                               || ($set_user_id)
+                               )
                        {
                                // add owner to recipients
                                $members[$ticket['user_id']] = 
$GLOBALS['phpgw']->accounts->id2name($ticket['user_id']);

Modified: branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -598,11 +598,11 @@
                                }
                        }
 
-                       if(!empty($ticket['reverse_id']))
+                       if(!empty($ticket['set_user_id']))
                        {
                                $ticket['assignedto'] = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
-                       $ticket['user_id']      = !empty($ticket['reverse_id']) 
? $ticket['reverse_id'] : $GLOBALS['phpgw_info']['user']['account_id'];
+                       $ticket['user_id']      = 
!empty($ticket['set_user_id']) ? $ticket['set_user_id'] : 
$GLOBALS['phpgw_info']['user']['account_id'];
 
                        $value_set['priority'] = isset($ticket['priority']) ? 
$ticket['priority'] : 0;
                        $value_set['user_id'] =  $ticket['user_id'];
@@ -1061,12 +1061,12 @@
                                $receipt['message'][] = array('msg' => 
lang('billable hours has been updated'));
                        }
 
-                       if (!empty($ticket['forward_user_id']) &&  $old_user_id 
!= $ticket['forward_user_id'] && $oldassigned ==  $this->account)
+                       if (!empty($ticket['set_user_id']) &&  $old_user_id != 
$ticket['set_user_id'] && $oldassigned ==  $this->account)
                        {
-                               $forward_user_id = (int) 
$ticket['forward_user_id'];
-                               $this->db->query("UPDATE phpgw_helpdesk_tickets 
SET user_id = {$forward_user_id}"
+                               $set_user_id = (int) $ticket['set_user_id'];
+                               $this->db->query("UPDATE phpgw_helpdesk_tickets 
SET user_id = {$set_user_id}"
                                        . " WHERE id='{$id}'", __LINE__, 
__FILE__);
-                               $this->historylog->add('FW', $id, 
$forward_user_id, $old_user_id);
+                               $this->historylog->add('FW', $id, $set_user_id, 
$old_user_id);
                                $receipt['message'][] = array('msg' => 
lang('ticket is forwarded'));
                        }
 

Modified: branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -217,7 +217,7 @@
 
                        $params = array(
                                'start' => phpgw::get_var('start', 'int', 
'REQUEST', 0),
-                               'results' => phpgw::get_var('length', 'int', 
'REQUEST', 0),
+                               'results' => $export ? -1 : 
phpgw::get_var('length', 'int', 'REQUEST', 0),
                                'query' => $search['value'],
                                'order' => 
$columns[$order[0]['column']]['data'],
                                'sort' => $order[0]['dir'],
@@ -231,7 +231,6 @@
                                'vendor_id' => $this->bo->vendor_id,
                                'district_id' => $this->bo->district_id,
                                'part_of_town_id' => $this->bo->part_of_town_id,
-                               //'allrows' => $this->bo->allrows,
                                'start_date' => $this->bo->start_date,
                                'end_date' => $this->bo->end_date,
                                'location_code' => $this->bo->location_code,
@@ -392,11 +391,9 @@
 
                function download()
                {
-                       $start_date     = urldecode($this->start_date);
-                       $end_date       = urldecode($this->end_date);
+                       $params = $this->get_params();
 
-                       $this->bo->allrows = true;
-                       $list = $this->bo->read($start_date,$end_date,'', 
$download = true);
+                       $list = $this->bo->read($params);
 
                        $custom_status  = $this->bo->get_custom_status();
 
@@ -449,7 +446,7 @@
                        $descr = array();
                        foreach($name as $_entry)
                        {
-                               //                              $descr[] = 
str_replace('_', ' ', $_entry);
+//                             $descr[] = str_replace('_', ' ', $_entry);
                                $descr[] = lang(str_replace('_', ' ', $_entry));
                        }
 
@@ -2085,7 +2082,7 @@
                                                'type' => 'tax', 'selected' => 
$ticket['tax_code'], 'order' => 'id',
                                                'id_in_name' => 'num'))),
                                'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
-                               'forward_user' => ($ticket['user_id'] != 
$ticket['reverse_id'] && $ticket['assignedto'] ==  $this->account) ? true : 
false
+                               'set_user' => ($ticket['user_id'] != 
$ticket['reverse_id'] && $ticket['assignedto'] ==  $this->account) ? true : 
false
                        );
  
                        phpgwapi_jquery::load_widget('numberformat');

Modified: branches/Version-2_0-branch/helpdesk/js/portico/tts.add.js
===================================================================
--- branches/Version-2_0-branch/helpdesk/js/portico/tts.add.js  2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/js/portico/tts.add.js  2017-09-27 
08:06:18 UTC (rev 17122)
@@ -266,4 +266,4 @@
 
 var oArgs = {menuaction: 'helpdesk.uitts.get_reverse_assignee'};
 var strURL = phpGWLink('index.php', oArgs, true);
-JqueryPortico.autocompleteHelper(strURL, 'reverse_name', 'reverse_id', 
'reverse_container');
+JqueryPortico.autocompleteHelper(strURL, 'set_user_name', 'set_user_id', 
'set_user_container');
\ No newline at end of file

Modified: branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js
===================================================================
--- branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js 2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/js/portico/tts.view.js 2017-09-27 
08:06:18 UTC (rev 17122)
@@ -330,4 +330,4 @@
 
 var oArgs = {menuaction: 'helpdesk.uitts.get_reverse_assignee'};
 var strURL = phpGWLink('index.php', oArgs, true);
-JqueryPortico.autocompleteHelper(strURL, 'forward_user_name', 
'forward_user_id', 'forward_user_container');
+JqueryPortico.autocompleteHelper(strURL, 'set_user_name', 'set_user_id', 
'set_user_container');

Modified: branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang    2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang    2017-09-27 
08:06:18 UTC (rev 17122)
@@ -203,6 +203,7 @@
 reverse        helpdesk        no      Revers tildeling
 owned by       helpdesk        no      Eies av
 new message    helpdesk        no      Svarmelding ved ny sak
+set user message       helpdesk        no      Svarmelding ved ny eier av sak 
ved reverstildeling
 update message helpdesk        no      Svarmelding ved oppdatert sak
 close message  helpdesk        no      Svarmelding ved avsluttet sak
 list %1        helpdesk        no      List %1

Modified: branches/Version-2_0-branch/helpdesk/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/helpdesk/templates/base/config.tpl      
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/templates/base/config.tpl      
2017-09-27 08:06:18 UTC (rev 17122)
@@ -24,6 +24,10 @@
                        <td><input name="newsettings[new_message]" 
value="{value_new_message}"></td>
                </tr>
                <tr>
+                       <td>{lang_set_user_message}:</br> '__ID__' </td>
+                       <td><input name="newsettings[set_user_message]" 
value="{value_set_user_message}"></td>
+               </tr>
+               <tr>
                        <td>{lang_update_message}:</br> '__ID__', '__#__' </td>
                        <td><input name="newsettings[update_message]" 
value="{value_update_message}"></td>
                </tr>

Modified: branches/Version-2_0-branch/helpdesk/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/helpdesk/templates/base/tts.xsl 2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/helpdesk/templates/base/tts.xsl 2017-09-27 
08:06:18 UTC (rev 17122)
@@ -101,10 +101,10 @@
                                                                <label>
                                                                        
<xsl:value-of select="$lang_reverse"/>
                                                                </label>
-                                                               <input 
type="hidden" id="reverse_id" name="values[reverse_id]"  
value="{value_reverse_id}"/>
-                                                               <input 
type="text" id="reverse_name" name="values[reverse_name]" 
value="{value_reverse_name}" class="pure-input-1-2">
+                                                               <input 
type="hidden" id="set_user_id" name="values[set_user_id]"  
value="{value_set_user}"/>
+                                                               <input 
type="text" id="set_user_name" name="values[set_user_name]" 
value="{value_set_user_name}" class="pure-input-1-2">
                                                                </input>
-                                                               <div 
id="reverse_container"/>
+                                                               <div 
id="set_user_container"/>
                                                        </div>
                                                        <!--xsl:call-template 
name="contact_form"/-->
                                                        <!--div 
class="pure-control-group">
@@ -343,7 +343,7 @@
                                                </label>
                                                <xsl:value-of 
select="value_owned_by"/>
                                        </div>
-                                       <xsl:if test="forward_user ='1'">
+                                       <xsl:if test="set_user ='1'">
                                                <div class="pure-control-group">
                                                        <xsl:variable 
name="lang_forward">
                                                                <xsl:value-of 
select="php:function('lang', 'forward')"/>
@@ -351,10 +351,10 @@
                                                        <label>
                                                                <xsl:value-of 
select="$lang_forward"/>
                                                        </label>
-                                                       <input type="hidden" 
id="forward_user_id" name="values[forward_user_id]"  
value="{value_forward_user}"/>
-                                                       <input type="text" 
id="forward_user_name" name="values[forward_user_name]" 
value="{value_forward_user_name}" class="pure-input-1-2">
+                                                       <input type="hidden" 
id="set_user_id" name="values[set_user_id]"  value="{value_set_user}"/>
+                                                       <input type="text" 
id="set_user_name" name="values[set_user_name]" value="{value_set_user_name}" 
class="pure-input-1-2">
                                                        </input>
-                                                       <div 
id="forward_user_container"/>
+                                                       <div 
id="set_user_container"/>
                                                </div>
                                        </xsl:if>
                                        <xsl:for-each select="value_origin">

Modified: branches/Version-2_0-branch/phpgwapi/doc/Vagrantfile
===================================================================
--- branches/Version-2_0-branch/phpgwapi/doc/Vagrantfile        2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/phpgwapi/doc/Vagrantfile        2017-09-27 
08:06:18 UTC (rev 17122)
@@ -4,13 +4,14 @@
 # complete with postgresql, apache, php and xdebug.
 # The user 'portico' has password 'portico' - and is member of sudoers.
 # Roles/Passwd in posgresql: portico/portico, vagrant/vagrant
-# Portmapping: 80 -> 8080, 20 -> 2222 and 5432 -> 5433
+# Portmapping: 80 -> 8080, 22 -> 2222 and 5432 -> 5433
 # Usage:
 #   $ vagrant up
 # Docs: https://www.vagrantup.com/
 # Download and install netbeans from https://netbeans.org/downloads/
 # Log into the virtual machine with user/passwd: portico/portico
-# create a ssh key pair as described: 
http://savannah.gnu.org/maintenance/SshAccess/
+# $ ssh address@hidden -p 2222
+# If you need to commit code to the svn server: create a ssh key pair as 
described: http://savannah.gnu.org/maintenance/SshAccess/
 # - or use what you already have
 # register your key at https://savannah.gnu.org/my/admin/editsshkeys.php
 # Request access to the project at 
https://savannah.nongnu.org/projects/fmsystem/
@@ -22,11 +23,29 @@
 # restore database from backup (place the file in the vagrant catalog om the 
host, and pick it up in /vagrant in the VM):
 # By default, Vagrant will share your project directory (the directory with 
the Vagrantfile) to /vagrant.
 #   $ gunzip -c filename.gz | psql dbname
+#
 # configure netbeans with php application from remote server (sftp at 
127.0.0.1, port 2222)
-# navigate you browser to http://127.0.0.1:8080/portico/
+# navigate you browser to http://127.0.0.1:8080/portico/setup/
+# #
+# You need a section in the header.inc.php as follow:
 #
+#      $GLOBALS['phpgw_domain']['default'] = array
+#      (
+#              'db_host' => 'localhost',
+#              'db_name' => 'portico',
+#              'db_user' => 'portico',
+#              'db_pass' => 'portico',
+#              'db_port' => '5432',
+#              'db_type' => 'postgres',
+#              'db_abstraction' => 'pdo',
+#              'config_passwd' => 'portico'
+#      );
 #
 #
+# Then - log into "Setup/Config Admin Login" (password: portico)
+# And "Edit Current Configuration" to reflect your host.
+#
+#
 # All Vagrant configuration is done below. The "2" in Vagrant.configure
 # configures the configuration version (we support older styles for
 # backwards compatibility). Please don't change it unless you know what

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php  2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php  2017-09-27 
08:06:18 UTC (rev 17122)
@@ -801,7 +801,9 @@
                                                $rights |= $values['rights'];
                                                //stop looking when found
                                                if ($rights & $required)
-                                               return $rights;
+                                               {
+                                                       return $rights;
+                                               }
                                        }
                                }
                        }
@@ -820,13 +822,23 @@
                */
                public function check($location, $required, $appname = '')
                {
+                       static $cache_user_rights = array();
+
+                       
if(isset($cache_user_rights[$this->_account_id][$appname][$location][$required]))
+                       {
+                               return  
$cache_user_rights[$this->_account_id][$appname][$location][$required];
+                       }
+
                        $rights = $this->check_rights($location, $required, 
$appname, -1, 0);
                        $mask = $this->check_rights($location, $required, 
$appname, -1, 1);
 
-                       if ( $mask > 0 && $rights > 0 )
+                       if ( $mask && $rights  )
                        {
                                $rights = false;
                        }
+
+                       
$cache_user_rights[$this->_account_id][$appname][$location][$required] = 
$rights;
+
                        return $rights;
                }
 

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php     
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php     
2017-09-27 08:06:18 UTC (rev 17122)
@@ -605,7 +605,8 @@
                        {
                                if(substr($url, 0, 4) != 'http')
                                {
-                                       $url = 
"{$request_scheme}://{$GLOBALS['phpgw_info']['server']['hostname']}{$url}";
+                                       $server_port = 
phpgw::get_var('SERVER_PORT', 'int','SERVER');
+                                       $url = 
"{$request_scheme}://{$GLOBALS['phpgw_info']['server']['hostname']}:{$server_port}{$url}";
                                }
                        }
 

Modified: branches/Version-2_0-branch/property/inc/class.soresponsible.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soresponsible.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/property/inc/class.soresponsible.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -908,11 +908,17 @@
                                return 0;
                        }
 
+                       if(!empty($data['role_id']))
+                       {
+                               $role_filter = ' AND fm_responsibility_role.id 
=' . (int) $data['role_id'];
+                       }
+
                        $sql = "SELECT contact_id FROM 
fm_responsibility_contact"
                                . " {$this->join} fm_responsibility_role ON 
fm_responsibility_contact.responsibility_role_id = fm_responsibility_role.id"
                                . " {$this->join} fm_responsibility ON 
fm_responsibility_role.responsibility_id = fm_responsibility.id"
                                . " {$this->join} fm_responsibility_module ON 
fm_responsibility.id = fm_responsibility_module.responsibility_id"
                                . ' WHERE cat_id =' . (int)$data['cat_id']
+                               ."{$role_filter}"
                                . ' AND active = 1 AND active_from < ' . time() 
. ' AND (active_to > ' . time() . ' OR active_to = 0) AND expired_on IS NULL'
                                . " {$item_filter}";
 

Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-09-27 08:06:18 UTC (rev 17122)
@@ -3492,7 +3492,9 @@
                                $contact_at_location = 
$this->bo->config->config_data['contact_at_location'];
 
                                $_responsible = 
execMethod('property.boresponsible.get_responsible', array('location'=> 
explode('-', $ticket['location_code']),
-                                       'cat_id' => $ticket['cat_id']));
+                                       'cat_id' => $ticket['cat_id'],
+                                       'role_id' => $contact_at_location
+                                       ));
 
                                if($_responsible)
                                {
@@ -3500,7 +3502,7 @@
                                        $_responsible_name              = 
$GLOBALS['phpgw']->accounts->get($_responsible)->__toString();
                                        $_responsible_email             = 
$prefs['email'];
                                        $_responsible_cellphone = 
$prefs['cellphone'];
-                                       if($contact_email)
+                                       if($contact_email  && 
($contact_data['value_contact_email'] != $_responsible_email))
                                        {
                                                $contact_name2 = 
$_responsible_name;
                                                $contact_email2 = 
$_responsible_email;
@@ -3686,6 +3688,7 @@
                                $id = phpgw::get_var('id'); // in case of bigint
                                $show_cost = phpgw::get_var('show_cost', 
'bool');
                        }
+                       
$GLOBALS['phpgw_info']['user']['preferences']['common']['account_display'] = 
'firstname';
 
                        if (!$show_cost)
                        {
@@ -3765,7 +3768,7 @@
                        }
 
                        $order_id = $ticket['order_id'];
-
+//account_display
                        $user_phone = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['cellphone'];
                        $user_email = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['email'];
                        $order_email_template = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['order_email_template'];
@@ -3776,7 +3779,9 @@
                                $contact_at_location = 
$this->bo->config->config_data['contact_at_location'];
 
                                $_responsible = 
execMethod('property.boresponsible.get_responsible', array('location'=> 
explode('-', $ticket['location_code']),
-                                       'cat_id' => $ticket['cat_id']));
+                                       'cat_id' => $ticket['cat_id'],
+                                       'role_id' => $contact_at_location)
+                                       );
 
                                if($_responsible)
                                {
@@ -3932,15 +3937,17 @@
                        if($location_exceptions)
                        {
                                $important_imformation .= "<b>" . 
lang('important information') . '</b>';
-                       }
-                       foreach ($location_exceptions as $location_exception)
-                       {
-                               $important_imformation .= "<br/>" . 
$location_exception['category_text'];
+                               $important_imformation_arr = array();
+                               foreach ($location_exceptions as 
$location_exception)
+                               {
+                                       $important_imformation_arr[] = 
$location_exception['category_text'];
 
-                               if($location_exception['location_descr'])
-                               {
-                                       $important_imformation .= "<br/>" . 
$location_exception['location_descr'];
+                                       
if($location_exception['location_descr'])
+                                       {
+                                               $important_imformation_arr[] = 
$location_exception['location_descr'];
+                                       }
                                }
+                               $important_imformation .= "\n" . implode("\n", 
$important_imformation_arr);
                        }
 
                        $body .= '<br/>'. nl2br(str_replace(array

Modified: branches/Version-2_0-branch/property/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-09-26 
14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-09-27 
08:06:18 UTC (rev 17122)
@@ -1228,7 +1228,7 @@
                                                                                
        <xsl:apply-templates select="status_list/options"/>
                                                                                
</select>
                                                                        </div>
-                                                                       <div 
class="pure-control-group">
+                                                                       <!--div 
class="pure-control-group">
                                                                                
<label for="name">
                                                                                
        <xsl:value-of select="php:function('lang', 'order received')"/>
                                                                                
</label>
@@ -1260,7 +1260,7 @@
                                                                                
        </table>
                                                                                
</div>
                                                                                
<input  class="pure-custom" type="text" id="order_received_amount" size="6"/>
-                                                                       </div>
+                                                                       </div-->
 
                                                                        <div 
class="pure-control-group">
                                                                                
<div class="pure-custom">

Modified: branches/Version-2_0-branch/rental/inc/class.uiresultunit.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uiresultunit.inc.php   
2017-09-26 14:29:12 UTC (rev 17121)
+++ branches/Version-2_0-branch/rental/inc/class.uiresultunit.inc.php   
2017-09-27 08:06:18 UTC (rev 17122)
@@ -358,7 +358,7 @@
                                }
                        }
 
-                       $success = 
frontend_bofrontend::add_delegate($account_id, null, $org_unit_id, $org_name);
+                       $success = 
frontend_bofrontend::add_delegate($account_id, 0, $org_unit_id, $org_name);
                        $ret = 0;
                        if ($success)
                        {




reply via email to

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