Commit 867286ab authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent 8aa63e47
# /tcl/0-acs-init.tcl
#
# The very first file invoked when OpenACS is started up. Sources
# /packages/acs-tcl/bootstrap/bootstrap.tcl.
#
# jsalz@mit.edu, 12 May 2000
#
# $Id$
# handling NaviServer deprecated ns_info subcommands.
namespace eval acs {
set ::acs::pageroot [expr {[catch {ns_server pagedir}] ? [ns_info pageroot] : [ns_server pagedir]}]
set ::acs::tcllib [expr {[catch {ns_server tcllib}] ? [ns_info tcllib] : [ns_server tcllib]}]
set ::acs::rootdir [file dirname [string trimright $::acs::tcllib "/"]]
}
# Determine the OpenACS root directory, which is the directory right above the
# Tcl library directory ::acs::tcllib.
nsv_set acs_properties root_directory $::acs::rootdir
ns_log "Notice" "Loading OpenACS, rooted at $::acs::rootdir"
set bootstrap_file "$::acs::rootdir/packages/acs-bootstrap-installer/bootstrap.tcl"
if { [file isfile $bootstrap_file] } {
ns_log "Notice" "Sourcing $bootstrap_file"
#
# Check that the appropriate version of tDom (http://www.tdom.org)
# is installed and spit out a comment or try to install it if not.
#
if {[info commands domNode] eq ""} {
if {[ns_info version] < 4} {
ns_log Error "0-acs-init.tcl: domNode command not found -- libtdom.so not loaded?"
} elseif {[ns_info version] >= 4} {
if {[catch {set version [package require tdom]} errmsg]} {
ns_log Error "0-acs-init.tcl: error loading tdom: $errmsg"
} else {
lassign [split $version .] major minor point
if {$major == 0
&& ( $minor < 7 || ($minor == 7 && $point < 8))} {
ns_log Error "0-acs-init.tcl: please use tdom version 0.7.8 or greater (you have version $version)"
}
}
}
}
source $bootstrap_file
} else {
ns_log "Error" "$bootstrap_file does not exist. Aborting the OpenACS load process."
}
# $Id$
# Name: 00-ad-postload.tcl
# Author: Jon Salz <jsalz@mit.edu>
# Date: 24 Feb 2000
# Description: Sources library files that need to be loaded after the rest.
ns_log "Notice" "Sourcing files for postload..."
foreach file [glob -nocomplain ${::acs::tcllib}/*.tcl.postload] {
ns_log Notice "postloading $file"
source $file
}
ns_log "Notice" "Done."
# This should probably be moved to the end of bootstrap.tcl once all files are
# weeded out of the tcl directory.
ns_log "Notice" "Executing initialization code blocks..."
foreach init_item [nsv_get ad_after_server_initialization .] {
array set init $init_item
ns_log "Notice" "Executing initialization code block $init(name) in $init(script)"
if { [llength $init(args)] == 1 } {
set init(args) [lindex $init(args) 0]
}
if { [catch $init(args) error] } {
ns_log "Error" "Error executing initialization code block $init(name) in $init(script): $::errorInfo"
}
}
# The __is_xql helper function is used to filter out just the xql files.
#
# It should return true for directories it should descend as well
# If you had a large static tree with no .xql files you could return 0 on
# the subdirectory and it would not be searched.
proc __is_xql {arg} {
return [expr {[file isdirectory $arg] || [file extension $arg] eq ".xql"}]}
# We need to load query files for the top-level stuff in www and tcl
# dirs is the list of directories to walk for xql files. Packages .xql
# files are parsed elsewhere in the bootstrap process.
foreach dir {www tcl} {
set files [ad_find_all_files -check_file_func __is_xql $::acs::rootdir/$dir]
ns_log Notice "QD=Postload files to load from $dir: $files"
foreach file $files {
db_qd_load_query_file $file
}
}
nsv_unset ad_after_server_initialization .
@doc.type;literal@
<html<if @doc.lang@ not nil> lang="@doc.lang;literal@"</if>>
<head>
<title<if @doc.title_lang@ not nil and @doc.title_lang;literal@ ne @doc.lang;literal@> lang="@doc.title_lang;literal@"</if>>@doc.title@</title>
<multiple name="meta"> <meta<if @meta.http_equiv@ not nil> http-equiv="@meta.http_equiv;literal@"</if><if @meta.name@ not nil> name="@meta.name;noquote@"</if><if @meta.scheme@ not nil> scheme="@meta.scheme;noquote@"</if><if @meta.lang@ not nil and @meta.lang;literal@ ne @doc.lang;literal@> lang="@meta.lang;literal@"</if> content="@meta.content@">
</multiple>
<multiple name="link"> <link rel="@link.rel;literal@" href="@link.href@"<if @link.lang@ not nil and @link.lang;literal@ ne @doc.lang;literal@> lang="@link.lang;literal@"</if><if @link.title@ not nil> title="@link.title@"</if><if @link.type@ not nil> type="@link.type;literal@"</if><if @link.media@ not nil> media="@link.media;literal@"</if>>
</multiple>
<multiple name="___style"> <style type="@___style.type;literal@" <if @___style.lang@ not nil and @___style.lang;literal@ ne @doc.lang;literal@> lang="@___style.lang;literal@"</if><if @___style.title@ not nil> title="@___style.title@"</if><if @___style.media@ not nil> media="@___style.media;literal@"</if>>@___style.style;literal@
</style>
</multiple>
<comment>
These two variables have to be set before the XinhaCore.js is loaded. To
enforce the order, it is put here.
</comment>
<if @::acs_blank_master__htmlareas@ defined and @::xinha_dir@ defined and @::xinha_lang@ defined>
<script type="text/javascript">
_editor_url = "@::xinha_dir;literal@";
_editor_lang = "@::xinha_lang;literal@";
</script>
</if>
<multiple name="headscript"> <script type="@headscript.type;literal@"<if @headscript.src@ not nil> src="@headscript.src;literal@"</if><if @headscript.charset@ not nil> charset="@headscript.charset;literal@"</if><if @headscript.defer@ not nil> defer="@headscript.defer;literal@"</if><if @headscript.async@ not nil> async="@headscript.async;literal@"</if>><if @headscript.content@ not nil>@headscript.content;noquote@</if></script>
</multiple>
<if @head@ not nil>@head;literal@</if>
</head>
<body<if @body.class@ not nil> class="@body.class;literal@"</if><if @body.id@ not nil> id="@body.id;literal@"</if><if @event_handlers@ not nil>@event_handlers;literal@</if>>
@header;literal@
<slave>
@footer;literal@
<multiple name="body_script"> <script type="@body_script.type;literal@"<if @body_script.src@ not nil> src="@body_script.src;literal@"</if><if @body_script.charset@ not nil> charset="@body_script.charset;literal@"</if><if @body_script.defer@ not nil> defer="@body_script.defer;literal@"</if><if @body_script.async@ not nil> async="@body_script.async;literal@"</if>><if @body_script.content@ not nil>@body_script.content;literal@</if></script>
</multiple>
</body>
</html>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment