coverted /admin/ to proper /$CFG->admin/ in paths

This commit is contained in:
skodak
2006-09-26 21:10:14 +00:00
parent eee90c06b8
commit 6859360cd4
17 changed files with 29 additions and 30 deletions
+4 -4
View File
@@ -39,15 +39,15 @@
$postaction = optional_param('postaction', '', PARAM_ALPHAEXT);
/// If the js exists, load it
if ($action) {
$file = $CFG->dirroot . '/admin/xmldb/actions/' . $action . '/' . $action . '.js';
$wwwfile = $CFG->wwwroot . '/admin/xmldb/actions/' . $action . '/' . $action . '.js';
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
if (file_exists($file) && is_readable($file)) {
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
} else {
/// Try to load the postaction javascript if exists
if ($postaction) {
$file = $CFG->dirroot . '/admin/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$wwwfile = $CFG->wwwroot . '/admin/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
if (file_exists($file) && is_readable($file)) {
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
}