mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #46 - Fixed moodle-plugin-ci warnings.
This commit is contained in:
@@ -20,7 +20,6 @@ use coding_exception;
|
||||
use core\session\manager;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
/**
|
||||
* Outage CLI base class.
|
||||
@@ -48,6 +47,8 @@ abstract class clibase {
|
||||
*/
|
||||
public function __construct(array $options = null) {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
|
||||
if (!is_enabled_auth('outage')) {
|
||||
throw new cli_exception(get_string('cliplugindisabled', 'auth_outage'), cli_exception::ERROR_PLUGIN_DISABLED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user