From 30460b52dfef0e216cfb86a0e1e8069de6436eb6 Mon Sep 17 00:00:00 2001 From: Sascha Sambale Date: Wed, 25 Oct 2017 06:26:19 +0200 Subject: [PATCH] Updated OpenGraph title to display folder name instead of a nextcloud standard text When sharing a folder via Facebook, WhatsApp or any other platform that makes use of OpenGraph, the display title was "Nextcloud - a safe home for all your data" and the description was the actual name of the folder. This should not be the case, so the display title has been changed to display the folder name and the description now displays the former OpenGraph title. Signed-off-by: Sascha Sambale Fixing whitespaces and empty line. --- apps/files_sharing/lib/Controller/ShareController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index a7cf1a7897..ed9ad33417 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"]);