1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

PHP8 Plugin code cleanup

This commit is contained in:
Cameron
2021-01-21 09:38:38 -08:00
parent 9e0d014e39
commit f055b49d91
83 changed files with 753 additions and 675 deletions

View File

@@ -133,6 +133,50 @@
}
public function testPluginScripts()
{
$core = e107::getPlug()->getCorePluginList();
foreach($core as $plug)
{
$parm = null; //
e107::plugLan($plug, 'global'); // load global language (usually done in class2.php)
e107::getConfig()->setPref('plug_installed/'.$plug, 1); // simulate installed.
$path = e_PLUGIN.$plug;
$files = scandir($path);
unset($files[0], $files[1]); // . and ..
foreach($files as $f)
{
$filePath = $path.'/'.$f;
if(is_dir($filePath) || (strpos($f, '_sql.php') !== false) || strpos($f, '.php') === false)
{
continue;
}
echo " --- ".$filePath." --- \n";
ob_start();
require_once( $filePath);
ob_end_clean();
// echo $plug.'/'.$f."\n";
}
}
}
/**
* @see https://github.com/e107inc/e107/issues/3547