Просмотр исходного кода

Remove use of "rel" in function getUserPathById

jmontoyaa 9 лет назад
Родитель
Сommit
53a47e5f2f

+ 1 - 4
main/inc/lib/usermanager.lib.php

@@ -1425,7 +1425,7 @@ class UserManager
      * function will attempt to create it. Probably not the right place to do it
      * but at least it avoids headaches in many other places.
      * @param   integer $id User ID
-     * @param   string  $type Type of path to return (can be 'system', 'web', 'rel', 'last')
+     * @param   string  $type Type of path to return (can be 'system', 'web', 'last')
      * @return  string  User folder path (i.e. /var/www/chamilo/app/upload/users/1/1/)
      */
     public static function getUserPathById($id, $type)
@@ -1459,9 +1459,6 @@ class UserManager
             case 'web': // Base: absolute web path.
                 $userPath = api_get_path(WEB_UPLOAD_PATH).$userPath;
                 break;
-            case 'rel': // Relative to the document root (e.g. app/upload/users/1/13/)
-                $userPath = api_get_path(REL_UPLOAD_PATH).$userPath;
-                break;
             case 'last': // Only the last part starting with users/
                 break;
         }

+ 1 - 2
src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php

@@ -44,8 +44,7 @@ class PersonalDriver extends Driver implements DriverInterface
 
                 // Adding user personal files
                 $dir = \UserManager::getUserPathById($userId, 'system');
-
-                $dirWeb = \UserManager::getUserPathById($userId, 'rel');
+                $dirWeb = \UserManager::getUserPathById($userId, 'web');
 
                 $driver = array(
                     'driver' => 'PersonalDriver',