mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: Added new onRenameLinkAsset() handler to static publishing for better link rewriting. (from r89014) (from r96792)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102482 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
791dc22e5d
commit
b1a088cea3
@ -30,7 +30,24 @@ abstract class StaticPublisher extends DataObjectDecorator {
|
||||
self::$echo_progress = (boolean)$progress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after a page is published.
|
||||
*/
|
||||
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;
|
||||
|
||||
$urls = array();
|
||||
|
Loading…
Reference in New Issue
Block a user