dbclean is restructured

This commit is contained in:
Michael Vogel 2016-10-22 04:57:52 +00:00
parent bc324c3ef4
commit 31409e2ca1

View file

@ -5,6 +5,7 @@
*/
require_once("boot.php");
function dbclean_run(&$argv, &$argc) {
global $a, $db;
if(is_null($a))
@ -22,6 +23,7 @@ load_config('system');
remove_orphans();
killme();
}
/**
* @brief Remove orphaned database entries
@ -68,4 +70,9 @@ function remove_orphans() {
logger("Done deleting orphaned data from tables");
}
if (array_search(__file__,get_included_files())===0){
dbclean_run($_SERVER["argv"],$_SERVER["argc"]);
killme();
}
?>