|
From: <var...@us...> - 2016-10-10 13:21:44
|
Revision: 9956
http://sourceforge.net/p/phpwiki/code/9956
Author: vargenau
Date: 2016-10-10 13:21:42 +0000 (Mon, 10 Oct 2016)
Log Message:
-----------
Remove functions to test browser: browserVersion, isBrowserKonqueror, isBrowserSafari, isBrowserOpera
Modified Paths:
--------------
trunk/lib/WikiTheme.php
trunk/lib/config.php
trunk/lib/plugin/YouTube.php
trunk/lib/stdlib.php
Modified: trunk/lib/WikiTheme.php
===================================================================
--- trunk/lib/WikiTheme.php 2016-10-10 13:05:42 UTC (rev 9955)
+++ trunk/lib/WikiTheme.php 2016-10-10 13:21:42 UTC (rev 9956)
@@ -1187,8 +1187,6 @@
{
// Don't set title on default style. This makes it clear to
// the user which is the default (i.e. most supported) style.
- if ($is_alt and isBrowserKonqueror())
- return HTML();
$link = HTML::link(array('rel' => $is_alt ? 'alternate stylesheet' : 'stylesheet',
'type' => 'text/css',
'href' => $this->_findData($css_file)));
Modified: trunk/lib/config.php
===================================================================
--- trunk/lib/config.php 2016-10-10 13:05:42 UTC (rev 9955)
+++ trunk/lib/config.php 2016-10-10 13:21:42 UTC (rev 9956)
@@ -81,53 +81,11 @@
return (strpos(strtolower(browserAgent()), strtolower($match)) !== false);
}
-// returns a similar number for Netscape/Mozilla (gecko=5.0)/IE/Opera features.
-function browserVersion()
-{
- $agent = browserAgent();
- if (strstr($agent, "Mozilla/4.0 (compatible; MSIE"))
- return (float)substr($agent, 30);
- elseif (strstr($agent, "Mozilla/5.0 (compatible; Konqueror/"))
- return (float)substr($agent, 36);
- elseif (strstr($agent, "AppleWebKit/"))
- return (float)substr($agent, strpos($agent, "AppleWebKit/") + 12);
- else
- return (float)substr($agent, 8);
-}
-
function isBrowserIE()
{
- return (browserDetect('Mozilla/') and
- browserDetect('MSIE'));
+ return (browserDetect('Mozilla/') and browserDetect('MSIE'));
}
-// must omit display alternate stylesheets: konqueror 3.1.4
-// http://sourceforge.net/tracker/index.php?func=detail&aid=945154&group_id=6121&atid=106121
-function isBrowserKonqueror($version = false)
-{
- if ($version)
- return browserDetect('Konqueror/') and browserVersion() >= $version;
- return browserDetect('Konqueror/');
-}
-
-// MacOSX Safari has certain limitations. Need detection and patches.
-// * no <object>, only <embed>
-function isBrowserSafari($version = false)
-{
- $found = browserDetect('Spoofer/');
- $found = browserDetect('AppleWebKit/') || $found;
- if ($version)
- return $found and browserVersion() >= $version;
- return $found;
-}
-
-function isBrowserOpera($version = false)
-{
- if ($version)
- return browserDetect('Opera/') and browserVersion() >= $version;
- return browserDetect('Opera/');
-}
-
/**
* If $LANG is undefined:
* Smart client language detection, based on our supported languages
Modified: trunk/lib/plugin/YouTube.php
===================================================================
--- trunk/lib/plugin/YouTube.php 2016-10-10 13:05:42 UTC (rev 9955)
+++ trunk/lib/plugin/YouTube.php 2016-10-10 13:21:42 UTC (rev 9956)
@@ -193,9 +193,6 @@
'type' => 'application/x-shockwave-flash',
'width' => $width,
'height' => $height);
- if (isBrowserSafari()) {
- return HTML::object($attrs);
- }
$object->pushContent(HTML::param(array('name' => 'movie', 'value' => $url)));
$object->pushContent(HTML::param(array('name' => 'wmode', 'value' => 'transparent')));
$object->pushContent(HTML::object($attrs));
Modified: trunk/lib/stdlib.php
===================================================================
--- trunk/lib/stdlib.php 2016-10-10 13:05:42 UTC (rev 9955)
+++ trunk/lib/stdlib.php 2016-10-10 13:21:42 UTC (rev 9956)
@@ -651,9 +651,6 @@
if ($params) {
foreach ($params as $param) $object->pushContent($param);
}
- if (isBrowserSafari() and !isBrowserSafari(532)) { // recent chrome can do OBJECT
- return HTML::embed($object->_attr, $object->_content);
- }
$object->pushContent(HTML::embed($object->_attr));
return $object;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|