Commit 89456128 authored by Piers Harding's avatar Piers Harding Committed by Robert Lyon
Browse files

Bug 1577258: Fixing more function signatures for PHP7



behatnotneeded

Change-Id: I38fbf34dae007b7a64e0753a69a8cebb7a3401bd
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 6d475461)
parent d8bafadb
...@@ -36,7 +36,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -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. 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'); return get_string('Annotation', 'artefact.annotation');
} }
......
...@@ -427,7 +427,7 @@ EOF; ...@@ -427,7 +427,7 @@ EOF;
EOF; EOF;
} }
public static function instance_config_validate($form, $values) { public static function instance_config_validate(Pieform $form, $values) {
if (empty($values['tagselect'])) { if (empty($values['tagselect'])) {
// We don't have a tagselect field due to no journal entries having a tag // We don't have a tagselect field due to no journal entries having a tag
......
...@@ -298,7 +298,7 @@ EOF; ...@@ -298,7 +298,7 @@ EOF;
} }
class BrowserIDUser extends LiveUser { class BrowserIDUser extends LiveUser {
public function login($email) { public function login($username, $password=null) {
// This will do one of 3 things // This will do one of 3 things
// 1 - If a user has an account, log them in // 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 // 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 { ...@@ -324,7 +324,7 @@ class BrowserIDUser extends LiveUser {
$institutionjoin = ''; $institutionjoin = '';
$institutionwhere = ''; $institutionwhere = '';
$sqlvalues = array($email); $sqlvalues = array($username);
if ($authinstance->institutionname != 'mahara') { if ($authinstance->institutionname != 'mahara') {
// Make sure that user is in the right institution // Make sure that user is in the right institution
$institutionjoin = 'JOIN {usr_institution} ui ON ui.usr = u.id'; $institutionjoin = 'JOIN {usr_institution} ui ON ui.usr = u.id';
...@@ -372,7 +372,7 @@ class BrowserIDUser extends LiveUser { ...@@ -372,7 +372,7 @@ class BrowserIDUser extends LiveUser {
} }
foreach ($autocreate as $auth) { foreach ($autocreate as $auth) {
if (!$user = $auth->create_new_user($email)) { if (!$user = $auth->create_new_user($username)) {
continue; continue;
} }
$this->authenticate($user, $auth->instanceid); $this->authenticate($user, $auth->instanceid);
...@@ -382,15 +382,15 @@ class BrowserIDUser extends LiveUser { ...@@ -382,15 +382,15 @@ class BrowserIDUser extends LiveUser {
// Autocreation failed; try registration. // Autocreation failed; try registration.
list($form, $registerconfirm) = auth_generate_registration_form('register', 'browserid', '/register.php'); list($form, $registerconfirm) = auth_generate_registration_form('register', 'browserid', '/register.php');
if (!$form) { 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) if (record_exists('usr', 'email', $username)
|| record_exists('artefact_internal_profile_email', 'email', $email)) { || record_exists('artefact_internal_profile_email', 'email', $username)) {
throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $email)); throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $username));
} }
$form['elements']['email'] = array( $form['elements']['email'] = array(
'type' => 'hidden', 'type' => 'hidden',
'value' => $email 'value' => $username
); );
$form['elements']['authtype'] = array( $form['elements']['authtype'] = array(
'type' => 'hidden', 'type' => 'hidden',
......
...@@ -253,7 +253,7 @@ class PluginAuthImap extends PluginAuth { ...@@ -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(); $authinstance = new stdClass();
......
...@@ -49,7 +49,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype { ...@@ -49,7 +49,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return array('external'); return array('external');
} }
public static function get_css_icon() { public static function get_css_icon($blocktypename) {
return 'shield'; return 'shield';
} }
...@@ -247,7 +247,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype { ...@@ -247,7 +247,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return true; return true;
} }
public static function instance_config_form($instance) { public static function instance_config_form(BlockInstance $instance) {
global $USER; global $USER;
$sources = self::get_backpack_source(); $sources = self::get_backpack_source();
...@@ -552,7 +552,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype { ...@@ -552,7 +552,7 @@ class PluginBlocktypeOpenbadgedisplayer extends SystemBlocktype {
return $view->get('owner') != null; return $view->get('owner') != null;
} }
public static function get_instance_javascript() { public static function get_instance_javascript(BlockInstance $bi) {
return array('js/showdetails.js'); 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