mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #2799 from creative-commoners/pulls/4/stop-using-depr
API Stop using deprecated API
This commit is contained in:
commit
495e453dce
@ -652,8 +652,10 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
public function PreviewLink($action = null)
|
public function PreviewLink($action = null)
|
||||||
{
|
{
|
||||||
if ($this->hasMethod('alternatePreviewLink')) {
|
if ($this->hasMethod('alternatePreviewLink')) {
|
||||||
|
Deprecation::withNoReplacement(function () use ($action) {
|
||||||
Deprecation::notice('5.0', 'Use updatePreviewLink or override PreviewLink method');
|
Deprecation::notice('5.0', 'Use updatePreviewLink or override PreviewLink method');
|
||||||
return $this->alternatePreviewLink($action);
|
return $this->alternatePreviewLink($action);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$link = $this->AbsoluteLink($action);
|
$link = $this->AbsoluteLink($action);
|
||||||
|
Loading…
Reference in New Issue
Block a user