category_tree::update (public)
category_tree::update -tree_id tree_id -name name \ [ -description description ] [ -site_wide_p site_wide_p ] \ [ -locale locale ] [ -user_id user_id ] \ [ -modifying_ip modifying_ip ]
Defined in packages/categories/tcl/category-trees-procs.tcl
Updates / inserts a category tree translation.
- Switches:
- Options:
- -tree_id (required)
- -name (required)
- -description (optional)
- -site_wide_p (optional, defaults to
"f"
)- -locale (optional)
- -user_id (optional)
- -modifying_ip (optional)
- -tree_id
- tree_id of the category tree to be updated.
- -locale
- locale of the language. [ad_conn locale] used by default.
- -name
- tree name.
- -description
- description of the category tree.
- -user_id
- user that adds the category tree. [ad_conn user_id] used by default.
- -modifying_ip
- ip-address of the user that updated the category tree. [ad_conn peeraddr] used by default.
- Author:
- Timo Hentschel <timo@timohentschel.de>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- category_crud, category_tree_procs
Source code: if {$user_id eq ""} { set user_id [ad_conn user_id] } if {$modifying_ip eq ""} { set modifying_ip [ad_conn peeraddr] } if {$locale eq ""} { set locale [ad_conn locale] } db_transaction { if {![db_0or1row check_tree_existence { select 1 from category_tree_translations where tree_id = :tree_id and locale = :locale }]} { db_exec_plsql insert_tree_translation "" } else { db_exec_plsql update_tree_translation "" } } category_tree::flush_translation_cache $tree_idXQL Not present: Generic PostgreSQL XQL file: <fullquery name="category_tree::update.insert_tree_translation"> <querytext> select category_tree__new_translation ( :tree_id, :locale, :name, :description, current_timestamp, :user_id, :modifying_ip ) </querytext> </fullquery> <fullquery name="category_tree::update.update_tree_translation"> <querytext> select category_tree__edit ( :tree_id, :locale, :name, :description, :site_wide_p, current_timestamp, :user_id, :modifying_ip ) </querytext> </fullquery>packages/categories/tcl/category-trees-procs-postgresql.xql
Oracle XQL file: <fullquery name="category_tree::update.insert_tree_translation"> <querytext> begin category_tree.new_translation ( tree_id => :tree_id, tree_name => :name, description => :description, locale => :locale, modifying_user => :user_id, modifying_ip => :modifying_ip ); end; </querytext> </fullquery> <fullquery name="category_tree::update.update_tree_translation"> <querytext> begin category_tree.edit ( tree_id => :tree_id, tree_name => :name, description => :description, locale => :locale, modifying_user => :user_id, modifying_ip => :modifying_ip ); end; </querytext> </fullquery>packages/categories/tcl/category-trees-procs-oracle.xql