* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created unknown * modified 2008-07-02, Frederic Schneider, add security fix * * $Id: include.contentallocation_article.php 128 2019-07-03 11:58:28Z oldperl $: * }} * */ if (!defined('CON_FRAMEWORK')) { die('Illegal call'); } // check requests Contenido_Security::checkRequests(); if (!($perm->have_perm_area_action($area, "storeallocation") || $perm->have_perm_area_action_item($area, "storeallocation", $idcat))) { $notification->displayNotification("error", i18n("Permission denied", "cl-content-allocation")); return; } cInclude("includes", "functions.pathresolver.php"); function str_replace_recursive($array) { if (!is_array($array)) return false; $result = array(); foreach ($array as $value) { $result[] = str_replace("e", "", $value); } return $result; } // fetch idartlang for idart $sql = "SELECT idartlang FROM " . $cfg['tab']['art_lang'] . " WHERE idart=" . Contenido_Security::toInteger($idart) . " AND idlang=" . Contenido_Security::toInteger($lang); $db->query($sql); $db->next_record(); $this_idartlang = $db->f('idartlang'); $oPage = new cPage; $oPage->setMargin(10); $oTree = new pApiContentAllocationComplexList('06bd456d-fe76-40cb-b041-b9ba90dc400a'); $oAlloc = new pApiContentAllocation; if ($_POST['action'] == 'storeallocation') { $oAlloc->storeAllocations($this_idartlang, $_POST['allocation']); } if ($_GET['step'] == 'collapse') { $oTree->setTreeStatus($_GET['idpica_alloc']); } #build category path $catString = ''; prCreateURLNameLocationString($idcat, '/', $catString); $oArticle = new Article($idart, $client, $lang); $sArticleTitle = $oArticle->getField('title'); $sLocationString = "