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:
Ingo Schommer 2008-10-16 08:40:08 +00:00
parent f225180511
commit 079b491f2e

View File

@ -336,15 +336,6 @@ class Controller extends RequestHandlingData {
$this->baseInitCalled = true; $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 the current controller
* @returns Controller * @returns Controller
@ -371,7 +362,6 @@ class Controller extends RequestHandlingData {
* @param member The member whose permissions need checking. Defaults to the currently logged * @param member The member whose permissions need checking. Defaults to the currently logged
* in user. * in user.
* @return boolean * @return boolean
* @deprecated I don't believe that the system has widespread use/support of this.
*/ */
function can($perm, $member = null) { function can($perm, $member = null) {
if(!$member) $member = Member::currentUser(); if(!$member) $member = Member::currentUser();
@ -391,18 +381,10 @@ class Controller extends RequestHandlingData {
*/ */
function Now() { function Now() {
$d = new Date(null); $d = new Date(null);
$d->setVal(date("Y-m-d h:i:s")); $d->setValue(date("Y-m-d h:i:s"));
return $d; 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 * Returns an absolute link to this controller
*/ */