Merge pull request #501 from AngelFQC/1.10.x

Fix fatal error for moved method
1.10.x
Angel Fernando Quiroz Campos 10 years ago
commit a2c4d3d3b9
  1. 4
      main/document/create_document.php
  2. 2
      main/document/document_lite.php
  3. 2
      main/inc/lib/document.lib.php

@ -300,7 +300,7 @@ if (!$is_allowed_in_course) {
if (!($is_allowed_to_edit ||
$_SESSION['group_member_with_upload_rights'] ||
is_my_shared_folder($userId, $dir, api_get_session_id()))
DocumentManager::is_my_shared_folder($userId, $dir, api_get_session_id()))
) {
api_not_allowed(true);
}
@ -393,7 +393,7 @@ $folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is
// If we are not in the certificates creation, display a folder chooser for the
// new document created
if (!$is_certificate_mode && !is_my_shared_folder($userId, $dir, $current_session_id)) {
if (!$is_certificate_mode && !DocumentManager::is_my_shared_folder($userId, $dir, $current_session_id)) {
$folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit);
$parent_select = $form->addElement('select', 'curdirpath', array(null, get_lang('DestinationDirectory')));

@ -590,7 +590,7 @@ if ($is_allowed_to_edit) {
/* TEMPLATE ACTION */
//Only teacher and all users into their group
if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)){
if ($is_allowed_to_edit || $group_member_with_upload_rights || DocumentManager::is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id)){
if (isset($_GET['add_as_template']) && !isset($_POST['create_template'])) {
$document_id_for_template = intval($_GET['add_as_template']);

@ -5784,7 +5784,7 @@ class DocumentManager
* Checks whether the user is in shared folder
* @return return bool Return true when user is into shared folder
*/
public function is_shared_folder($curdirpath, $current_session_id)
public static function is_shared_folder($curdirpath, $current_session_id)
{
$clean_curdirpath = Security::remove_XSS($curdirpath);
if ($clean_curdirpath == '/shared_folder') {

Loading…
Cancel
Save