mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed Controller::currentController(), use Controller::curr()
API CHANGE Removed Controller->LinkTo(), use Controller->join_links() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64377 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f225180511
commit
079b491f2e
@ -336,15 +336,6 @@ class Controller extends RequestHandlingData {
|
||||
$this->baseInitCalled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use Controller::curr() instead
|
||||
* @returns Controller
|
||||
*/
|
||||
public static function currentController() {
|
||||
user_error('Controller::currentController() is deprecated. Use Controller::curr() instead.', E_USER_NOTICE);
|
||||
return self::curr();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current controller
|
||||
* @returns Controller
|
||||
@ -371,7 +362,6 @@ class Controller extends RequestHandlingData {
|
||||
* @param member The member whose permissions need checking. Defaults to the currently logged
|
||||
* in user.
|
||||
* @return boolean
|
||||
* @deprecated I don't believe that the system has widespread use/support of this.
|
||||
*/
|
||||
function can($perm, $member = null) {
|
||||
if(!$member) $member = Member::currentUser();
|
||||
@ -391,18 +381,10 @@ class Controller extends RequestHandlingData {
|
||||
*/
|
||||
function Now() {
|
||||
$d = new Date(null);
|
||||
$d->setVal(date("Y-m-d h:i:s"));
|
||||
$d->setValue(date("Y-m-d h:i:s"));
|
||||
return $d;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link to any other page
|
||||
* @deprecated It's unclear what value this has; construct a link manually or use your own custom link-gen functions.
|
||||
*/
|
||||
function LinkTo($a, $b) {
|
||||
return Director::baseURL() . $a . '/' . $b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an absolute link to this controller
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user