mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Plugin now can have new class bbcodes ('bb_*.php'). Potential plugin addons scan issue fixed.
This commit is contained in:
@@ -1971,12 +1971,18 @@ class e107plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_installed && (substr($adds, -3) == ".bb"))
|
if(substr($adds,-3) == ".bb")
|
||||||
{
|
{
|
||||||
$bb_name = substr($adds, 0, -3); // remove the .bb
|
$bb_name = substr($adds, 0,-3); // remove the .bb
|
||||||
$bb_array[$bb_name] = "0"; // default userclass.
|
$bb_array[$bb_name] = "0"; // default userclass.
|
||||||
|
}
|
||||||
}
|
// bbcode class
|
||||||
|
elseif(substr($adds, 0, 3) == "bb_" && substr($adds, -3) == ".bb")
|
||||||
|
{
|
||||||
|
$bb_name = substr($adds, 0,-3); // remove the .bb
|
||||||
|
$bb_name = substr($bb_name, 0, 3);
|
||||||
|
$bb_array[$bb_name] = "0"; // default userclass. TODO - instance and getPermissions() method
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_installed && (substr($adds, -4) == "_sql"))
|
if ($is_installed && (substr($adds, -4) == "_sql"))
|
||||||
{
|
{
|
||||||
@@ -2052,9 +2058,13 @@ class e107plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Grab List of Shortcodes & BBcodes
|
// Grab List of Shortcodes & BBcodes
|
||||||
$shortcodeList = $fl->get_files(e_PLUGIN.$plugin_path, ".sc$", "standard", 1);
|
$shortcodeList = $fl->get_files(e_PLUGIN.$plugin_path, '\.sc$', "standard", 1);
|
||||||
$bbcodeList = $fl->get_files(e_PLUGIN.$plugin_path, ".bb$", "standard", 1);
|
|
||||||
$sqlList = $fl->get_files(e_PLUGIN.$plugin_path, "_sql.php$", "standard", 1);
|
$bbcodeList = $fl->get_files(e_PLUGIN.$plugin_path, '\.bb$', "standard", 1);
|
||||||
|
$bbcodeClassList= $fl->get_files(e_PLUGIN.$plugin_path, '^bb_(.*)\.php$', "standard", 1);
|
||||||
|
$bbcodeList = array_merge($bbcodeList, $bbcodeClassList);
|
||||||
|
|
||||||
|
$sqlList = $fl->get_files(e_PLUGIN.$plugin_path, '_sql\.php$', "standard", 1);
|
||||||
|
|
||||||
// Search Shortcodes
|
// Search Shortcodes
|
||||||
foreach ($shortcodeList as $sc)
|
foreach ($shortcodeList as $sc)
|
||||||
|
Reference in New Issue
Block a user