mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add method resolveTask()
This commit is contained in:
parent
cd3026a88a
commit
af9dc81ba4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user