MDL-15094 some forgotten conversions

This commit is contained in:
skodak
2008-06-05 18:01:22 +00:00
parent c2172d1eb4
commit f67cab32ec
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1233,7 +1233,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
}
/// Check if the guest user exists. If not, create one.
if (! record_exists("user", "username", "guest")) {
if (!$DB->record_exists("user", array("username"=>"guest"))) {
if (! $guest = create_guest_record()) {
notify("Could not create guest user record !!!");
}
+1 -1
View File
@@ -363,7 +363,7 @@ class auth_plugin_db extends auth_plugin_base {
$user->id = $old_user->id;
$DB->set_field('user', 'deleted', 0, array('username'=>$user->username));
echo "\t"; print_string('auth_dbreviveuser', 'auth', array($user->username, $user->id)); echo "\n";
} elseif ($id = insert_record ('user',$user)) { // it is truly a new user
} elseif ($id = $DB->insert_record ('user',$user)) { // it is truly a new user
echo "\t"; print_string('auth_dbinsertuser','auth',array($user->username, $id)); echo "\n";
// if relevant, tag for password generation
if ($this->config->passtype === 'internal') {
+1 -1
View File
@@ -1568,7 +1568,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
/// Process letters
$context = get_context_instance(CONTEXT_COURSE, $restore->course_id);
// respect current grade letters if defined
if ($status and $restoreall and !record_exists('grade_letters', 'contextid', $context->id)) {
if ($status and $restoreall and !$DB->record_exists('grade_letters', array('contextid'=>$context->id))) {
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('gradeletters','grades').'</li>';
}
+1 -1
View File
@@ -2659,7 +2659,7 @@ function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $time
return false;
}
if ($userid && !record_exists('user', 'id', $userid)) {
if ($userid && !$DB->record_exists('user', array('id'=>$userid))) {
debugging('User ID '.intval($userid).' does not exist!');
return false;
}
+1 -1
View File
@@ -233,7 +233,7 @@ abstract class grade_object {
$data = $this->get_record_data();
if (delete_records($this->table, 'id', $this->id)) {
if ($DB->delete_records($this->table, array('id'=>$this->id))) {
if (empty($CFG->disablegradehistory)) {
unset($data->id);
unset($data->timecreated);
+1 -1
View File
@@ -25,7 +25,7 @@
}
/// Check if the guest user exists. If not, create one.
if (! record_exists('user', 'username', 'guest', 'mnethostid', $CFG->mnet_localhost_id)) {
if (!$DB->record_exists('user', array('username'=>'guest', 'mnethostid'=>$CFG->mnet_localhost_id))) {
if (! $guest = create_guest_record()) {
notify('Could not create guest user record !!!');
}