mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
ENHANCEMENT: Added new onRenameLinkAsset() handler to static publishing for better link rewriting. (from r89014)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96792 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7ac2203319
commit
c841b11edd
@ -30,7 +30,24 @@ abstract class StaticPublisher extends DataObjectDecorator {
|
|||||||
self::$echo_progress = (boolean)$progress;
|
self::$echo_progress = (boolean)$progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after a page is published.
|
||||||
|
*/
|
||||||
function onAfterPublish($original) {
|
function onAfterPublish($original) {
|
||||||
|
$this->republish($original);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after link assets have been renamed, and the live site has been updated, without
|
||||||
|
* an actual publish event.
|
||||||
|
*
|
||||||
|
* Only called if the published content exists and has been modified.
|
||||||
|
*/
|
||||||
|
function onRenameLinkedAsset($original) {
|
||||||
|
$this->republish($original);
|
||||||
|
}
|
||||||
|
|
||||||
|
function republish($original) {
|
||||||
if (self::$disable_realtime) return;
|
if (self::$disable_realtime) return;
|
||||||
|
|
||||||
$urls = array();
|
$urls = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user