Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX: Fixed reports and 2-step publication notification (following …

…on from r101115)
  • Loading branch information...
commit 90d99221aef4b8bf4669108e2c6ab553e77854e2 1 parent d98c8f7
@sminnee sminnee authored
View
4 _config.php
@@ -53,8 +53,8 @@
// Register site reports
// 2 Step
-SS_Report::register('SideReport', 'MyTwoStepDeletionRequests', 20);
-SS_Report::register('SideReport', 'MyTwoStepPublicationRequests', 20);
+SS_Report::register('SideReport', 'SideReportWrapper("UnapprovedDeletions2StepReport")', 20);
+SS_Report::register('SideReport', 'SideReportWrapper("UnapprovedPublications2StepReport")', 20);
SS_Report::register('SideReport', 'MyTwoStepWorkflowRequests', 20);
// 3 Step
View
2  code/TwoStep/WorkflowTwoStepRequest.php
@@ -88,7 +88,7 @@ function approve($comment, $member = null, $notify = true) {
// Action it immediately... if it's not scheduled
if ($this->owner->Status != 'Scheduled') {
- $this->owner->publish($comment, $member, false);
+ $this->owner->publish($comment, $member, $notify);
// Only do these actions here if we've scheduled the action; otherwise publish() will
// comment for us
View
2  code/TwoStep/reports/MyTwoStepWorkflowRequests.php
@@ -30,7 +30,7 @@ function columns() {
);
}
function canView() {
- return false; Object::has_extension('SiteTree', 'SiteTreeCMSTwoStepWorkflow');
+ return Object::has_extension('SiteTree', 'SiteTreeCMSTwoStepWorkflow');
}
}
View
1  code/WorkflowPublicationRequest.php
@@ -128,7 +128,6 @@ public function publish($comment, $member, $notify) {
if($page->getIsModifiedOnStage()) {
$page->doPublish();
}
-
if($notify) $this->notifyPublished($comment);
$this->addNewChange($comment, $this->Status, DataObject::get_by_id('Member', $this->PublisherID));
View
4 tests/TwoStepWorkflowReportsTest.php
@@ -20,7 +20,7 @@ class TwoStepWorkflowReportsTest extends FunctionalTest {
);
function testDeletionRequestsINeedToApproveReport() {
- $report = new MyTwoStepDeletionRequests();
+ $report = new SideReportWrapper('UnapprovedDeletions2StepReport');
$this->assertTrue(is_string($report->title()));
$this->assertTrue(is_string($report->group()));
$this->assertTrue(is_numeric($report->sort()));
@@ -40,7 +40,7 @@ function testDeletionRequestsINeedToApproveReport() {
}
function testPublicationRequestsINeedToApproveReport() {
- $report = new MyTwoStepPublicationRequests();
+ $report = new SideReportWrapper('UnapprovedPublications2StepReport');
$this->assertTrue(is_string($report->title()));
$this->assertTrue(is_string($report->group()));
$this->assertTrue(is_numeric($report->sort()));
Please sign in to comment.
Something went wrong with that request. Please try again.