diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 13:28:56 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-02 13:28:56 +0200 |
commit | 8e99475886fa3fc23dd576cce7eaefd532c3fe5c (patch) | |
tree | 206c1923ac04eea8702805c1e02088b729ff1b9b /apps/gallery | |
parent | 8c7f8546716ac77cdeaa134caf9fae22232ce213 (diff) | |
download | nextcloud-server-8e99475886fa3fc23dd576cce7eaefd532c3fe5c.tar.gz nextcloud-server-8e99475886fa3fc23dd576cce7eaefd532c3fe5c.zip |
first part of the config stuff
Diffstat (limited to 'apps/gallery')
-rwxr-xr-x[-rw-r--r--] | apps/gallery/ajax/sharing.php | 4 | ||||
-rwxr-xr-x | apps/gallery/index.php | 4 | ||||
-rwxr-xr-x | apps/gallery/lib/photo.php | 2 | ||||
-rwxr-xr-x | apps/gallery/lib/scanner.php | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php index ce56d652c60..04de57eb177 100644..100755 --- a/apps/gallery/ajax/sharing.php +++ b/apps/gallery/ajax/sharing.php @@ -80,7 +80,7 @@ function handleGetThumbnail($token, $imgpath) { function handleGetAlbumThumbnail($token, $albumname) { $owner = OC_Gallery_Sharing::getTokenOwner($token); - $file = OC_Config::getValue("datadirectory").'/'. $owner .'/gallery/'.$albumname.'.png'; + $file = OCP\Config::getSystemValue("datadirectory").'/'. $owner .'/gallery/'.$albumname.'.png'; $image = new OC_Image($file); if ($image->valid()) { $image->centerCrop(); @@ -93,7 +93,7 @@ function handleGetAlbumThumbnail($token, $albumname) function handleGetPhoto($token, $photo) { $owner = OC_Gallery_Sharing::getTokenOwner($token); - $file = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$owner.'/files'.urldecode($photo); + $file = OCP\Config::getSystemValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$owner.'/files'.urldecode($photo); header('Content-Type: '.OC_Image::getMimeTypeForFile($file)); OC_Response::sendFile($file); } diff --git a/apps/gallery/index.php b/apps/gallery/index.php index 0ae6b15d763..4d49e3212e2 100755 --- a/apps/gallery/index.php +++ b/apps/gallery/index.php @@ -27,8 +27,8 @@ OCP\User::checkLoggedIn(); OC_Util::checkAppEnabled('gallery'); OCP\App::setActiveNavigationEntry( 'gallery_index' ); -if (!file_exists(OC_Config::getValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery')) { - mkdir(OC_Config::getValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery'); +if (!file_exists(OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery')) { + mkdir(OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery'); } if (!isset($_GET['view'])) { diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php index 455ac5036d9..7885ce2bf56 100755 --- a/apps/gallery/lib/photo.php +++ b/apps/gallery/lib/photo.php @@ -68,7 +68,7 @@ class OC_Gallery_Photo { public static function getThumbnail($image_name, $owner = null) { if (!$owner) $owner = OCP\USER::getUser(); - $save_dir = OC_Config::getValue("datadirectory").'/'. $owner .'/gallery/'; + $save_dir = OCP\Config::getSystemValue("datadirectory").'/'. $owner .'/gallery/'; $save_dir .= dirname($image_name). '/'; $image_path = $image_name; $thumb_file = $save_dir . basename($image_name); diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php index 9cf8c113d1f..11c7541a75f 100755 --- a/apps/gallery/lib/scanner.php +++ b/apps/gallery/lib/scanner.php @@ -81,7 +81,7 @@ class OC_Gallery_Scanner { $image->destroy(); } } - imagepng($thumbnail, OC_Config::getValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery/' . $albumName.'.png'); + imagepng($thumbnail, OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery/' . $albumName.'.png'); imagedestroy($thumbnail); } |