Browse files

Remove deprecated Director static functions

Director::redirect() -> Controller->redirect()
Director::redirect_to() -> Controller->redirectedTo()
Director::set_status_code() -> Controller->getResponse()->setStatusCode()
Director::get_status_code() -> Controller->getResponse()->getStatusCode()
Director::redirectBack() -> Controller->redirectBack()
  • Loading branch information...
1 parent de0ade9 commit 66d8ff95deff68b3d5e41de7a7f946a01cf094dc @halkyon halkyon committed Nov 15, 2012
Showing with 0 additions and 49 deletions.
  1. +0 −49 control/Director.php
View
49 control/Director.php
@@ -401,55 +401,6 @@ public static function protocol() {
}
/**
- * Redirect to another page.
- * @deprecated 2.5 Use Controller->redirect()
- * - $url can be an absolute URL
- * - or it can be a URL relative to the "site base"
- * - if it is just a word without an slashes, then it redirects to another action on the current controller.
- */
- public static function redirect($url, $code=302) {
- Deprecation::notice('2.5', 'Use Controller->redirect() instead.');
- Controller::curr()->redirect($url, $code);
- }
-
- /**
- * Tests whether a redirection has been requested.
- * @deprecated 2.5 Use Controller->redirectedTo() instead
- * @return string If redirect() has been called, it will return the URL redirected to. Otherwise, it will
- * return null;
- */
- public static function redirected_to() {
- Deprecation::notice('2.5', 'Use Controller->redirectedTo() instead.');
- return Controller::curr()->redirectedTo();
- }
-
- /**
- * Sets the HTTP status code
- * @deprecated 2.5 Use Controller->getResponse()->setStatusCode() instead
- */
- public static function set_status_code($code) {
- Deprecation::notice('2.5', 'Use Controller->getResponse()->setStatusCode() instead');
- return Controller::curr()->getResponse()->setStatusCode($code);
- }
-
- /**
- * Returns the current HTTP status code
- * @deprecated 2.5 Use Controller->getResponse()->getStatusCode() instead
- */
- public static function get_status_code() {
- Deprecation::notice('2.5', 'Use Controller->getResponse()->getStatusCode() instead');
- return Controller::curr()->getResponse()->getStatusCode();
- }
-
- /**
- * @deprecated 2.5 Use Controller->redirectBack()
- */
- public static function redirectBack() {
- Deprecation::notice('2.5', 'Use Controller->redirectBack() instead.');
- Controller::curr()->redirectBack();
- }
-
- /**
* Returns the root URL for the site.
* It will be automatically calculated unless it is overridden with {@link setBaseURL()}.
*/

0 comments on commit 66d8ff9

Please sign in to comment.