MDL-14679 finished moodlelib conversion

This commit is contained in:
skodak
2008-05-30 19:59:50 +00:00
parent 11fd3d1d8b
commit ae040d4bcc
6 changed files with 386 additions and 408 deletions
+2 -2
View File
@@ -192,8 +192,8 @@ class auth_plugin_db extends auth_plugin_base {
/**
* Change a user's password
*
* @param object $user User table object (with system magic quotes)
* @param string $newpassword Plaintext password (with system magic quotes)
* @param object $user User table object
* @param string $newpassword Plaintext password
*
* @return bool True on success
*/
+5 -5
View File
@@ -1178,8 +1178,8 @@ error('fix temporary table code in CAS');
* called when the user password is updated.
* changes userpassword in external db
*
* @param object $user User table object (with system magic quotes)
* @param string $newpassword Plaintext password (with system magic quotes)
* @param object $user User table object
* @param string $newpassword Plaintext password
* @return boolean result
*
*/
@@ -1193,8 +1193,8 @@ error('fix temporary table code in CAS');
$username = $user->username;
$textlib = textlib_get_instance();
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
$extpassword = $textlib->convert(stripslashes($newpassword), 'utf-8', $this->config->ldapencoding);
$extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
$extpassword = $textlib->convert($newpassword, 'utf-8', $this->config->ldapencoding);
switch ($this->config->passtype) {
case 'md5':
@@ -1213,7 +1213,7 @@ error('fix temporary table code in CAS');
$user_dn = $this->ldap_find_userdn($ldapconnection, $extusername);
if (!$user_dn) {
error_log('LDAP Error in user_update_password(). No DN for: ' . stripslashes($user->username));
error_log('LDAP Error in user_update_password(). No DN for: ' . $user->username);
return false;
}
+2 -2
View File
@@ -135,8 +135,8 @@ class auth_plugin_base {
* auth_user_update_password accepted a username as the first parameter. The
* revised function expects a user object.
*
* @param object $user User table object (with system magic quotes)
* @param string $newpassword Plaintext password (with system magic quotes)
* @param object $user User table object
* @param string $newpassword Plaintext password
*
* @return bool True on success
*/
+370 -392
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -225,7 +225,7 @@ function hotpot_update_events($hotpot) {
delete_records('event', 'modulename', 'hotpot', 'instance', $hotpot->id);
$event = new stdClass();
$event->description = addslashes($hotpot->summary);
$event->description = $hotpot->summary;
$event->courseid = $hotpot->course;
$event->groupid = 0;
$event->userid = 0;
@@ -245,13 +245,13 @@ function hotpot_update_events($hotpot) {
if ($event->timeduration > HOTPOT_MAX_EVENT_LENGTH) { /// Long durations create two events
$event->name = addslashes($hotpot->name).' ('.get_string('hotpotopens', 'hotpot').')';
$event->name = $hotpot->name.' ('.get_string('hotpotopens', 'hotpot').')';
$event->timeduration = 0;
add_event($event);
$event->timestart = $hotpot->timeclose;
$event->eventtype = 'close';
$event->name = addslashes($hotpot->name).' ('.get_string('hotpotcloses', 'hotpot').')';
$event->name = $hotpot->name.' ('.get_string('hotpotcloses', 'hotpot').')';
unset($event->id);
add_event($event);
} else { // single event with duration
+4 -4
View File
@@ -484,8 +484,8 @@ function quiz_refresh_events($courseid = 0) {
}
}
$event->name = addslashes($quiz->name);
$event->description = addslashes($quiz->intro);
$event->name = $quiz->name;
$event->description = $quiz->intro;
$event->courseid = $quiz->course;
$event->groupid = 0;
$event->userid = 0;
@@ -500,10 +500,10 @@ function quiz_refresh_events($courseid = 0) {
$event2 = $event;
$event->name = addslashes($quiz->name).' ('.get_string('quizopens', 'quiz').')';
$event->name = $quiz->name.' ('.get_string('quizopens', 'quiz').')';
$event->timeduration = 0;
$event2->name = addslashes($quiz->name).' ('.get_string('quizcloses', 'quiz').')';
$event2->name = $quiz->name.' ('.get_string('quizcloses', 'quiz').')';
$event2->timestart = $quiz->timeclose;
$event2->eventtype = 'close';
$event2->timeduration = 0;