diff --git a/backup/backup_scheduled.php b/backup/backup_scheduled.php index 87ab3a1ef7b..cf396c0d846 100644 --- a/backup/backup_scheduled.php +++ b/backup/backup_scheduled.php @@ -201,7 +201,7 @@ function schedule_backup_cron() { $subject = $prefix.get_string("scheduledbackupstatus"); //Send the message - $eventdata = new object(); + $eventdata = new stdClass(); $eventdata->modulename = 'moodle'; $eventdata->userfrom = $admin; $eventdata->userto = $admin; diff --git a/backup/backupfilesedit.php b/backup/backupfilesedit.php index 25a819c50c4..dc27fde35ac 100755 --- a/backup/backupfilesedit.php +++ b/backup/backupfilesedit.php @@ -50,7 +50,7 @@ $PAGE->set_heading(get_string('managefiles', 'backup')); $PAGE->set_pagelayout('admin'); $browser = get_file_browser(); -$data = new object(); +$data = new stdClass(); $options = array('subdirs'=>0, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL); file_prepare_standard_filemanager($data, 'files', $options, $filecontext, $component, $filearea, 0); $form = new backup_files_edit_form(null, array('data'=>$data, 'contextid'=>$contextid, 'currentcontext'=>$currentcontext, 'filearea'=>$filearea, 'component'=>$component, 'returnurl'=>$returnurl)); diff --git a/backup/backuplib.php b/backup/backuplib.php index a5e612895c2..3fa5f3dcdf5 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -232,7 +232,7 @@ //Check it isn't backupdata_dir if (strpos($dir,$backupdata_dir)!==0) { //Insert them into backup_files - $file = new object(); + $file = new stdClass(); $file->backup_code = $backup_unique_code; $file->file_type = 'course'; $file->path = $dir; diff --git a/backup/lib.php b/backup/lib.php index ec23bf0a9da..a256b66c105 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -358,7 +358,7 @@ //Now, insert the record if ($status) { //Build the record - $rec = new object(); + $rec = new stdClass(); $rec->backup_code = $backup_unique_code; $rec->table_name = $table; $rec->old_id = $old_id; @@ -820,7 +820,7 @@ } function add_to_backup_log($starttime,$courseid,$message, $backuptype) { global $DB; - $log = new object(); + $log = new stdClass(); $log->courseid = $courseid; $log->time = time(); $log->laststarttime = $starttime; diff --git a/backup/restorelib.php b/backup/restorelib.php index 9ee0a6605e7..cd4209f9a35 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -191,7 +191,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $data = backup_getid($restore->backup_unique_code,'grade_letters',$rec->old_id); if ($data) { $info = $data->info; - $dbrec = new object(); + $dbrec = new stdClass(); $dbrec->contextid = $context->id; $dbrec->lowerboundary = backup_todb($info['GRADE_LETTER']['#']['LOWERBOUNDARY']['0']['#']); $dbrec->letter = backup_todb($info['GRADE_LETTER']['#']['LETTER']['0']['#']); @@ -315,7 +315,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); continue; } - $dbrec = new object(); + $dbrec = new stdClass(); $dbrec->courseid = $restore->course_id; $dbrec->itemtype = backup_todb($info['GRADE_ITEM']['#']['ITEMTYPE']['0']['#'], false); @@ -939,7 +939,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //print_object ($GLOBALS['traverse_array']); //Debug //$GLOBALS['traverse_array']=""; //Debug //Now build the MESSAGE record structure - $dbrec = new object(); + $dbrec = new stdClass(); $dbrec->useridfrom = backup_todb($info['MESSAGE']['#']['USERIDFROM']['0']['#']); $dbrec->useridto = backup_todb($info['MESSAGE']['#']['USERIDTO']['0']['#']); $dbrec->message = backup_todb($info['MESSAGE']['#']['MESSAGE']['0']['#']); @@ -1163,7 +1163,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //print_object ($GLOBALS['traverse_array']); //Debug //$GLOBALS['traverse_array']=""; //Debug //Now build the BLOG record structure - $dbrec = new object(); + $dbrec = new stdClass(); $dbrec->module = backup_todb($info['BLOG']['#']['MODULE']['0']['#']); $dbrec->userid = backup_todb($info['BLOG']['#']['USERID']['0']['#']); $dbrec->courseid = backup_todb($info['BLOG']['#']['COURSEID']['0']['#']); @@ -1451,7 +1451,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //print_object ($GLOBALS['traverse_array']); //Debug //$GLOBALS['traverse_array']=""; //Debug //Now build the LOG record structure - $dblog = new object(); + $dblog = new stdClass(); $dblog->time = backup_todb($info['LOG']['#']['TIME']['0']['#']); $dblog->userid = backup_todb($info['LOG']['#']['USERID']['0']['#']); $dblog->ip = backup_todb($info['LOG']['#']['IP']['0']['#']); @@ -1957,7 +1957,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3); //We compare Moodle's versions if ($status && $CFG->version < $info->backup_moodle_version) { - $message = new object(); + $message = new stdClass(); $message->serverversion = $CFG->version; $message->serverrelease = $CFG->release; $message->backupversion = $info->backup_moodle_version; diff --git a/backup/util/dbops/restore_dbops.class.php b/backup/util/dbops/restore_dbops.class.php index c087fdef0c7..071187472ae 100644 --- a/backup/util/dbops/restore_dbops.class.php +++ b/backup/util/dbops/restore_dbops.class.php @@ -434,7 +434,7 @@ abstract class restore_dbops { if ($udata->field_data) { if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) { /// Insert the user_custom_profile_field - $rec = new object(); + $rec = new stdClass(); $rec->userid = $newuserid; $rec->fieldid = $field->id; $rec->data = $udata->field_data;