postValues = $post; $this->updating = false; $this->pageId = ($pageNum != '' && is_int($pageNum)) ? $pageNum : $this->postValues['pageId']; $this->currentPage = ''; } /** * Mise à jour si la page est concernée * */ function visitPage(Page $comp, $level) { if ($this->updating == true) { if ($comp->id != $this->currentPage) { $this->updating = false; } } elseif ($comp->id == $this->pageId) { $this->updating = true; } $this->currentPage = $comp->id; } function visitField(Field $comp, $level) { if ($this->updating == true) { $name = $comp->name; $comp->value = isset($this->postValues[$name]) ? stripslashes($this->postValues[$name]) : ''; $comp->status = isset($this->postValues[$name]) ? 'on' : 'off'; } } //Pas d'action sur ces composites function visitFormosite(Formosite $comp, $level) { return true; } function visitBlock(Block $comp, $level) { return true; } } ?>