diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-08-25 21:59:14 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-08-25 21:59:14 +0200 |
commit | 6946edef5c33337233d3f46179b37f8c9f900dac (patch) | |
tree | beac46d82517e82bcdb9b1a7aaa0a97ae043c354 /apps | |
parent | e2bd026b2ed4aa0bebc20d3d9cc8defb0ce96a77 (diff) | |
parent | 5cf3170e89ddb9884e2a61c4a015d130fb294cad (diff) | |
download | nextcloud-server-6946edef5c33337233d3f46179b37f8c9f900dac.tar.gz nextcloud-server-6946edef5c33337233d3f46179b37f8c9f900dac.zip |
Merge pull request #18554 from owncloud/fix-gs-share-master
Simply hide sharing buttons for IE8
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/settings-personal.php | 7 | ||||
-rw-r--r-- | apps/files_sharing/templates/settings-personal.php | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_sharing/settings-personal.php b/apps/files_sharing/settings-personal.php index 9ff94eb16c8..f4c9c6cd308 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 ee761ff5897..ae6b909df7e 100644 --- a/apps/files_sharing/templates/settings-personal.php +++ b/apps/files_sharing/templates/settings-personal.php @@ -3,8 +3,10 @@ /** @var array $_ */ script('files_sharing', 'settings-personal'); style('files_sharing', 'settings-personal'); -script('files_sharing', '3rdparty/gs-share/gs-share'); -style('files_sharing', '3rdparty/gs-share/style'); +if ($_['showShareIT']) { + script('files_sharing', '3rdparty/gs-share/gs-share'); + style('files_sharing', '3rdparty/gs-share/style'); +} ?> <?php if ($_['outgoingServer2serverShareEnabled']): ?> @@ -18,6 +20,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 +71,7 @@ style('files_sharing', '3rdparty/gs-share/style'); </a></xmp> </p> + <?php } ?> </div> <?php endif; ?> |