Beispiel #1
0
 public function delete()
 {
     $db = Loader::db();
     $db->Execute('delete from Workflows where wfID = ?', array($this->wfID));
     foreach ($db->GetArray('select wpID from WorkflowProgress where wfID = ?', array($this->wfID)) as $row) {
         $wfp = WorkflowProgress::getByID($row['wpID']);
         if ($wfp) {
             $wfp->delete();
         }
     }
 }
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$wp = WorkflowProgress::getByID($_REQUEST['wpID']);
$ih = Loader::helper('concrete/interface');
$wf = $wp->getWorkflowObject();
$req = $wp->getWorkflowRequestObject();
if ($wp instanceof PageWorkflowProgress) {
    if ($wf->canApproveWorkflowProgressObject($wp)) {
        $rvc = Page::getByID($req->getRequestedPageID(), $req->getRequestedVersionID());
        $rv = $rvc->getVersionObject();
        $rvl = Page::getByID($req->getRequestedPageID(), 'ACTIVE');
        $rvr = Page::getByID($req->getRequestedPageID(), 'RECENT');
        $liveCVID = $rvl->getVersionID();
        $recentCVID = $rvr->getVersionID();
        $tabs = array(array('requested-version', t('Requested Version: %s', $rv->getVersionComments()), true), array('live-version', t('Live Version')));
        if ($liveCVID != $recentCVID) {
            $tabs[] = array('recent-version', t('Most Recent Version'));
        }
        ?>
	
	<div class="ccm-ui">
	
	<?php 
        echo $ih->tabs($tabs);
        ?>
	
	<div style="display: block" id="ccm-tab-content-requested-version">
		<iframe border="0" id="v<?php 
        echo time();
        ?>