Issue 1567 some php5 syntax on branche 1.5

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10258 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2012-02-28 23:39:24 +00:00
parent 79267ffa16
commit 490f4e9c81

View file

@ -289,7 +289,7 @@
if($m[1] == 'param')
{
if(stripos($m[0], 'allowscriptaccess'))
if(strpos(strtolower($m[0]), 'allowscriptaccess'))
{
$m[0] = '<param name="allowscriptaccess" value="never"';
if(substr($m[0], -1) == '/')
@ -301,13 +301,13 @@
}
else if($m[1] == 'embed')
{
if(stripos($m[0], 'allowscriptaccess'))
if(strpos(strtolower($m[0]), 'allowscriptaccess'))
{
$m[0] = str_ireplace(array('always', 'samedomain'), 'never', $m[0]);
$m[0] = preg_replace('/always|samedomain/i', 'never', $m[0]);
}
else
{
$m[0] = str_ireplace('<embed', '<embed allowscriptaccess="never"', $m[0]);
$m[0] = preg_replace('/\<embed/i', '<embed allowscriptaccess="never"', $m[0]);
}
}
return $m[0];