// No, it's a normal one, just link it to the page $newPage->addCblockLink($coid, $contentareas[$j]['CODE']); } } } } if ($rootlevel >= $copyjobs[$i]["LEVEL"]) { if ($copystarted === true) { break; } } } // Remove source page $sourcePage = $SourcePageMgr->getPage($source); $sourcePage->delete(); $SourcePageMgr->remove($source); $jsQueue = new JSQueue(NULL, $sourcesite); $jsQueue->add($source, HISTORYTYPE_PAGE, 'OBJECT_DELETE', sGuiUS(), 'page', NULL, NULL, $source . '-' . $sourcesite, 'name'); } else { $hasRights = false; $koala->alert($itext['TXT_ERROR_ACCESS_DENIED']); } } elseif ($before != true || $target == 'trash') { // If dragging to folder or trash $pageMgr = new PageMgr($sourcesite); // Special case for trash if ($target == 'trash') { // Get rootnode and set it as target $pagesList = $pageMgr->getTree($node_id, 2); $target = $pagesList[0]['ID']; }
$subnodes = $pageMgr->getSubnodes($currObject, false); if (count($subnodes) > 0) { // Move subnodes to parent $currPage = $pageMgr->getPage($currObject); $pageInfo = $currPage->get(); $currentLevel = $pageInfo['LEVEL']; $currentParent = $pageInfo['PARENT']; foreach ($subnodes as $subnode) { if ($subnode['LEVEL'] == $currentLevel + 1) { if (!$pageMgr->tree->moveTo($subnode['ID'], $currentParent)) { $koala->alert($itext['TXT_ERROR_ACCESS_DENIED']); } } } } if (!in_array($currObject, $pageMgr->remove($currObject))) { $koala->alert($itext['TXT_ERROR_ACCESS_DENIED']); } break; case 'cblock': // Check if object has subnodes $subnodes = sCblockMgr()->getSubnodes($currObject); // Check if contentblock is still used $stillInUse = false; $cb = sCblockMgr()->getCblock($currObject); $linkedObjects = $cb->getLinkedPages(); if (count($linkedObjects) > 0) { $stillInUse = true; } $linkedObjects = $cb->getLinkedMailings(); if (count($linkedObjects) > 0) {