#51 preg_match()를 substr_compare() 또는 strncmp()로 대체

This commit is contained in:
bnu 2013-11-22 12:50:01 +09:00
parent 681a9b2d07
commit 63e0fd6f3b
20 changed files with 68 additions and 61 deletions

View file

@ -2256,11 +2256,11 @@ class Context
{
$filename = substr($filename, 2);
}
if(preg_match('/\.js$/i', $filename))
if(substr_compare($filename, '.js', -3) === 0)
{
$self->loadFile(array($plugin_path . $filename, 'body', '', 0), TRUE);
}
elseif(preg_match('/\.css$/i', $filename))
if(substr_compare($filename, '.css', -4) === 0)
{
$self->loadFile(array($plugin_path . $filename, 'all', '', 0), TRUE);
}