protected function afterUpdate($object) { $id = $object->id; if (!empty($id)) { date_default_timezone_set(Configuration::get('PS_TIMEZONE')); $object->modified = date('Y-m-d H:i:s'); $object->update(); BlogCategory::updateAssocCat($object->id); // clear the post when update Hook::exec('actionsbupdatepost'); } $res = parent::afterUpdate($object); $this->post_format_fields = smartblog::$post_meta_fields; $id_smart_blog_post = (int) Tools::getValue('id_smart_blog_post'); $smart_blog_post = new SmartBlogPost($id_smart_blog_post); if (Validate::isLoadedObject($smart_blog_post)) { // $this->updateAccessories($object); $this->updateTags(Language::getLanguages(false), $object); $this->updateMetaFields($object); } return $res; }