Skip to content
Snippets Groups Projects
Commit 8694883c authored by Uma's avatar Uma
Browse files

Merge branch 'custom_filter' into '7.4.0'

Fixes #1533 date format issue and #706 Privilege for admin user to delete shared list



See merge request !807
parents 0885fa4e bc9f2598
No related branches found
No related tags found
No related merge requests found
......@@ -1804,7 +1804,12 @@ function getValidDBInsertDateValue($value) {
break;
}
}
list($y,$m,$d) = explode('-',$value);
global $current_user;
$formate=$current_user->date_format;
list($d,$m,$y) = explode('-',$value);
if(strlen($d) == 4 || $formate == 'mm-dd-yyyy'){
list($y,$m,$d)=explode('-',$value);
}
if(strlen($y) == 1) $y = '0'.$y;
if(strlen($m) == 1) $m = '0'.$m;
if(strlen($d) == 1) $d = '0'.$d;
......
......@@ -25,7 +25,7 @@ class CustomView_Delete_Action extends Vtiger_Action_Controller {
$moduleModel = $customViewModel->getModule();
$customViewOwner = $customViewModel->getOwnerId();
$currentUser = Users_Record_Model::getCurrentUserModel();
if ((!$currentUser->isAdminUser()) || ($customViewOwner != $currentUser->getId())) {
if ((!$currentUser->isAdminUser()) && ($customViewOwner != $currentUser->getId())) {
throw new AppException(vtranslate('LBL_PERMISSION_DENIED'));
}
$customViewModel->delete();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment