set.tcl

Set the theme to the specified key

Location:
/packages/acs-subsite/www/admin/themes/set.tcl
Author:
Gustaf Neumann
Created:
2017-01-20

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {
    Set the theme to the specified key

    @author Gustaf Neumann
    @creation-date 2017-01-20
} {
    theme:trim
} -validate {
    new_key_valid -requires new_key {
        if {![db_string check_exists_theme {
            select 1 from subsite_themes where key = :theme
        } -default 0]} {
            ad_complain "Theme with key '$theme' does not exist"
        }
    }
}

subsite::set_theme -theme $theme

ns_returnredirect "."
ad_script_abort

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: