Commit c51f85b3 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review

Merge "Bug 1577258: Fixing more function signatures for PHP7" into 16.04_STABLE

parents 7d06ae25 89456128
......@@ -36,7 +36,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return false; // true; // need to do more work on aretfact/artefact.php before this can be switched on.
}
public static function override_instance_title() {
public static function override_instance_title(BlockInstance $instance) {
return get_string('Annotation', 'artefact.annotation');
}
......
......@@ -427,7 +427,7 @@ EOF;
EOF;
}
public static function instance_config_validate($form, $values) {
public static function instance_config_validate(Pieform $form, $values) {
if (empty($values['tagselect'])) {
// We don't have a tagselect field due to no journal entries having a tag
......
......@@ -298,7 +298,7 @@ EOF;
}
class BrowserIDUser extends LiveUser {
public function login($email) {
public function login($username, $password=null) {
// This will do one of 3 things
// 1 - If a user has an account, log them in
// 2 - If a user doesn't have an account, and there is an auth method (which also has weautocreate), create acc and login
......@@ -324,7 +324,7 @@ class BrowserIDUser extends LiveUser {
$institutionjoin = '';
$institutionwhere = '';
$sqlvalues = array($email);
$sqlvalues = array($username);
if ($authinstance->institutionname != 'mahara') {
// Make sure that user is in the right institution
$institutionjoin = 'JOIN {usr_institution} ui ON ui.usr = u.id';
......@@ -372,7 +372,7 @@ class BrowserIDUser extends LiveUser {
}
foreach ($autocreate as $auth) {
if (!$user = $auth->create_new_user($email)) {
if (!$user = $auth->create_new_user($username)) {
continue;
}
$this->authenticate($user, $auth->instanceid);
......@@ -382,15 +382,15 @@ class BrowserIDUser extends LiveUser {
// Autocreation failed; try registration.
list($form, $registerconfirm) = auth_generate_registration_form('register', 'browserid', '/register.php');
if (!$form) {
throw new AuthUnknownUserException(get_string('emailnotfound', 'auth.browserid', $email));
throw new AuthUnknownUserException(get_string('emailnotfound', 'auth.browserid', $username));
}
if (record_exists('usr', 'email', $email)
|| record_exists('artefact_internal_profile_email', 'email', $email)) {
throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $email));
if (record_exists('usr', 'email', $username)
|| record_exists('artefact_internal_profile_email', 'email', $username)) {
throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $username));
}
$form['elements']['email'] = array(
'type' => 'hidden',
'value' => $email
'value' => $username
);
$form['elements']['authtype'] = array(
'type' => 'hidden',
......
......@@ -253,7 +253,7 @@ class PluginAuthImap extends PluginAuth {
);
}
public static function save_instance_config_options($values, $form) {
public static function save_instance_config_options($values, Pieform $form) {
$authinstance = new stdClass();
......
......@@ -49,7 +49,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return array('external');
}
public static function get_css_icon() {
public static function get_css_icon($blocktypename) {
return 'shield';
}
......@@ -247,7 +247,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return true;
}
public static function instance_config_form($instance) {
public static function instance_config_form(BlockInstance $instance) {
global $USER;
$sources = self::get_backpack_source();
......@@ -552,7 +552,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return $view->get('owner') != null;
}
public static function get_instance_javascript() {
public static function get_instance_javascript(BlockInstance $bi) {
return array('js/showdetails.js');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment