diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-01 15:37:29 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-01 15:37:29 +0100 |
commit | e2805f02aa51c602c581bd4f09b99dd791a42df4 (patch) | |
tree | 4ea194f47aa315874c2aac31c30dbdb14110539b /apps/files_sharing/lib | |
parent | 2b4b3b1986e58305c08941f77a693a80cc3d5b85 (diff) | |
parent | 52b679a2d6f6b273f46334b15534ab312f974a1a (diff) | |
download | nextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.tar.gz nextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.zip |
Merge branch 'master' into autocomplete-gui
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index a7cf1a78971..700ac220804 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -406,8 +406,8 @@ class ShareController extends Controller { } // OpenGraph Support: http://ogp.me/ - \OCP\Util::addHeader('meta', ['property' => "og:title", 'content' => $this->defaults->getName() . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')]); - \OCP\Util::addHeader('meta', ['property' => "og:description", 'content' => $this->l10n->t('%s is publicly shared', [$shareTmpl['filename']])]); + \OCP\Util::addHeader('meta', ['property' => "og:title", 'content' => $shareTmpl['filename']]); + \OCP\Util::addHeader('meta', ['property' => "og:description", 'content' => $this->defaults->getName() . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')]); \OCP\Util::addHeader('meta', ['property' => "og:site_name", 'content' => $this->defaults->getName()]); \OCP\Util::addHeader('meta', ['property' => "og:url", 'content' => $shareTmpl['shareUrl']]); \OCP\Util::addHeader('meta', ['property' => "og:type", 'content' => "object"]); @@ -458,6 +458,10 @@ class ShareController extends Controller { if ($files_list === null) { $files_list = [$files]; } + // Just in case $files is a single int like '1234' + if (!is_array($files_list)) { + $files_list = [$files_list]; + } } $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); |