Esempio n. 1
0
$refresh = $this->request->parameters['refresh'];
$wid = $this->request->parameters['wid'];
$objecttype = $this->request->parameters['yg_type'];
$data = explode('-', $ygid);
$icons = new Icons();
$reftracker = new Reftracker();
$siteMgr = new Sites();
switch ($objecttype) {
    case 'mailing':
        $mailingMgr = new MailingMgr();
        $mailingID = $data[0];
        $mailing = $mailingMgr->getMailing($mailingID);
        $mailingInfo = $mailing->get();
        $mailingInfo['RSTAGE'] = $mailing->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $mailingID, 'RSTAGE');
        $nversion = $mailing->getLatestApprovedVersion();
        $oref = $reftracker->getOutgoingForMailing($mailingID, $nversion);
        $oc = 0;
        $outgoing = array();
        $refcohash = array();
        $reftargethash = array();
        for ($i = 0; $i < count($oref); $i++) {
            if (!isset($reftargethash[$oref[$i]["CBID"] . $oref[$i]["TGTOID"] . $oref[$i]["TGTAID"]])) {
                $cov = $oref[$i]["CBVERSION"];
                if ($cov == ALWAYS_LATEST_APPROVED_VERSION) {
                    $cov = 0;
                }
                $cb = sCblockMgr()->getCblock($oref[$i]["CBID"], $cov);
                $cblockInfo = $cb->get();
                $hash = $cblockInfo["ID"];
                if (!isset($refcohash[$hash])) {
                    $outgoing[$oc]["ID"] = $cblockInfo["ID"];