-
-
Save hissy/5ea2147516a90710919d to your computer and use it in GitHub Desktop.
<?php | |
namespace Application\Job; | |
use Job as AbstractJob; | |
use Concrete\Core\Workflow\Progress\PageProgress; | |
use Concrete\Core\Workflow\EmptyWorkflow; | |
class ClearEmptyWorkflowProgress extends AbstractJob | |
{ | |
public function getJobName() | |
{ | |
return t("Clear Empty Workflow Progress"); | |
} | |
public function getJobDescription() | |
{ | |
return t("Deletes empty \"Compare Versions\" alert."); | |
} | |
public function run() | |
{ | |
// retrieve all pending page workflow progresses | |
$list = PageProgress::getPendingWorkflowProgressList(); | |
$r = $list->get(); | |
foreach ($r as $w) { | |
$wp = $w->getWorkflowProgressObject(); | |
$wo = $wp->getWorkflowObject(); | |
if ($wo instanceof EmptyWorkflow) { | |
$wp->delete(); | |
} | |
} | |
} | |
} |
nice, thanks
Awesome work Hissy, many thanks for this, this resolves a really annoying issue when developing!
wow! this worked exactly as advertised :) many thanks
Works perfectly. (y)
Please accept additional thanks.
Wheres the donation jar?
Thanks works as advertised!
For the same issue in a 5.7.5.8 install this was just pointed out to me and worked like a charm. Thanks hissy.
Thank you so much, the pop up was driving me crazy! Instructions worked perfectly.
Should this work for Concrete5.8? Because I get php errors as of version 8.2.1.
Thank you very much. Worked perfectly.
Awesome thanks!
Legacy Version: https://gist.github.com/hissy/ea2bfd97641d0dbc3b7485cb66d80e15
More thanks coming your way! @hissy
For Version 9: https://github.com/MacareuxDigital/md_clear_empty_workflow
Usage: