<?php // $Id$
-// * Miscellaneous settings (still to be sorted)
+// * Miscellaneous settings
+// Experimental settings page
+$temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
+$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
+$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
+$ADMIN->add('misc', $temp);
+
+// XMLDB editor
$ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "$CFG->wwwroot/$CFG->admin/xmldb/"));
+
// hidden scripts linked from elsewhere
$ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot.'/'.$CFG->admin.'/oacleanup.php', 'moodle/site:config', true));
$ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot.'/'.$CFG->admin.'/upgradeforumread.php', 'moodle/site:config', true));
$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_special_perfdebug());
-$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
$ADMIN->add('server', $temp);
function get_content() {
global $CFG;
-
+
+ if (empty($CFG->enableglobalsearch)) {
+ return '';
+ }
+
//cache block contents
if ($this->content !== NULL) {
return $this->content;
// begin {added with admin cleanup}
+$string['experimental'] = 'Experimental';
+$string['enableglobalsearch'] = 'Enable global search';
+$string['configenableglobalsearch'] = 'This setting enables global text searching in resources and activities, it is not compatible with PHP 4.';
+$string['enableajax'] = 'Enable AJAX';
$string['gradebook'] = 'Gradebook';
$string['gradebookroles'] = 'Graded roles';
$string['configgradebookroles'] = 'This setting allows you to control who appears on the gradebook. Users need to have at least one of these roles in a course to be shown in the gradebook for that course.';
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if
require_once('../config.php');
require_once("$CFG->dirroot/search/lib.php");
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
mtrace("<pre>Starting cron...\n");
mtrace("--DELETE----");
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if
//only administrators can index the moodle installation, because access to all pages is required
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if
require_once('../config.php');
require_once("$CFG->dirroot/search/lib.php");
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
$adv = new Object();
//check for php5, but don't die yet (see line 52)
require_once('../config.php');
require_once("$CFG->dirroot/search/lib.php");
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
//check for php5, but don't die yet
if ($check = search_check_php5()) {
require_once("$CFG->dirroot/search/indexlib.php");
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if
require_login();
+ if (empty($CFG->enableglobalsearch)) {
+ error('Global searching is not enabled.');
+ }
+
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
} //if