mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Addon validation check moved to separate method. Test added.
This commit is contained in:
@@ -456,7 +456,7 @@ class e_plugin
|
||||
}
|
||||
|
||||
// Generic markup check
|
||||
if ($sc === false && (substr($content, 0, 5) != '<'.'?php') || ((substr($content, -2, 2) != '?'.'>') && (strrpos($content, '?'.'>') !== FALSE)))
|
||||
if ($sc === false && !$this->isValidAddonMarkup($content))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -482,11 +482,19 @@ class e_plugin
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function isValidAddonMarkup($content='')
|
||||
{
|
||||
if ((substr($content, 0, 5) != '<'.'?php') || ((substr($content, -2, 2) != '?'.'>') && (strrpos($content, '?'.'>') !== FALSE)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getUpgradableList()
|
||||
{
|
||||
|
Reference in New Issue
Block a user