MINOR disable realtime publishing for unit tests

MINOR fix a test that makes no sense
MINOR a couple bugs around embargo/expiry have been fixed (from r85505)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89222 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 22:44:14 +00:00
parent a7c07369e0
commit 610c8cae18

View File

@ -11,6 +11,10 @@ abstract class StaticPublisher extends DataObjectDecorator {
*/
static $echo_progress = false;
// Realtime static publishing... the second a page
// is saved, it is written to the cache
static $disable_realtime = false;
abstract function publishPages($pages);
abstract function unpublishPages($pages);
@ -27,6 +31,8 @@ abstract class StaticPublisher extends DataObjectDecorator {
}
function onAfterPublish($original) {
if (self::$disable_realtime) return;
$urls = array();
if($this->owner->hasMethod('pagesAffectedByChanges')) {
@ -59,6 +65,8 @@ abstract class StaticPublisher extends DataObjectDecorator {
* functionality
*/
function onAfterUnpublish($page) {
if (self::$disable_realtime) return;
if($this->owner->hasMethod('pagesAffectedByUnpublishing')) {
$urls = $this->owner->pagesAffectedByUnpublishing();
$urls = array_unique($urls);