From 3c02d134daef883754810e40c144f344d1efb455 Mon Sep 17 00:00:00 2001
From: moodler
Date: Tue, 25 Jan 2005 17:08:05 +0000
Subject: [PATCH] Removed $THEME from admin pages
---
admin/auth.php | 4 ++--
admin/backup.php | 6 +++---
admin/blocks.php | 16 ++--------------
admin/calendar.php | 2 +-
admin/config.php | 4 ++--
admin/cron.php | 14 ++++++--------
admin/dst.html | 5 +----
admin/dst.php | 4 ++--
admin/editor.php | 2 +-
admin/enrol.php | 4 ++--
admin/filters.html | 4 ++--
admin/index.php | 2 +-
admin/lang.php | 34 +++++++++++++++++-----------------
admin/module.php | 2 +-
admin/modules.php | 14 +++-----------
admin/register.php | 2 +-
admin/site.php | 2 +-
17 files changed, 48 insertions(+), 73 deletions(-)
diff --git a/admin/auth.php b/admin/auth.php
index 6a808835c0..4393b7123c 100644
--- a/admin/auth.php
+++ b/admin/auth.php
@@ -104,10 +104,10 @@
echo "
";
- print_simple_box_start("center", "100%", "$THEME->cellheading");
+ print_simple_box_start("center", "100%");
print_heading($options[$auth]);
- print_simple_box_start("center", "60%", "$THEME->cellcontent");
+ print_simple_box_start("center", "60%");
print_string("auth_$auth"."description", "auth");
print_simple_box_end();
diff --git a/admin/backup.php b/admin/backup.php
index c461c00523..a7747abfd8 100644
--- a/admin/backup.php
+++ b/admin/backup.php
@@ -118,11 +118,11 @@
print_simple_box("".get_string("adminhelpbackup")."", "center", "50%");
echo "
";
- print_simple_box_start("center", "", "$THEME->cellheading");
+ print_simple_box_start("center");
//Check for required functions...
- if(!function_exists('utf8_encode')) {
- print_simple_box("You need to add XML support to your PHP installation", "center", "70%", "$THEME->cellheading", "20", "noticebox");
+ if (!function_exists('utf8_encode')) {
+ notify("You need to add XML support to your PHP installation");
}
include ("$CFG->dirroot/backup/config.html");
diff --git a/admin/blocks.php b/admin/blocks.php
index 980b9c3e15..9c73c18ac6 100644
--- a/admin/blocks.php
+++ b/admin/blocks.php
@@ -140,16 +140,6 @@
/// Print the table of all blocks
- if (empty($THEME->custompix)) {
- $pixpath = '../pix';
- // [pj] This is not used anywhere, but I'm leaving it in for the future
- //$modpixpath = '../mod';
- } else {
- $pixpath = '../theme/'.$CFG->theme.'/pix';
- // [pj] This is not used anywhere, but I'm leaving it in for the future
- //$modpixpath = '../theme/'.$CFG->theme.'/pix/mod';
- }
-
$table->head = array ($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings);
$table->align = array ('LEFT', 'RIGHT', 'LEFT', 'CENTER', 'CENTER', 'CENTER', 'CENTER');
$table->wrap = array ('NOWRAP', '', '', '', '', '', '');
@@ -158,8 +148,6 @@
foreach ($blockbyname as $blockname => $blockid) {
- // [pj] This is not used anywhere, but I'm leaving it in for the future
- //$icon = "
name/icon.gif\" hspace="10" height="16" width="16" border="0">";
$blockobject = $blockobjects[$blockid];
$delete = ''.$strdelete.'';
@@ -174,10 +162,10 @@
if ($blocks[$blockid]->visible) {
$visible = ''.
- '
';
+ '
';
} else {
$visible = ''.
- '
';
+ '
';
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($blockobject->instance_allow_multiple()) {
diff --git a/admin/calendar.php b/admin/calendar.php
index 07769806df..1e6b8be038 100644
--- a/admin/calendar.php
+++ b/admin/calendar.php
@@ -104,7 +104,7 @@
// Main display starts here
- print_simple_box_start('center', '100%', $THEME->cellheading);
+ print_simple_box_start('center');
include('./calendar.html');
print_simple_box_end();
diff --git a/admin/config.php b/admin/config.php
index 1bb3e71ab8..01b8d498c7 100644
--- a/admin/config.php
+++ b/admin/config.php
@@ -89,7 +89,7 @@
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
- print_simple_box_start('center', '', "$THEME->cellheading");
+ print_simple_box_start('center');
include('config.html');
print_simple_box_end();
@@ -122,4 +122,4 @@ function validate_form(&$form, &$err) {
return true;
}
-?>
\ No newline at end of file
+?>
diff --git a/admin/cron.php b/admin/cron.php
index c0c759c403..6d2940860f 100644
--- a/admin/cron.php
+++ b/admin/cron.php
@@ -156,15 +156,13 @@
}
if (!empty($CFG->enablerssfeeds)) { //Defined in admin/variables page
- if (file_exists("$CFG->dirroot/rss/rsslib.php")) {
- include_once("$CFG->dirroot/rss/rsslib.php");
- mtrace("Running rssfeeds if required...");
+ include_once("$CFG->libdir/rsslib.php");
+ mtrace("Running rssfeeds if required...");
- if ( ! cron_rss_feeds()) {
- mtrace("Something went wrong while generating rssfeeds!!!");
- } else {
- mtrace("Rssfeeds finished");
- }
+ if ( ! cron_rss_feeds()) {
+ mtrace("Something went wrong while generating rssfeeds!!!");
+ } else {
+ mtrace("Rssfeeds finished");
}
}
diff --git a/admin/dst.html b/admin/dst.html
index db1d9dd435..3801e1c796 100644
--- a/admin/dst.html
+++ b/admin/dst.html
@@ -20,13 +20,10 @@
?>
-
-
-
+ |
/>
/>
-
|
diff --git a/admin/dst.php b/admin/dst.php
index 484b1c3242..c27c3e97c0 100644
--- a/admin/dst.php
+++ b/admin/dst.php
@@ -212,7 +212,7 @@
6 => get_string('saturday', 'calendar')
);
print_heading(get_string('editingdstpreset', 'admin'));
- print_simple_box_start('center', '70%', $THEME->cellheading);
+ print_simple_box_start('center', '70%');
include('./dst_edit.html');
print_simple_box_end();
@@ -231,7 +231,7 @@
}
}
print_heading($strcalendardstpresets);
- print_simple_box_start('center', '70%', $THEME->cellheading);
+ print_simple_box_start('center', '70%');
include('./dst.html');
print_simple_box_end();
}
diff --git a/admin/editor.php b/admin/editor.php
index 4ee3e8143e..e778526119 100644
--- a/admin/editor.php
+++ b/admin/editor.php
@@ -39,7 +39,7 @@
print_heading($streditorsettings);
print_simple_box("$streditorsettingshelp","center","50%");
print("
\n");
- print_simple_box_start("center", "", "$THEME->cellheading");
+ print_simple_box_start("center");
include("editor.html");
print_simple_box_end();
print_footer();
diff --git a/admin/enrol.php b/admin/enrol.php
index e373a7e866..94ef20c0e8 100644
--- a/admin/enrol.php
+++ b/admin/enrol.php
@@ -65,10 +65,10 @@
echo "";
/// Print current enrolment type description
- print_simple_box_start("center", "80%", "$THEME->cellheading");
+ print_simple_box_start("center", "80%");
print_heading($options[$enrol]);
- print_simple_box_start("center", "60%", "$THEME->cellcontent");
+ print_simple_box_start("center", "60%");
print_string("description", "enrol_$enrol");
print_simple_box_end();
diff --git a/admin/filters.html b/admin/filters.html
index fb84bc93b1..70355ed46a 100644
--- a/admin/filters.html
+++ b/admin/filters.html
@@ -1,4 +1,4 @@
-cellheading"); ?>
+
';
}
diff --git a/admin/module.php b/admin/module.php
index 71c052b29a..d32b0d314b 100644
--- a/admin/module.php
+++ b/admin/module.php
@@ -51,7 +51,7 @@
print_simple_box("".get_string("configwarning")."", "center", "50%");
echo "
";
- print_simple_box_start("center", "", "$THEME->cellheading");
+ print_simple_box_start("center", "");
include("$CFG->dirroot/mod/$module/config.html");
print_simple_box_end();
diff --git a/admin/modules.php b/admin/modules.php
index 094629f785..a3d6f03e83 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -144,14 +144,6 @@
/// Print the table of all modules
- if (empty($THEME->custompix)) {
- $pixpath = "../pix";
- $modpixpath = "../mod";
- } else {
- $pixpath = "../theme/$CFG->theme/pix";
- $modpixpath = "../theme/$CFG->theme/pix/mod";
- }
-
$table->head = array ($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings);
$table->align = array ("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER", "CENTER");
$table->wrap = array ("NOWRAP", "", "", "", "","");
@@ -160,7 +152,7 @@
foreach ($modulebyname as $modulename => $module) {
- $icon = "
name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
+ $icon = "
modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
$delete = "name&sesskey=$USER->sesskey\">$strdelete";
@@ -174,11 +166,11 @@
if ($module->visible) {
$visible = "name&sesskey=$USER->sesskey\" title=\"$strhide\">".
- "
";
+ "
pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
$class = "";
} else {
$visible = "name&sesskey=$USER->sesskey\" title=\"$strshow\">".
- "
";
+ "
pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
$class = "class=\"dimmed_text\"";
}
if ($module->name == "forum") {
diff --git a/admin/register.php b/admin/register.php
index b2c47b8556..dd288fc591 100644
--- a/admin/register.php
+++ b/admin/register.php
@@ -47,7 +47,7 @@
/// Print the form
- print_simple_box_start("center", "", "$THEME->cellheading");
+ print_simple_box_start("center", "");
echo "