Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX Use of Link() in security classes now refers to $this->controller

instead of calling the instance method Link statically (which isn't
allowed for E_STRICT compliance.)
  • Loading branch information...
commit fd3de5158d4231bce15d69d9d6cfca1b0cc4f3f1 1 parent 6b40377
@halkyon halkyon authored
View
2  security/ChangePasswordForm.php
@@ -111,7 +111,7 @@ function doChangePassword(array $data) {
}
else {
// Redirect to default location - the login form saying "You are logged in as..."
- $redirectURL = HTTP::setGetVar('BackURL', Director::absoluteBaseURL(), Security::Link('login'));
+ $redirectURL = HTTP::setGetVar('BackURL', Director::absoluteBaseURL(), $this->controller->Link('login'));
Director::redirect($redirectURL);
}
} else {
View
6 security/MemberLoginForm.php
@@ -130,14 +130,14 @@ public function dologin($data) {
if(isset($_REQUEST['BackURL'])) $backURL = $_REQUEST['BackURL'];
else $backURL = null;
- if($backURL) Session::set('BackURL', $backURL);
+ if($backURL) Session::set('BackURL', $backURL);
if($badLoginURL = Session::get("BadLoginURL")) {
$this->controller->redirect($badLoginURL);
} else {
// Show the right tab on failed login
- $loginLink = Director::absoluteURL(Security::Link("login"));
- if($backURL) $loginLink .= '?BackURL=' . urlencode($backURL);
+ $loginLink = Director::absoluteURL($this->controller->Link('login'));
+ if($backURL) $loginLink .= '?BackURL=' . urlencode($backURL);
$this->controller->redirect($loginLink . '#' . $this->FormName() .'_tab');
}
}
View
2  security/PermissionCheckboxSetField.php
@@ -281,7 +281,7 @@ class PermissionCheckboxSetField_Readonly extends PermissionCheckboxSetField {
protected $readonly = true;
- function saveInto($record) {
+ function saveInto(DataObjectInterface $record) {
return false;
}
}
View
4 security/Security.php
@@ -514,7 +514,9 @@ public function passwordsent($request) {
*/
public static function getPasswordResetLink($autoLoginHash) {
$autoLoginHash = urldecode($autoLoginHash);
- return self::Link('changepassword') . "?h=$autoLoginHash";
+ $selfControllerClass = __CLASS__;
+ $selfController = new $selfControllerClass();
+ return $selfController->Link('changepassword') . "?h=$autoLoginHash";
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.