if (($is_allowed_to_edit || $group_member_with_upload_rights) AND count($docs_and_folders)>1) {
if (($is_allowed_to_edit || $group_member_with_upload_rights) AND count($docs_and_folders)>1) {
$row[] = $id['path'];
$row[] = $id['path'];
}
}
// Show the Owner of the file only in groups
// Show the Owner of the file only in groups
@ -824,22 +843,28 @@ else
$column_show=array();
$column_show=array();
if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder($_user['user_id'],$curdirpath))// TODO:check enable more options for shared folders
if ($is_allowed_to_edit || $group_member_with_upload_rights)
{
{
/* CREATE NEW DOCUMENT OR NEW DIRECTORY / GO TO UPLOAD / DOWNLOAD ZIPPED FOLDER */
/* CREATE NEW DOCUMENT OR NEW DIRECTORY / GO TO UPLOAD / DOWNLOAD ZIPPED FOLDER */
if(isset($_SESSION['_gid']) && $_SESSION['_gid']!='') //if the group id is set, check if the user has the right to be here
if(isset($_SESSION['_gid']) && $_SESSION['_gid']!='') //if the group id is set, check if the user has the right to be here
{
{
@ -205,7 +226,7 @@ if(isset($_SESSION['_gid']) && $_SESSION['_gid']!='') //if the group id is set,
api_not_allowed(true);
api_not_allowed(true);
}
}
}
}
elseif($is_allowed_to_edit) //admin for "regular" upload, no group documents
elseif($is_allowed_to_edit || is_my_shared_folder($_user['user_id'], $path)) //admin for "regular" upload, no group documents. And check if is my shared folder
{
{
$to_group_id = 0;
$to_group_id = 0;
$req_gid = '';
$req_gid = '';
@ -215,25 +236,7 @@ else //no course admin and no group member...
api_not_allowed(true);
api_not_allowed(true);
}
}
//what's the current path?
if(isset($_GET['path']) && $_GET['path']!='')
{
$path = $_GET['path'];
}
elseif (isset($_POST['curdirpath']))
{
$path = $_POST['curdirpath'];
}
else
{
$path = '/';
}
//check the path: if the path is not found (no document id), set the path to /