public function modify($lang, $parent, $lien, $online, $title, $chapo, $description, $postscriptum, $urlsuiv, $rewriteurl, $associatedContents, $associatedFeatures, $associatedVariants, $images, $documents, $tab) { if ($this->id == '') { throw new TheliaAdminException("Category not found", TheliaAdminException::CATEGORY_NOT_FOUND); } $rubriquedesc = new Rubriquedesc($this->id, $lang); if ($rubriquedesc->id == '') { CacheBase::getCache()->reset_cache(); $rubriquedesc->rubrique = $this->id; $rubriquedesc->lang = $lang; $rubriquedesc->id = $rubriquedesc->add(); } $this->oldParent = $this->parent; if ($this->parent != $parent) { $this->checkOrder($parent); } $this->parent = $parent; $this->lien = $lien; $this->ligne = $online == 'on' ? 1 : 0; $rubriquedesc->chapo = str_replace("\n", "<br />", $chapo); $rubriquedesc->titre = $title; $rubriquedesc->postscriptum = $postscriptum; $rubriquedesc->description = $description; $this->maj(); $rubriquedesc->maj(); $rubriquedesc->reecrire($rewriteurl); $this->setLang($lang); AssociatedContentAdmin::getInstance()->updateAssociatedContents(0, $this->id, $associatedContents); AssociatedVariantAdmin::getInstance()->updateAssociatedVariants($this->id, $associatedVariants); AssociatedFeatureAdmin::getInstance()->updateAssociatedFeatures($this->id, $associatedFeatures); $this->updateImage($images); $this->getImageFile()->ajouter("photo", array("jpg", "gif", "png", "jpeg"), "uploadimage"); $this->updateDocuments($documents); $this->getDocumentFile()->ajouter("document_", array(), "uploaddocument"); ActionsModules::instance()->appel_module("modrub", new Rubrique($this->id)); if ($urlsuiv) { redirige('parcourir.php?parent=' . $this->rubrique); } else { redirige('rubrique_modifier.php?id=' . $this->id . '&tab=' . $tab . '&lang=' . $lang); } }
</tbody> </table> <h3 id="associatedVariantAnchor"> <?php echo trad('GESTION_DECLINAISONS_ASSOCIEES', 'admin'); ?> </h3> <table class="table table-striped"> <tbody id="listeAssociatedVariant"> <tr class="info"> <td class="span10"> <?php $Vlist = AssociatedVariantAdmin::getInstance()->getListAvailableVariant($rubrique->id); $AVlist = AssociatedVariantAdmin::getInstance()->getList($rubrique->id); for ($i = 0; $i < count($Vlist); $i++) { ?> <input type="hidden" id="alive_associated_variant_<?php echo $Vlist[$i]['id']; ?> " name="alive_associated_variant_<?php echo $Vlist[$i]['id']; ?> " value="0" /> <?php } for ($i = 0; $i < count($AVlist); $i++) { ?> <input type="hidden" id="alive_associated_variant_<?php echo $AVlist[$i]['variant_id'];