Disabled global search by default and marked as experimental MDL-7296 and AJAX moved to experimental too; merged from MOODLE_17_STABLE

This commit is contained in:
skodak 2006-10-30 21:01:47 +00:00
parent 8b497bbce3
commit 721d74b02c
13 changed files with 62 additions and 3 deletions

View File

@ -1,9 +1,17 @@
<?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));

View File

@ -88,7 +88,6 @@ $ADMIN->add('server', $temp);
$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);

View File

@ -30,7 +30,11 @@
function get_content() {
global $CFG;
if (empty($CFG->enableglobalsearch)) {
return '';
}
//cache block contents
if ($this->content !== NULL) {
return $this->content;

View File

@ -3,6 +3,10 @@
// 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.';

View File

@ -5,6 +5,10 @@
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

View File

@ -15,6 +15,10 @@
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----");

View File

@ -5,6 +5,10 @@
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

View File

@ -25,6 +25,10 @@
//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

View File

@ -9,6 +9,10 @@
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

View File

@ -25,6 +25,14 @@
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)

View File

@ -7,6 +7,14 @@
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");

View File

@ -15,6 +15,10 @@
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

View File

@ -5,6 +5,10 @@
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