Skip to content

Commit

Permalink
Drift between CVS and git
Browse files Browse the repository at this point in the history
- large deletions
- lucene updates
- error() => print_error()
- NO_MOODLE_COOKIES define
- various other things
  • Loading branch information
Francois Marier committed Jun 25, 2008
1 parent 674b6ac commit 6800d78
Show file tree
Hide file tree
Showing 384 changed files with 3,667 additions and 59,082 deletions.
6 changes: 3 additions & 3 deletions admin/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}

if (!empty($auth) and !exists_auth_plugin($auth)) {
error(get_string('pluginnotinstalled', 'auth', $auth), $url);
print_error('pluginnotinstalled', 'auth', $url, $auth);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -67,7 +67,7 @@
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
print_error('pluginnotenabled', 'auth', $url, $auth);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
Expand All @@ -82,7 +82,7 @@
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
error(get_string('pluginnotenabled', 'auth', $auth), $url);
print_error('pluginnotenabled', 'auth', $url, $auth);
}
// move up the list
if ($key >= 1) {
Expand Down
3 changes: 1 addition & 2 deletions admin/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


/// Do not set moodle cookie because we do not need it here, it is better to emulate session
$nomoodlecookie = true;
define('NO_MOODLE_COOKIES', true);

/// The current directory in PHP version 4.3.0 and above isn't necessarily the
/// directory of the script when run from the command line. The require_once()
Expand Down Expand Up @@ -66,7 +66,6 @@


/// emulate normal session
$SESSION = new object();
$USER = get_admin(); /// Temporarily, to provide environment for this script

/// ignore admins timezone, language and locale - use site deafult instead!
Expand Down
4 changes: 2 additions & 2 deletions admin/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}
if (empty($frm->enable)) {
$frm->enable = array();
Expand Down Expand Up @@ -103,4 +103,4 @@

admin_externalpage_print_footer();

?>
?>
6 changes: 3 additions & 3 deletions admin/mnet/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
} elseif (!empty($form->submit) && $form->submit == get_string('delete')) {
$MNET->get_private_key();
$_SESSION['mnet_confirm_delete_key'] = md5(sha1($MNET->keypair['keypair_PEM'])).':'.time();
$SESSION->mnet_confirm_delete_key = md5(sha1($MNET->keypair['keypair_PEM'])).':'.time();
notice_yesno(get_string("deletekeycheck", "mnet"),
"index.php?sesskey=$USER->sesskey&amp;confirm=".md5($MNET->public_key),
"index.php",
Expand All @@ -61,13 +61,13 @@
// We're deleting


if (!isset($_SESSION['mnet_confirm_delete_key'])) {
if (!isset($SESSION->mnet_confirm_delete_key)) {
// fail - you're being attacked?
}

$key = '';
$time = '';
@list($key, $time) = explode(':',$_SESSION['mnet_confirm_delete_key']);
@list($key, $time) = explode(':',$SESSION->mnet_confirm_delete_key);
$MNET->get_private_key();

if($time < time() - 60) {
Expand Down
2 changes: 1 addition & 1 deletion admin/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$module = optional_param('module', '', PARAM_SAFEDIR);

if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
print_error('confirmsesskeybad', 'error');
}

if ($module != '') {
Expand Down
2 changes: 1 addition & 1 deletion auth/cas/cas_ldap_sync_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
exit;
}

$nomoodlecookie = true; // cookie not needed
define('NO_MOODLE_COOKIES', true);

require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.

Expand Down
2 changes: 1 addition & 1 deletion auth/db/auth_db_sync_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
exit;
}

$nomoodlecookie = true; // cookie not needed
define('NO_MOODLE_COOKIES', true);

require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.

Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ function loginpage_hook() {
*
* NOTE that this code will execute under the OS user credentials,
* so we MUST avoid dealing with files -- such as session files.
* (The caller should set $nomoodlecookie before including config.php)
* (The caller should define('NO_MOODLE_COOKIES', true) before including config.php)
*
*/
function ntlmsso_magic($sesskey) {
Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/auth_ldap_sync_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
exit;
}

$nomoodlecookie = true; // cookie not needed
define('NO_MOODLE_COOKIES', true);

require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.

Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/ntlmsso_magic.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// as we will be executing under the OS security
// context of the user we are trying to login, rather than
// of the webserver.
$nomoodlecookie=true;
define('NO_MOODLE_COOKIES', true);

require_once(dirname(dirname(dirname(__FILE__)))."/config.php");

Expand Down
2 changes: 1 addition & 1 deletion auth/shibboleth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
update_user_login_times();

// Don't show username on login page
set_moodle_cookie('nobody');
$SESSION->set_moodle_cookie('nobody');

set_login_session_preferences();

Expand Down
4 changes: 2 additions & 2 deletions auth/shibboleth/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
$loginurl = (!empty($CFG->alternateloginurl)) ? $CFG->alternateloginurl : '';


if (get_moodle_cookie() == '') {
set_moodle_cookie('nobody'); // To help search for cookies
if ($SESSION->get_moodle_cookie() == '') {
$SESSION->set_moodle_cookie('nobody'); // To help search for cookies
}

if (!empty($CFG->registerauth) or is_enabled_auth('none') or !empty($CFG->auth_instructions)) {
Expand Down
163 changes: 0 additions & 163 deletions backup/db/mysql.php

This file was deleted.

59 changes: 0 additions & 59 deletions backup/db/postgres7.php

This file was deleted.

Loading

0 comments on commit 6800d78

Please sign in to comment.