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

View File

@@ -5707,28 +5707,42 @@ class G
} }
/** /**
* Check the browser compativility * Check the browser compatibility
*/ *
public function checkBrowserCompatibility($browser = null, $version = null){ * @param string $browser
if($browser == null || $version == null){ * @param integer $version
$info = G::getBrowser(); *
$browser = $info['name']; * @return boolean
$version = $info['version']; */
} public function checkBrowserCompatibility($browser = null, $version = null)
if ((($browser== 'msie') && (($version >= 8) && ($version <= 11))) || {
(($browser== 'chrome') && ($version >= 26)) || if ($browser == null || $version == null) {
(($browser== 'firefox') && ($version >= 20)) $info = G::getBrowser();
){ $browser = $info['name'];
return true; $version = $info['version'];
} }
return false;
if (
(($browser == 'msie') && (($version >= 8) && ($version <= 11))) ||
(($browser == 'chrome') && ($version >= 26)) ||
(($browser == 'firefox') && ($version >= 20)) ||
(($browser == 'safari') && ($version >= 10))
) {
return true;
}
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)
{ {
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]", $strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",