Merge pull request #133 from opensupports/revert-122-master

Revert "fix bug #58"
This commit is contained in:
Ivan Diaz 2018-01-08 18:07:56 -03:00 committed by GitHub
commit 6f694e387c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 9 deletions

View File

@ -53,7 +53,7 @@ class EditSettingsController extends Controller {
]; ];
foreach($settings as $setting) { foreach($settings as $setting) {
if(Controller::request($setting)!==null) { if(Controller::request($setting)) {
$settingInstance = Setting::getSetting($setting); $settingInstance = Setting::getSetting($setting);
$settingInstance->value = Controller::request($setting); $settingInstance->value = Controller::request($setting);
$settingInstance->store(); $settingInstance->store();
@ -68,7 +68,7 @@ class EditSettingsController extends Controller {
Response::respondSuccess(); Response::respondSuccess();
} }
public function handleLanguages() { public function handleLanguages() {
$allowed = json_decode(Controller::request('allowedLanguages')); $allowed = json_decode(Controller::request('allowedLanguages'));
$supported = json_decode(Controller::request('supportedLanguages')); $supported = json_decode(Controller::request('supportedLanguages'));
@ -83,4 +83,4 @@ class EditSettingsController extends Controller {
} }
} }
} }

View File

@ -66,13 +66,10 @@ class ChangeDepartmentController extends Controller {
$ticket->addEvent($event); $ticket->addEvent($event);
$ticket->department = $department; $ticket->department = $department;
$ticket->unread = true; $ticket->unread = true;
if(!Controller::getLoggedUser()->sharedDepartmentList->includesId($department->id)) {
$ticket->owner = null;
}
$ticket->store(); $ticket->store();
Log::createLog('DEPARTMENT_CHANGED', $ticket->ticketNumber); Log::createLog('DEPARTMENT_CHANGED', $ticket->ticketNumber);
Response::respondSuccess(); Response::respondSuccess();
} }
} }

View File

@ -6,7 +6,7 @@ describe'system/edit-settings' do
result= request('/system/edit-settings', { result= request('/system/edit-settings', {
"csrf_userid" => $csrf_userid, "csrf_userid" => $csrf_userid,
"csrf_token" => $csrf_token, "csrf_token" => $csrf_token,
"maintenance-mode" => 0, "maintenance-mode" => false,
"time-zone" => -3, "time-zone" => -3,
"layout" => 'full-width', "layout" => 'full-width',
"allow-attachments" => 1, "allow-attachments" => 1,
@ -82,4 +82,4 @@ describe'system/edit-settings' do
request('/user/logout') request('/user/logout')
end end
end end