$form2 = new YesNoForm($lang->get("cr_vr", "Create variation"), $lang->get("crclv_mes", "The cluster does not exists in this variation. Do you want to create it?"));
        				$form2->add(new Hidden("action", "cr_cluster"));
        				$form2->add(new Hidden("oid", $oid));
        				$form2->add(new Hidden("crvar", $variation));
        				$page->add($form2);
        				$handled = true;
        				$action = "foo";
        				$page_action = "UPDATE";
        			}
        		}
		}
		
		if ($action == $lang->get("cl_launch") && $aclf->checkAccessToFunction("B_EXPIRE_LAUNCH")) {
			launchCluster($clnid, 10, $variation);	
		} else if ($action == $lang->get("cl_expire") && $aclf->checkAccessToFunction("B_EXPIRE_LAUNCH")) {
			expireCluster($clnid, $variation);
		}
		
		if ($action == $lang->get("CL_DEL") && $aclf->checkAccessToFunction("DELETE_CL")) {
			//if (!isset($go)) $go = "start";
			if ($go == "0" || $go == "")
				$go = "start";

			$delhandler = new ActionHandler("deleteobject");

			if (value("decision") == $lang->get("yes")) {
				$delhandler->addDBAction("UPDATE cluster_node SET DELETED = 1 WHERE CLNID = $oid");

				$delhandler->addDBAction("UPDATE cluster_content SET FKID=0 WHERE FKID = $oid");
				$delhandler->addDBAction("UPDATE cluster_template_items SET FKID=0 WHERE FKID = $oid");
				
Ejemplo n.º 2
0
/**
 * Expire an article
 * @param integer ID of the article to expire
 * @param integer ID of the level that will be expired
 * @param integer ID of the variation to expire
 */
function expireArticle($articleId, $level, $variation)
{
    global $db;
    $articleIdTrans = translateState($articleId, $level, false);
    clearArticleURL($articleIdTrans, $variation);
    deleteRow("channel_articles", "ARTICLE_ID = {$articleIdTrans}");
    expireCluster($articleId, $variation);
}