summaryrefslogtreecommitdiffstats
path: root/apps/gallery
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 13:28:56 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 13:28:56 +0200
commit8e99475886fa3fc23dd576cce7eaefd532c3fe5c (patch)
tree206c1923ac04eea8702805c1e02088b729ff1b9b /apps/gallery
parent8c7f8546716ac77cdeaa134caf9fae22232ce213 (diff)
downloadnextcloud-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.php4
-rwxr-xr-xapps/gallery/index.php4
-rwxr-xr-xapps/gallery/lib/photo.php2
-rwxr-xr-xapps/gallery/lib/scanner.php2
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);
}