From b5cb5dab513441b8c914aaa043921d0affae4604 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= <schiessle@owncloud.com>
Date: Mon, 22 Apr 2013 14:30:10 +0200
Subject: [PATCH] fix encryption to owncloud user for public link shares

---
 apps/files_encryption/lib/keymanager.php | 2 +-
 apps/files_encryption/lib/util.php       | 2 +-
 lib/public/share.php                     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index f23423062b..6fb1f128b5 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -54,7 +54,7 @@ class Keymanager {
 		
 		\OC_FileProxy::$enabled = false;
 		
-		return $view->file_get_contents( '/public-keys/' . '/' . $userId . '.public.key' );
+		return $view->file_get_contents( '/public-keys/' . $userId . '.public.key' );
 		
 		\OC_FileProxy::$enabled = true;
 		
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 1ba339c15d..143ba69f25 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -668,7 +668,7 @@ class Util {
 			// public system user 'ownCloud' (for public shares)
 			if ( 
 				$util->ready() 
-				or $user == 'ownCloud' 
+				or $user == 'owncloud'
 			) {
 			
 				// Construct array of ready UIDs for Keymanager{}
diff --git a/lib/public/share.php b/lib/public/share.php
index 9fd8eb42fb..5cd556c6ac 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -200,7 +200,7 @@ class Share {
 			}
 			
 			if ($result->fetchRow()) {
-				$shares[] = "ownCloud";
+				$shares[] = "owncloud";
 			}
 		}
 		// Include owner in list of users, if requested
-- 
GitLab