From 13075628abf6a5bb60f6bee37fbe4126abc7242c Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 21 Sep 2016 13:20:03 +0800 Subject: [PATCH] MDL-55071 core_auth: Move new login renderable to core_auth Part of MDL-55071 --- {lib => auth}/classes/output/login.php | 6 +++--- lib/outputrenderers.php | 4 ++-- login/index.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename {lib => auth}/classes/output/login.php (98%) diff --git a/lib/classes/output/login.php b/auth/classes/output/login.php similarity index 98% rename from lib/classes/output/login.php rename to auth/classes/output/login.php index 3d9895bf45c..d39de6efba8 100644 --- a/lib/classes/output/login.php +++ b/auth/classes/output/login.php @@ -17,12 +17,12 @@ /** * Login renderable. * - * @package core_output + * @package core_auth * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace core\output; +namespace core_auth\output; defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir . '/externallib.php'); @@ -38,7 +38,7 @@ use templatable; /** * Login renderable class. * - * @package core_output + * @package core_auth * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 96f81166ec3..d37a1207381 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -4267,10 +4267,10 @@ EOD; /** * Renders the login form. * - * @param \core\output\login_form $form The renderable. + * @param \core_auth\output\login $form The renderable. * @return string */ - public function render_login(\core\output\login $form) { + public function render_login(\core_auth\output\login $form) { $context = $form->export_for_template($this); // Override because rendering is not supported in template yet. diff --git a/login/index.php b/login/index.php index 9e674c6665c..20d3a4761b9 100644 --- a/login/index.php +++ b/login/index.php @@ -349,7 +349,7 @@ if (isloggedin() and !isguestuser()) { echo $OUTPUT->confirm(get_string('alreadyloggedin', 'error', fullname($USER)), $logout, $continue); echo $OUTPUT->box_end(); } else { - $loginform = new \core\output\login($authsequence, $frm->username); + $loginform = new \core_auth\output\login($authsequence, $frm->username); $loginform->set_error($errormsg); echo $OUTPUT->render($loginform); }