diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
commit | 70cea18cce0fcdb4d8118ff2d7abccc922417a6a (patch) | |
tree | 7f8c476cb75b38fea3ed4ad555f00885f6da2670 /apps/files_versions | |
parent | dc7cdda5ccc7d40bf9865e1af5a7846782ec700b (diff) | |
download | nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.tar.gz nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.zip |
ported getUser
Diffstat (limited to 'apps/files_versions')
-rwxr-xr-x[-rw-r--r--] | apps/files_versions/ajax/getVersions.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/files_versions/ajax/rollbackVersion.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/files_versions/versions.php | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php index 32aac10b718..9f5b5908797 100644..100755 --- a/apps/files_versions/ajax/getVersions.php +++ b/apps/files_versions/ajax/getVersions.php @@ -4,7 +4,7 @@ require_once('../../../lib/base.php'); OC_JSON::checkAppEnabled('files_versions'); require_once('../versions.php'); -$userDirectory = "/".OC_User::getUser()."/files"; +$userDirectory = "/".OCP\USER::getUser()."/files"; $source = $_GET['source']; $source = strip_tags( $source ); diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php index 660411973a2..a7b18c4e091 100644..100755 --- a/apps/files_versions/ajax/rollbackVersion.php +++ b/apps/files_versions/ajax/rollbackVersion.php @@ -4,7 +4,7 @@ require_once('../../../lib/base.php'); OC_JSON::checkAppEnabled('files_versions'); require_once('../versions.php'); -$userDirectory = "/".OC_User::getUser()."/files"; +$userDirectory = "/".OCP\USER::getUser()."/files"; $source = $_GET['source']; diff --git a/apps/files_versions/versions.php b/apps/files_versions/versions.php index 36efb764033..5f8767fd768 100644..100755 --- a/apps/files_versions/versions.php +++ b/apps/files_versions/versions.php @@ -44,7 +44,7 @@ class Storage { public static function init() { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { // create versions folder - $foldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $foldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); if(!is_dir($foldername)){ mkdir($foldername); } @@ -69,8 +69,8 @@ class Storage { */ public static function store($filename) { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { - $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); - $filesfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/files'; + $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $filesfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/files'; Storage::init(); // check if filename is a directory @@ -124,9 +124,9 @@ class Storage { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { - $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); - $filesfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/files'; + $filesfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/files'; // rollback if ( @copy($versionsfoldername.$filename.'.v'.$revision,$filesfoldername.$filename) ) { @@ -148,7 +148,7 @@ class Storage { */ public static function isversioned($filename) { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { - $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); // check for old versions $matches=glob($versionsfoldername.$filename.'.v*'); @@ -169,7 +169,7 @@ class Storage { */ public static function getversions($filename,$count=0) { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { - $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); $versions=array(); // fetch for old versions @@ -201,7 +201,7 @@ class Storage { public static function expire($filename) { if(\OC_Config::getValue('files_versions', Storage::DEFAULTENABLED)=='true') { - $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OC_User::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); + $versionsfoldername=\OC_Config::getValue('datadirectory').'/'. \OCP\USER::getUser() .'/'.\OC_Config::getValue('files_versionsfolder', Storage::DEFAULTFOLDER); // check for old versions $matches=glob($versionsfoldername.$filename.'.v*'); |