diff --git a/main/admin/group_list.php b/main/admin/group_list.php index f5de4c5729..a94a0fdedd 100755 --- a/main/admin/group_list.php +++ b/main/admin/group_list.php @@ -249,7 +249,8 @@ function lock_unlock_user($status, $user_id) { } if (($status_db == '1' OR $status_db == '0') AND is_numeric($user_id)) { - $sql = "UPDATE $user_table SET active=".intval($status_db)." WHERE user_id=".intval($user_id).""; + $sql = "UPDATE $user_table SET active=".intval($status_db)." + WHERE user_id=".intval($user_id).""; $result = Database::query($sql); } diff --git a/main/admin/user_edit.php b/main/admin/user_edit.php index 0f2138f5df..80109bdbc8 100755 --- a/main/admin/user_edit.php +++ b/main/admin/user_edit.php @@ -396,44 +396,6 @@ if ($form->validate()) { $extraFieldValue = new ExtraFieldValue('user'); $extraFieldValue->saveFieldValues($user); - /*foreach ($user as $key => $value) { - if (substr($key, 0, 6) == 'extra_') { - //an extra field - //@todo remove this as well as in the profile.php ad put it in a function - if (is_array($value) && isset($value['Y']) && isset($value['F']) && isset($value['d'])) { - if (isset($value['H']) && isset($value['i'])) { - // extra field date time - $time = mktime($value['H'],$value['i'],0,$value['F'],$value['d'],$value['Y']); - $value = date('Y-m-d H:i:s',$time); - } else { - // extra field date - $time = mktime(0,0,0,$value['F'],$value['d'],$value['Y']); - $value = date('Y-m-d',$time); - } - } - // For array $value -> if exists key 'tmp_name' then must not be empty - // This avoid delete from user field value table when doesn't upload a file - if (is_array($value)) { - if (array_key_exists('tmp_name', $value) && empty($value['tmp_name'])) { - //Nothing to do - } else { - if (array_key_exists('tmp_name', $value)) { - $value['tmp_name'] = Security::filter_filename($value['tmp_name']); - } - if (array_key_exists('name', $value)) { - $value['name'] = Security::filter_filename($value['name']); - } - UserManager::update_extra_field_value($user_id, substr($key, 6), $value); - } - } else { - UserManager::update_extra_field_value($user_id, substr($key, 6), $value); - } - } elseif (strpos($key, 'remove_extra') !== false) { - $extra_value = Security::filter_filename(urldecode(key($value))); - // To remove from user_field_value and folder - UserManager::update_extra_field_value($user_id, substr($key,13), $extra_value); - } - }*/ $tok = Security::get_token(); header('Location: user_list.php?action=show_message&message='.urlencode(get_lang('UserUpdated')).'&sec_token='.$tok); exit(); diff --git a/main/dropbox/index.php b/main/dropbox/index.php index 5cab41cc86..be8822093f 100755 --- a/main/dropbox/index.php +++ b/main/dropbox/index.php @@ -71,15 +71,15 @@ if (isset($_POST['submitWork'])) { } // Display the form for adding a category -if ($action == 'addreceivedcategory' or $action == 'addsentcategory') { +if ($action == 'addreceivedcategory' || $action == 'addsentcategory') { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } - display_addcategory_form($_POST['category_name'],'',$_GET['action']); + display_addcategory_form($_POST['category_name'], '', $_GET['action']); } // Editing a category: displaying the form -if ($action == 'editcategory' and isset($_GET['id'])) { +if ($action == 'editcategory' && isset($_GET['id'])) { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } @@ -108,7 +108,7 @@ if (isset($_POST['StoreCategory'])) { // Move a File -if (($action == 'movesent' OR $action == 'movereceived') AND isset($_GET['move_id'])) { +if (($action == 'movesent' || $action == 'movereceived') AND isset($_GET['move_id'])) { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } @@ -127,7 +127,7 @@ if (isset($_POST['do_move'])) { } // Delete a file -if (($action == 'deletereceivedfile' OR $action == 'deletesentfile') AND isset($_GET['id']) AND is_numeric($_GET['id'])) { +if (($action == 'deletereceivedfile' || $action == 'deletesentfile') AND isset($_GET['id']) AND is_numeric($_GET['id'])) { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } @@ -144,7 +144,7 @@ if (($action == 'deletereceivedfile' OR $action == 'deletesentfile') AND isset($ } // Delete a category -if (($action == 'deletereceivedcategory' OR $action == 'deletesentcategory') AND isset($_GET['id']) AND is_numeric($_GET['id'])) { +if (($action == 'deletereceivedcategory' || $action == 'deletesentcategory') AND isset($_GET['id']) AND is_numeric($_GET['id'])) { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } @@ -205,7 +205,7 @@ if ($action != 'add') { } // ACTIONS - if ($view == 'received' OR !$dropbox_cnf['sent_received_tabs']) { + if ($view == 'received' || !$dropbox_cnf['sent_received_tabs']) { //echo '

'.get_lang('ReceivedFiles').'

'; // This is for the categories @@ -242,7 +242,7 @@ if ($action != 'add') { } } - if (!$view OR $view == 'sent' OR !$dropbox_cnf['sent_received_tabs']) { + if (!$view || $view == 'sent' || !$dropbox_cnf['sent_received_tabs']) { // This is for the categories if (isset($viewSentCategory) AND $viewSentCategory != '') { $view_dropbox_category_sent = $viewSentCategory; @@ -284,7 +284,7 @@ if ($action != 'add') { if ($dropbox_cnf['sent_received_tabs']) { ?>