From 923571c5a2964085c7e245fe0454e7e8dbc0860f Mon Sep 17 00:00:00 2001 From: Guillermo Date: Fri, 29 Dec 2017 17:50:46 -0300 Subject: [PATCH 1/3] fix bug #58 --- server/controllers/system/edit-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/controllers/system/edit-settings.php b/server/controllers/system/edit-settings.php index 879a8f12..dfdf7352 100755 --- a/server/controllers/system/edit-settings.php +++ b/server/controllers/system/edit-settings.php @@ -53,7 +53,7 @@ class EditSettingsController extends Controller { ]; foreach($settings as $setting) { - if(Controller::request($setting)) { + if(Controller::request($setting)!==null) { $settingInstance = Setting::getSetting($setting); $settingInstance->value = Controller::request($setting); $settingInstance->store(); @@ -68,7 +68,7 @@ class EditSettingsController extends Controller { Response::respondSuccess(); } - + public function handleLanguages() { $allowed = json_decode(Controller::request('allowedLanguages')); $supported = json_decode(Controller::request('supportedLanguages')); @@ -83,4 +83,4 @@ class EditSettingsController extends Controller { } } -} \ No newline at end of file +} From c002fdf00fd8200f4ba7b7f9ef77b1b9786136dd Mon Sep 17 00:00:00 2001 From: Guillermo Date: Fri, 29 Dec 2017 18:40:59 -0300 Subject: [PATCH 2/3] fix bug #115 --- server/controllers/ticket/change-department.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/controllers/ticket/change-department.php b/server/controllers/ticket/change-department.php index 22679a0d..5cea221d 100755 --- a/server/controllers/ticket/change-department.php +++ b/server/controllers/ticket/change-department.php @@ -66,10 +66,13 @@ class ChangeDepartmentController extends Controller { $ticket->addEvent($event); $ticket->department = $department; $ticket->unread = true; + if(!Controller::getLoggedUser()->sharedDepartmentList->includesId($department->id)) { + $ticket->owner = null; + } $ticket->store(); Log::createLog('DEPARTMENT_CHANGED', $ticket->ticketNumber); Response::respondSuccess(); } -} \ No newline at end of file +} From 02b69936159a35e530c3f0520bf0e334205e72f1 Mon Sep 17 00:00:00 2001 From: Guillermo Date: Thu, 4 Jan 2018 00:57:45 -0300 Subject: [PATCH 3/3] Fix edit settings test --- tests/system/edit-settings.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/edit-settings.rb b/tests/system/edit-settings.rb index 69223599..f39395b7 100644 --- a/tests/system/edit-settings.rb +++ b/tests/system/edit-settings.rb @@ -6,7 +6,7 @@ describe'system/edit-settings' do result= request('/system/edit-settings', { "csrf_userid" => $csrf_userid, "csrf_token" => $csrf_token, - "maintenance-mode" => false, + "maintenance-mode" => 0, "time-zone" => -3, "layout" => 'full-width', "allow-attachments" => 1, @@ -82,4 +82,4 @@ describe'system/edit-settings' do request('/user/logout') end -end \ No newline at end of file +end