update.tcl

Location:
/packages/irc-logger/www/admin/update.tcl
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-02-10
CVS ID:
$Id: update.tcl,v 1.6 2013/09/12 20:34:21 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {

    @author Bart Teeuwisse (bart.teeuwisse@thecodemill.biz)
    @creation-date 2003-02-10
    @cvs-id $Id: update.tcl,v 1.6 2013/09/12 20:34:21 gustafn Exp $
    @arch-tag: 77e44137-ce14-4d71-b1c6-608c58ebcf8a
} {
    date:notnull
}

# Authenticate the user

set user_id [auth::require_login]

# Check for admin privileges

set package_id [ad_conn package_id]
set admin_p [permission::permission_p -object_id $package_id -privilege admin]

foreach rdf_log [glob -nocomplain -directory [parameter::get \
                                                  -parameter irc_rdf_dir \
                                                  -package_id $package_id \
                                                  -default ""$date.rdf] {

    # Touch the log file so that irc::logger::update_log will process
    # the log.

    exec touch $rdf_log

    # Update the ETP page of the log.

    irc::logger::update_log -date [file rootname [file tail $rdf_log]] -package_id $package_id

}

# Return to the main admin page

ad_returnredirect .?[export_vars -url {{updated $date}}]