This commit is contained in:
Paula Quispe
2018-01-09 10:25:28 -04:00
parent 4c63633189
commit 08b0f98b4f

View File

@@ -5707,27 +5707,41 @@ class G
} }
/** /**
* Check the browser compativility * Check the browser compatibility
*
* @param string $browser
* @param integer $version
*
* @return boolean
*/ */
public function checkBrowserCompatibility($browser = null, $version = null){ public function checkBrowserCompatibility($browser = null, $version = null)
{
if ($browser == null || $version == null) { if ($browser == null || $version == null) {
$info = G::getBrowser(); $info = G::getBrowser();
$browser = $info['name']; $browser = $info['name'];
$version = $info['version']; $version = $info['version'];
} }
if ((($browser== 'msie') && (($version >= 8) && ($version <= 11))) ||
if (
(($browser == 'msie') && (($version >= 8) && ($version <= 11))) ||
(($browser == 'chrome') && ($version >= 26)) || (($browser == 'chrome') && ($version >= 26)) ||
(($browser== 'firefox') && ($version >= 20)) (($browser == 'firefox') && ($version >= 20)) ||
(($browser == 'safari') && ($version >= 10))
) { ) {
return true; return true;
} }
return false; return false;
} }
/* /**
* $string - The string to sanitize. * This function sanitizes the string
* $lowercase - Force the string to lowercase? *
* $alpha - If set to *true*, will remove all non-alphanumeric characters. * @param string $string, The string to sanitize.
* @param boolean $lowercase, Force the string to lowercase
* @param boolean $alpha, If set to *true*, will remove all non-alphanumeric characters.
*
* @return string
*/ */
public function sanitizeString ($string, $lowercase = true, $alpha = false) public function sanitizeString ($string, $lowercase = true, $alpha = false)
{ {