mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API Removed deprecated ModelAsController::find_old_page()
This commit is contained in:
parent
359179025d
commit
de41e14518
@ -158,22 +158,4 @@ class ModelAsController extends Controller implements NestedController
|
||||
|
||||
return self::controller_for($sitetree, $this->getRequest()->param('Action'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 4.0 Use OldPageRedirector::find_old_page instead
|
||||
*
|
||||
* @param string $URLSegment A subset of the url. i.e in /home/contact/ home and contact are URLSegment.
|
||||
* @param int $parent The ID of the parent of the page the URLSegment belongs to.
|
||||
* @param bool $ignoreNestedURLs
|
||||
* @return SiteTree
|
||||
*/
|
||||
public static function find_old_page($URLSegment, $parent = null, $ignoreNestedURLs = false)
|
||||
{
|
||||
Deprecation::notice('4.0', 'Use OldPageRedirector::find_old_page instead');
|
||||
if ($parent) {
|
||||
$parent = SiteTree::get()->byID($parent);
|
||||
}
|
||||
$url = OldPageRedirector::find_old_page(array($URLSegment), $parent);
|
||||
return SiteTree::get_by_link($url);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user