From: Bartek Przybylski Date: Sat, 9 Jun 2012 13:12:28 +0000 (+0200) Subject: removing app access check, fix title for links in tiles X-Git-Tag: v4.5.0beta1~74^2~422^2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=001293a702be1373c327bc8d5222df3924a7f66a;p=nextcloud-server.git removing app access check, fix title for links in tiles --- diff --git a/apps/gallery/lib/managers.php b/apps/gallery/lib/managers.php index 41300058936..f9a67b8b117 100644 --- a/apps/gallery/lib/managers.php +++ b/apps/gallery/lib/managers.php @@ -4,9 +4,6 @@ namespace OC\Pictures; require_once('lib/base.php'); -\OCP\JSON::checkLoggedIn(); -\OCP\JSON::checkAppEnabled('gallery'); - class DatabaseManager { private static $instance = null; const TAG = 'DatabaseManager'; diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php index f1961cb72e5..e43c99bb76a 100644 --- a/apps/gallery/lib/tiles.php +++ b/apps/gallery/lib/tiles.php @@ -95,7 +95,7 @@ class TileSingle extends TileBase { public function get($extra = '') { // !HACK! file path needs to be encoded twice because files app decode twice url, so any special chars like + or & in filename // !HACK! will result in failing of opening them - return ''; + return ''; } public function getMiniatureSrc() { diff --git a/lib/image.php b/lib/image.php index af61f9424e9..5a2e8202488 100644 --- a/lib/image.php +++ b/lib/image.php @@ -407,7 +407,11 @@ class OC_Image { break; */ default: - $this->resource = imagecreatefromstring(file_get_contents($imagepath)); + error_log($imagepath); + error_log(\OC_Filesystem::getInternalPath($imagepath)); + error_log(\OC_Filesystem::getLocalFile($imagepath)); + // this is mostly file created from encrypted file + $this->resource = imagecreatefromstring(\OC_Filesystem::file_get_contents(\OC_Filesystem::getInternalPath($imagepath))); $itype = IMAGETYPE_PNG; OC_Log::write('core','OC_Image->loadFromFile, Default', OC_Log::DEBUG); break;