Remove use of "rel" in function getUserPathById

ofaj
jmontoyaa 10 years ago
parent d3882726ae
commit 53a47e5f2f
  1. 5
      main/inc/lib/usermanager.lib.php
  2. 3
      src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.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;
}

@ -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',

Loading…
Cancel
Save