Index: openacs-4/packages/categories/tcl/categories-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/categories-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/categories/tcl/categories-procs.tcl 12 Jan 2004 13:37:53 -0000 1.6 +++ openacs-4/packages/categories/tcl/categories-procs.tcl 1 Feb 2004 19:12:51 -0000 1.7 @@ -1,7 +1,7 @@ ad_library { Procs for the site-wide categorization package. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) @creation-date 16 April 2003 @cvs-id $Id: @@ -34,7 +34,7 @@ @option user_id user that adds the category. [ad_conn user_id] used by default. @option creation_ip ip-address of the user that adds the category. [ad_conn peeraddr] used by default. @return category_id - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { if {[empty_string_p $user_id]} { set user_id [ad_conn user_id] @@ -74,7 +74,7 @@ @option description description of the category. @option user_id user that updates the category. [ad_conn user_id] used by default. @option modifying_ip ip-address of the user that updates the category. [ad_conn peeraddr] used by default. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { if {[empty_string_p $user_id]} { set user_id [ad_conn user_id] @@ -109,7 +109,7 @@ @param category_id category_id of the category to be deleted. @see category::reset_translation_cache @see category_tree::flush_cache - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_exec_plsql delete_category "" if {!$batch_mode_p} { @@ -126,7 +126,7 @@ @option category_id category_id whose parent should change. @option tree_id tree_id of the category tree. @option parent_id new parent category_id. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_exec_plsql change_parent_category "" category_tree::flush_cache $tree_id @@ -140,7 +140,7 @@ @param category_id category_id of the category to be phased in @see category::phase_out @see category_tree::flush_cache - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_exec_plsql phase_in "" } @@ -155,7 +155,7 @@ @param category_id category_id of the category to be phased out @see category::phase_in @see category_tree::flush_cache - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_exec_plsql phase_out "" } @@ -170,7 +170,7 @@ @option remove_old Modifier to be used when categorizing existing objects. Will make sure to delete all old categorizations. @option object_id object to be categorized. @param category_id_list tcl-list of category_ids to be mapped to the object. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_transaction { # Remove any already mapped categories if we are updating @@ -179,9 +179,9 @@ } foreach category_id $category_id_list { - if ![empty_string_p $category_id] { - db_dml insert_mapped_categories "" - } + if {![empty_string_p $category_id]} { + db_dml insert_mapped_categories "" + } } } } @@ -191,7 +191,7 @@ @param object_id object of which we want to know the mapped categories. @return tcl-list of category_ids - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { set result [db_list get_mapped_categories ""] @@ -200,7 +200,7 @@ ad_proc -public category::reset_translation_cache { } { Reloads all category translations in the cache. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { catch {nsv_unset categories} set category_id_old 0 @@ -221,7 +221,7 @@ Flushes category translation cache of one category. @param category_id category to be flushed. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_foreach flush_translation_cache "" { set cat_lang($locale) $name @@ -246,7 +246,7 @@ @return list of names corresponding to the list of category_id's supplied. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { if {[empty_string_p $locale]} { set locale [ad_conn locale] @@ -279,7 +279,7 @@ @return list of names corresponding to the list of category_id's supplied. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { set result [list] foreach category_id $category_ids { @@ -292,7 +292,7 @@ Returns the object name and url to be used in a context bar. @param object_id object_id to get the name of. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { set object_name [db_string object_name ""] return [list "/o/$object_id" $object_name] @@ -303,7 +303,7 @@ @param string string to be repeated. @param iteration_number number of times the string should be repeated. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { if { $iteration_number <= 0} { return "" @@ -322,7 +322,7 @@ To be used by the AcsObject.PageUrl service contract. @param object_id category to be displayed. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { db_1row get_tree_id_for_pageurl "" return "categories-browse?tree_ids=$tree_id&category_ids=$object_id" @@ -332,7 +332,7 @@ Callback to be called after package installation. Adds the service contract implementations. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { acs_sc::impl::new -contract_name AcsObject -name category_idhandler -pretty_name "Category tree handler" -owner categories acs_sc::impl::alias::new -contract_name AcsObject -impl_name category_idhandler -operation PageUrl -alias category::pageurl @@ -347,7 +347,7 @@ Callback to be called before package uninstallation. Removes the service contract implementations. - @author Timo Hentschel (thentschel@sussdorff-roy.com) + @author Timo Hentschel (timo@timohentschel.de) } { # shouldn't we first delete the bindings? acs_sc::impl::delete -contract_name AcsObject -impl_name category_idhandler