[Pkg-owncloud-commits] [owncloud] 62/79: Simply hide sharing buttons for IE8 - fixes #18011

David Prévot taffit at moszumanska.debian.org
Tue Sep 1 20:55:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit b2adf174332f32afdff6ff4001609831c2f2bee0
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Tue Aug 25 16:05:57 2015 +0200

    Simply hide sharing buttons for IE8 - fixes #18011
---
 apps/files_sharing/settings-personal.php           | 7 +++++++
 apps/files_sharing/templates/settings-personal.php | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/apps/files_sharing/settings-personal.php b/apps/files_sharing/settings-personal.php
index 9ff94eb..f4c9c6c 100644
--- a/apps/files_sharing/settings-personal.php
+++ b/apps/files_sharing/settings-personal.php
@@ -25,6 +25,12 @@
 
 $l = \OC::$server->getL10N('files_sharing');
 
+$isIE8 = false;
+preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
+if (count($matches) > 0 && $matches[1] <= 9) {
+	$isIE8 = true;
+}
+
 $uid = \OC::$server->getUserSession()->getUser()->getUID();
 $server = \OC::$server->getURLGenerator()->getAbsoluteURL('/');
 $cloudID = $uid . '@' . rtrim(\OCA\Files_Sharing\Helper::removeProtocolFromUrl($server), '/');
@@ -38,5 +44,6 @@ $tmpl->assign('message_without_URL', $l->t('Share with me through my #ownCloud F
 $tmpl->assign('owncloud_logo_path', $ownCloudLogoPath);
 $tmpl->assign('reference', $url);
 $tmpl->assign('cloudId', $cloudID);
+$tmpl->assign('showShareIT', !$isIE8);
 
 return $tmpl->fetchPage();
diff --git a/apps/files_sharing/templates/settings-personal.php b/apps/files_sharing/templates/settings-personal.php
index ee761ff..6221de4 100644
--- a/apps/files_sharing/templates/settings-personal.php
+++ b/apps/files_sharing/templates/settings-personal.php
@@ -18,6 +18,7 @@ style('files_sharing', '3rdparty/gs-share/style');
 
 		<br>
 
+		<?php if ($_['showShareIT']) {?>
 		<p>
 			<?php p($l->t('Share it:')); ?>
 			<div class="gs-share">
@@ -68,6 +69,7 @@ style('files_sharing', '3rdparty/gs-share/style');
 
 </a></xmp>
 		</p>
+		<?php } ?>
 
 	</div>
 <?php endif; ?>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list