add method resolveTask()

This commit is contained in:
Uwe Steinmann 2020-06-28 13:58:32 +02:00
parent cd3026a88a
commit af9dc81ba4

View File

@ -629,6 +629,19 @@ function getToken($length){
return $token;
}
function resolveTask($task) {
global $dms, $user, $settings, $logger;
if(is_object($task))
return $task;
if(is_string($task)) {
if(class_exists($task)) {
$task = new $task($dms, $user, $settings, $logger);
}
}
return $task;
}
class SeedDMS_CSRF {
protected $secret;