Skip to content

Commit

Permalink
Merge branch '3' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 14, 2024
2 parents fa6c222 + 2713c3a commit 4eb8fea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Tasks/SubsiteCopyPagesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use InvalidArgumentException;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\DataObject;
use SilverStripe\Subsites\Model\Subsite;
use SilverStripe\Subsites\Pages\SubsitesVirtualPage;
Expand Down Expand Up @@ -77,16 +78,22 @@ public function run($request)
$childClone->copyVersionToStage('Stage', 'Live');
array_push($stack, [$child->ID, $childClone->ID]);

$this->log(sprintf('Copied "%s" (#%d, %s)', $child->Title, $child->ID, $child->Link()));
Deprecation::withNoReplacement(function () use ($child) {
$this->log(sprintf('Copied "%s" (#%d, %s)', $child->Title, $child->ID, $child->Link()));
});
}
}

unset($children);
}
}

/**
* @deprecated 3.4.0 Will be replaced with new $output parameter in the run() method
*/
public function log($msg)
{
Deprecation::notice('3.4.0', 'Will be replaced with new $output parameter in the run() method');
echo $msg . "\n";
}
}

0 comments on commit 4eb8fea

Please sign in to comment.