diff options
author | Sascha Sambale <mastixmc@gmail.com> | 2017-10-25 06:26:19 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-10-25 18:33:27 +0200 |
commit | 30460b52dfef0e216cfb86a0e1e8069de6436eb6 (patch) | |
tree | bdfc0a72ff59691d6d35d8a83f1a6e160663ad17 /apps | |
parent | 9f5e1648c106893425790385b8741499ae08f2b6 (diff) | |
download | nextcloud-server-30460b52dfef0e216cfb86a0e1e8069de6436eb6.tar.gz nextcloud-server-30460b52dfef0e216cfb86a0e1e8069de6436eb6.zip |
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 <mastixmc@gmail.com>
Fixing whitespaces and empty line.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index a7cf1a78971..ed9ad33417a 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"]); |