From a226a972f7cacbbf2b1afd65ae363dbf5b8f32be Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 21 Sep 2010 08:44:02 +0000 Subject: [PATCH] MDL-24321 switching to stdClass in /admin/ and / --- admin/blocks.php | 4 +- admin/bloglevelupgrade.php | 6 +-- admin/generator.php | 2 +- admin/handlevirus.php | 6 +-- admin/langimport.php | 4 +- admin/process_email.php | 2 +- admin/report/configlog/index.php | 2 +- admin/report/security/lib.php | 38 +++++++++---------- admin/report/spamcleaner/index.php | 2 +- admin/report/unittest/dbtest.php | 2 +- admin/report/unittest/index.php | 2 +- admin/roles/manage.php | 4 +- admin/uploaduser.php | 16 ++++---- admin/user.php | 4 +- admin/user/user_bulk_forms.php | 4 +- admin/user/user_bulk_message.php | 2 +- admin/webservice/service_users.php | 2 +- admin/webservice/testclient.php | 2 +- .../check_bigints/check_bigints.class.php | 2 +- .../check_defaults/check_defaults.class.php | 2 +- .../check_indexes/check_indexes.class.php | 4 +- help.php | 2 +- index.php | 2 +- install.php | 6 +-- 24 files changed, 61 insertions(+), 61 deletions(-) diff --git a/admin/blocks.php b/admin/blocks.php index be7738e14ae..6b57e67df86 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -126,11 +126,11 @@ if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) { $blockobject = false; $strblockname = ''.$blockname.' ('.get_string('missingfromdisk').')'; - $plugin = new object(); + $plugin = new stdClass(); $plugin->version = $block->version; } else { - $plugin = new object(); + $plugin = new stdClass(); $plugin->version = '???'; if (file_exists("$CFG->dirroot/blocks/$blockname/version.php")) { include("$CFG->dirroot/blocks/$blockname/version.php"); diff --git a/admin/bloglevelupgrade.php b/admin/bloglevelupgrade.php index 07eec720bb8..3a08d450471 100644 --- a/admin/bloglevelupgrade.php +++ b/admin/bloglevelupgrade.php @@ -43,7 +43,7 @@ if ($CFG->bloglevel == BLOG_COURSE_LEVEL || $CFG->bloglevel == BLOG_GROUP_LEVEL) $bloggers = $DB->get_records_sql("SELECT userid FROM {post} WHERE module = 'blog' GROUP BY userid"); require_once($CFG->dirroot.'/mod/forum/lib.php'); - $a = new object(); + $a = new stdClass(); $a->userscount = 0; $a->blogcount = 0; @@ -107,7 +107,7 @@ function bloglevelupgrade_entries($blogentries, $forum, $cm, $groupid=-1) { if (!empty($files)) { foreach ($files as $storedfile) { - $newfile = new object(); + $newfile = new stdClass(); $newfile->component = 'mod_forum'; $newfile->filearea = 'attachment'; $newfile->itemid = $discussion->firstpost; @@ -120,7 +120,7 @@ function bloglevelupgrade_entries($blogentries, $forum, $cm, $groupid=-1) { if (!empty($files)) { foreach ($files as $storedfile) { - $newfile = new object(); + $newfile = new stdClass(); $newfile->component = 'mod_forum'; $newfile->filearea = 'post'; $newfile->itemid = $discussion->firstpost; diff --git a/admin/generator.php b/admin/generator.php index 283839921f3..0f764107d27 100755 --- a/admin/generator.php +++ b/admin/generator.php @@ -749,7 +749,7 @@ class generator { require_once($CFG->dirroot.'/mod/forum/lib.php'); - $discussion = new object(); + $discussion = new stdClass(); $discussion->course = $forum->course; $discussion->forum = $forum->id; $discussion->name = 'Test discussion'; diff --git a/admin/handlevirus.php b/admin/handlevirus.php index 318f9dc209b..0ddfeaa2258 100644 --- a/admin/handlevirus.php +++ b/admin/handlevirus.php @@ -61,7 +61,7 @@ function notify_user($user,$subject,$a) { } $body = get_string('virusfoundlater','moodle',$a); - $eventdata = new object(); + $eventdata = new stdClass(); $eventdata->modulename = 'moodle'; $eventdata->userfrom = get_admin(); $eventdata->userto = $user; @@ -80,7 +80,7 @@ function notify_admins($user,$subject,$a) { $body = get_string('virusfoundlateradmin','moodle',$a); foreach ($admins as $admin) { - $eventdata = new object(); + $eventdata = new stdClass(); $eventdata->modulename = 'moodle'; $eventdata->userfrom = $admin; $eventdata->userto = $admin; @@ -101,7 +101,7 @@ function notify_admins_unknown($file,$a) { $subject = get_string('virusfoundsubject','moodle',format_string($site->fullname)); $body = get_string('virusfoundlateradminnolog','moodle',$a); foreach ($admins as $admin) { - $eventdata = new object(); + $eventdata = new stdClass(); $eventdata->modulename = 'moodle'; $eventdata->userfrom = $admin; $eventdata->userto = $admin; diff --git a/admin/langimport.php b/admin/langimport.php index 891949d400e..5d6497e8859 100755 --- a/admin/langimport.php +++ b/admin/langimport.php @@ -80,7 +80,7 @@ if (($mode == INSTALLATION_OF_SELECTED_LANG) and confirm_sesskey() and !empty($p switch ($status) { case COMPONENT_ERROR: if ($cd->get_error() == 'remotedownloaderror') { - $a = new object(); + $a = new stdClass(); $a->url = 'http://download.moodle.org/langpack/'.$thisversion.'/'.$pack.'.zip'; $a->dest = $CFG->dataroot.'/lang'; print_error($cd->get_error(), 'error', 'langimport.php', $a); @@ -274,7 +274,7 @@ if ($notice_error) { if ($missingparents) { foreach ($missingparents as $l=>$parent) { - $a = new object(); + $a = new stdClass(); $a->lang = $installedlangs[$l]; $a->parent = $parent; foreach ($availablelangs as $alang) { diff --git a/admin/process_email.php b/admin/process_email.php index 4c0debaca99..20ad4c1ec4d 100755 --- a/admin/process_email.php +++ b/admin/process_email.php @@ -9,7 +9,7 @@ $address = $tmp[0]; // BOUNCE EMAILS TO NOREPLY if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) { - $user = new object(); + $user = new stdClass(); $user->email = $_ENV['SENDER']; if (!validate_email($user->email)) { diff --git a/admin/report/configlog/index.php b/admin/report/configlog/index.php index 5b9b370f897..26d032661a5 100644 --- a/admin/report/configlog/index.php +++ b/admin/report/configlog/index.php @@ -55,7 +55,7 @@ foreach ($columns as $column=>$strcolumn) { $baseurl = new moodle_url('index.php', array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage)); echo $OUTPUT->paging_bar($changescount, $page, $perpage, $baseurl); -$override = new object(); +$override = new stdClass(); $override->firstname = 'firstname'; $override->lastname = 'lastname'; $fullnamelanguage = get_string('fullnamedisplay', '', $override); diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index bb0be8a5e17..992900af791 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -83,7 +83,7 @@ function report_security_doc_link($issue, $name) { * @return object result */ function report_security_check_globals($detailed=false) { - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_globals'; $result->name = get_string('check_globals_name', 'report_security'); $result->info = null; @@ -114,7 +114,7 @@ function report_security_check_globals($detailed=false) { function report_security_check_noauth($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_noauth'; $result->name = get_string('check_noauth_name', 'report_security'); $result->info = null; @@ -146,7 +146,7 @@ function report_security_check_noauth($detailed=false) { function report_security_check_passwordpolicy($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_passwordpolicy'; $result->name = get_string('check_passwordpolicy_name', 'report_security'); $result->info = null; @@ -177,7 +177,7 @@ function report_security_check_passwordpolicy($detailed=false) { function report_security_check_embed($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_embed'; $result->name = get_string('check_embed_name', 'report_security'); $result->info = null; @@ -208,7 +208,7 @@ function report_security_check_embed($detailed=false) { function report_security_check_mediafilterswf($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_mediafilterswf'; $result->name = get_string('check_mediafilterswf_name', 'report_security'); $result->info = null; @@ -241,7 +241,7 @@ function report_security_check_mediafilterswf($detailed=false) { function report_security_check_unsecuredataroot($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_unsecuredataroot'; $result->name = get_string('check_unsecuredataroot_name', 'report_security'); $result->info = null; @@ -278,7 +278,7 @@ function report_security_check_unsecuredataroot($detailed=false) { * @return object result */ function report_security_check_displayerrors($detailed=false) { - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_displayerrors'; $result->name = get_string('check_displayerrors_name', 'report_security'); $result->info = null; @@ -309,7 +309,7 @@ function report_security_check_displayerrors($detailed=false) { function report_security_check_openprofiles($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_openprofiles'; $result->name = get_string('check_openprofiles_name', 'report_security'); $result->info = null; @@ -341,7 +341,7 @@ function report_security_check_openprofiles($detailed=false) { function report_security_check_google($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_google'; $result->name = get_string('check_google_name', 'report_security'); $result->info = null; @@ -375,7 +375,7 @@ function report_security_check_google($detailed=false) { function report_security_check_emailchangeconfirmation($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_emailchangeconfirmation'; $result->name = get_string('check_emailchangeconfirmation_name', 'report_security'); $result->info = null; @@ -416,7 +416,7 @@ function report_security_check_cookiesecure($detailed=false) { return null; } - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_cookiesecure'; $result->name = get_string('check_cookiesecure_name', 'report_security'); $result->info = null; @@ -448,7 +448,7 @@ function report_security_check_cookiesecure($detailed=false) { function report_security_check_configrw($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_configrw'; $result->name = get_string('check_configrw_name', 'report_security'); $result->info = null; @@ -474,7 +474,7 @@ function report_security_check_configrw($detailed=false) { function report_security_check_passwordsaltmain($detailed=false) { global $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_passwordsaltmain'; $result->name = get_string('check_passwordsaltmain_name', 'report_security'); $result->info = null; @@ -510,7 +510,7 @@ function report_security_check_passwordsaltmain($detailed=false) { function report_security_check_riskxss($detailed=false) { global $DB; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_riskxss'; $result->name = get_string('check_riskxss_name', 'report_security'); $result->info = null; @@ -557,7 +557,7 @@ function report_security_check_riskxss($detailed=false) { function report_security_check_defaultuserrole($detailed=false) { global $DB, $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_defaultuserrole'; $result->name = get_string('check_defaultuserrole_name', 'report_security'); $result->info = null; @@ -615,7 +615,7 @@ function report_security_check_defaultuserrole($detailed=false) { function report_security_check_guestrole($detailed=false) { global $DB, $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_guestrole'; $result->name = get_string('check_guestrole_name', 'report_security'); $result->info = null; @@ -673,7 +673,7 @@ function report_security_check_guestrole($detailed=false) { function report_security_check_frontpagerole($detailed=false) { global $DB, $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_frontpagerole'; $result->name = get_string('check_frontpagerole_name', 'report_security'); $result->info = null; @@ -732,7 +732,7 @@ function report_security_check_frontpagerole($detailed=false) { function report_security_check_riskadmin($detailed=false) { global $DB, $CFG; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_riskadmin'; $result->name = get_string('check_riskadmin_name', 'report_security'); $result->info = null; @@ -773,7 +773,7 @@ function report_security_check_riskadmin($detailed=false) { function report_security_check_riskbackup($detailed=false) { global $CFG, $DB; - $result = new object(); + $result = new stdClass(); $result->issue = 'report_security_check_riskbackup'; $result->name = get_string('check_riskbackup_name', 'report_security'); $result->info = null; diff --git a/admin/report/spamcleaner/index.php b/admin/report/spamcleaner/index.php index 2060e669dd3..fc9c8d31423 100755 --- a/admin/report/spamcleaner/index.php +++ b/admin/report/spamcleaner/index.php @@ -235,7 +235,7 @@ function print_user_entry($user, $keywords, $count) { global $SESSION, $CFG; - $smalluserobject = new object; // All we need to delete them later + $smalluserobject = new stdClass(); // All we need to delete them later $smalluserobject->id = $user->id; $smalluserobject->email = $user->email; $smalluserobject->auth = $user->auth; diff --git a/admin/report/unittest/dbtest.php b/admin/report/unittest/dbtest.php index cb5ad53c3a9..1a66cbebd43 100644 --- a/admin/report/unittest/dbtest.php +++ b/admin/report/unittest/dbtest.php @@ -20,7 +20,7 @@ admin_externalpage_setup('reportdbtest'); echo $OUTPUT->header(); global $UNITTEST; -$UNITTEST = new object(); +$UNITTEST = new stdClass(); if (!data_submitted()) { $selected = array(); diff --git a/admin/report/unittest/index.php b/admin/report/unittest/index.php index 335e2e6a9f5..cc5c26be262 100644 --- a/admin/report/unittest/index.php +++ b/admin/report/unittest/index.php @@ -31,7 +31,7 @@ admin_externalpage_setup('reportsimpletest', '', array('showpasses'=>$showpasses $unittest = true; global $UNITTEST; -$UNITTEST = new object(); +$UNITTEST = new stdClass(); // Print the header. $strtitle = get_string('unittests', 'simpletest'); diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 0c5aa8f919b..41dcf70829c 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -72,7 +72,7 @@ // show confirmation echo $OUTPUT->header(); $optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1); - $a = new object(); + $a = new stdClass(); $a->id = $roleid; $a->name = $roles[$roleid]->name; $a->shortname = $roles[$roleid]->shortname; @@ -150,7 +150,7 @@ echo $OUTPUT->header(); $optionsyes = array('action'=>'reset', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('action'=>'view', 'roleid'=>$roleid); - $a = new object(); + $a = new stdClass(); $a->id = $roleid; $a->name = $roles[$roleid]->name; $a->shortname = $roles[$roleid]->shortname; diff --git a/admin/uploaduser.php b/admin/uploaduser.php index 5b31f5c8fdb..84ce3ab4fe6 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -202,7 +202,7 @@ if ($formdata = $mform->is_cancelled()) { $forcechangepassword = false; - $user = new object(); + $user = new stdClass(); // by default, use the local mnet id (this may be changed in the file) $user->mnethostid = $CFG->mnet_localhost_id; // add fields to user object @@ -641,7 +641,7 @@ if ($formdata = $mform->is_cancelled()) { $manual->enrol_user($manualcache[$courseid], $user->id, $rid, $today, $timeend, true); - $a = new object(); + $a = new stdClass(); $a->course = $shortname; $a->role = $rolecache[$rid]->name; $upt->track('enrolments', get_string('enrolledincourserole', 'enrol_manual', $a)); @@ -660,11 +660,11 @@ if ($formdata = $mform->is_cancelled()) { $ccache[$shortname]->groups = array(); if ($groups = groups_get_all_groups($courseid)) { foreach ($groups as $gid=>$group) { - $ccache[$shortname]->groups[$gid] = new object(); + $ccache[$shortname]->groups[$gid] = new stdClass(); $ccache[$shortname]->groups[$gid]->id = $gid; $ccache[$shortname]->groups[$gid]->name = $group->name; if (!is_numeric($group->name)) { // only non-numeric names are supported!!! - $ccache[$shortname]->groups[$group->name] = new object(); + $ccache[$shortname]->groups[$group->name] = new stdClass(); $ccache[$shortname]->groups[$group->name]->id = $gid; $ccache[$shortname]->groups[$group->name]->name = $group->name; } @@ -675,7 +675,7 @@ if ($formdata = $mform->is_cancelled()) { $addgroup = $user->{'group'.$i}; if (!array_key_exists($addgroup, $ccache[$shortname]->groups)) { // if group doesn't exist, create it - $newgroupdata = new object(); + $newgroupdata = new stdClass(); $newgroupdata->name = $addgroup; $newgroupdata->courseid = $ccache[$shortname]->id; if ($ccache[$shortname]->groups[$addgroup]->id = groups_create_group($newgroupdata)){ @@ -1086,7 +1086,7 @@ function process_template($template, $user) { // very very ugly hack! global $template_globals; - $template_globals = new object(); + $template_globals = new stdClass(); $template_globals->username = isset($user->username) ? $user->username : ''; $template_globals->firstname = isset($user->firstname) ? $user->firstname : ''; $template_globals->lastname = isset($user->lastname) ? $user->lastname : ''; @@ -1157,11 +1157,11 @@ function uu_allowed_roles() { function uu_allowed_roles_cache() { $allowedroles = get_assignable_roles(get_context_instance(CONTEXT_COURSE, SITEID), ROLENAME_SHORT); foreach ($allowedroles as $rid=>$rname) { - $rolecache[$rid] = new object(); + $rolecache[$rid] = new stdClass(); $rolecache[$rid]->id = $rid; $rolecache[$rid]->name = $rname; if (!is_numeric($rname)) { // only non-numeric shortnames are supported!!! - $rolecache[$rname] = new object(); + $rolecache[$rname] = new stdClass(); $rolecache[$rname]->id = $rid; $rolecache[$rname]->name = $rname; } diff --git a/admin/user.php b/admin/user.php index 563cd28ca02..d2ad915cece 100644 --- a/admin/user.php +++ b/admin/user.php @@ -99,7 +99,7 @@ } $aclrecord = $DB->get_record('mnet_sso_access_control', array('username'=>$user->username, 'mnet_host_id'=>$user->mnethostid)); if (empty($aclrecord)) { - $aclrecord = new object(); + $aclrecord = new stdClass(); $aclrecord->mnet_host_id = $user->mnethostid; $aclrecord->username = $user->username; $aclrecord->accessctrl = $accessctrl; @@ -195,7 +195,7 @@ $users = $nusers; } - $override = new object(); + $override = new stdClass(); $override->firstname = 'firstname'; $override->lastname = 'lastname'; $fullnamelanguage = get_string('fullnamedisplay', '', $override); diff --git a/admin/user/user_bulk_forms.php b/admin/user/user_bulk_forms.php index 2cf5643c3f2..ea210c20028 100644 --- a/admin/user/user_bulk_forms.php +++ b/admin/user/user_bulk_forms.php @@ -55,7 +55,7 @@ class user_bulk_form extends moodleform { if ($total == $acount) { $achoices[0] = get_string('allusers', 'bulkusers', $total); } else { - $a = new object(); + $a = new stdClass(); $a->total = $total; $a->count = $acount; $achoices[0] = get_string('allfilteredusers', 'bulkusers', $a); @@ -71,7 +71,7 @@ class user_bulk_form extends moodleform { } if (is_array($susers)) { - $a = new object(); + $a = new stdClass(); $a->total = $total; $a->count = $scount; $schoices[0] = get_string('allselectedusers', 'bulkusers', $a); diff --git a/admin/user/user_bulk_message.php b/admin/user/user_bulk_message.php index cfa5fd23d13..9e2c4993db0 100755 --- a/admin/user/user_bulk_message.php +++ b/admin/user/user_bulk_message.php @@ -40,7 +40,7 @@ if ($msgform->is_cancelled()) { redirect($return); } else if ($formdata = $msgform->get_data()) { - $options = new object(); + $options = new stdClass(); $options->para = false; $options->newlines = true; $options->smiley = false; diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index dbce3552f1a..ab1772b51c0 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -53,7 +53,7 @@ if (optional_param('add', false, PARAM_BOOL) && confirm_sesskey()) { $userstoassign = $potentialuserselector->get_selected_users(); if (!empty($userstoassign)) { foreach ($userstoassign as $adduser) { - $serviceuser = new object(); + $serviceuser = new stdClass(); $serviceuser->externalserviceid = $id; $serviceuser->userid = $adduser->id; $webservicemanager->add_ws_authorised_user($serviceuser); diff --git a/admin/webservice/testclient.php b/admin/webservice/testclient.php index 48c86235348..556a06c2473 100644 --- a/admin/webservice/testclient.php +++ b/admin/webservice/testclient.php @@ -93,7 +93,7 @@ if (!$function or !$protocol) { echo $OUTPUT->box_start(); $url = new moodle_url('/admin/settings.php?section=debugging'); $atag =html_writer::start_tag('a', array('href' => $url)).get_string('debug', 'admin').html_writer::end_tag('a'); - $descparams = new object(); + $descparams = new stdClass(); $descparams->atag = $atag; $descparams->mode = get_string('debugnormal', 'admin'); $amfclienturl = new moodle_url('/webservice/amf/testclient/index.php'); diff --git a/admin/xmldb/actions/check_bigints/check_bigints.class.php b/admin/xmldb/actions/check_bigints/check_bigints.class.php index 009d000db04..502b273777c 100644 --- a/admin/xmldb/actions/check_bigints/check_bigints.class.php +++ b/admin/xmldb/actions/check_bigints/check_bigints.class.php @@ -93,7 +93,7 @@ class check_bigints extends XMLDBCheckAction { if ($metacolumn->type != $this->correct_type || ($this->dbfamily == 'mysql' && $xmldb_field->getUnsigned() && !$metacolumn->unsigned)) { $o.='' . $this->str['wrong'] . ''; /// Add the wrong field to the list - $obj = new object; + $obj = new stdClass(); $obj->table = $xmldb_table; $obj->field = $xmldb_field; $wrong_fields[] = $obj; diff --git a/admin/xmldb/actions/check_defaults/check_defaults.class.php b/admin/xmldb/actions/check_defaults/check_defaults.class.php index c7f336cc37b..1cc78672f35 100644 --- a/admin/xmldb/actions/check_defaults/check_defaults.class.php +++ b/admin/xmldb/actions/check_defaults/check_defaults.class.php @@ -90,7 +90,7 @@ class check_defaults extends XMLDBCheckAction { " '$physicaldefault')"; $o.='' . $this->str['wrong'] . " $info"; /// Add the wrong field to the list - $obj = new object; + $obj = new stdClass(); $obj->table = $xmldb_table; $obj->field = $xmldb_field; $obj->physicaldefault = $physicaldefault; diff --git a/admin/xmldb/actions/check_indexes/check_indexes.class.php b/admin/xmldb/actions/check_indexes/check_indexes.class.php index e38677a9091..a2721a225b6 100644 --- a/admin/xmldb/actions/check_indexes/check_indexes.class.php +++ b/admin/xmldb/actions/check_indexes/check_indexes.class.php @@ -92,7 +92,7 @@ class check_indexes extends XMLDBCheckAction { } else { $o.='' . $this->str['missing'] . ''; /// Add the missing index to the list - $obj = new object; + $obj = new stdClass(); $obj->table = $xmldb_table; $obj->index = $xmldb_index; $missing_indexes[] = $obj; @@ -113,7 +113,7 @@ class check_indexes extends XMLDBCheckAction { } else { $o.='' . $this->str['missing'] . ''; /// Add the missing index to the list - $obj = new object; + $obj = new stdClass(); $obj->table = $xmldb_table; $obj->index = $xmldb_index; $missing_indexes[] = $obj; diff --git a/help.php b/help.php index 6f3cc99fcc5..17141ba1498 100644 --- a/help.php +++ b/help.php @@ -58,7 +58,7 @@ if (!$sm->string_exists($identifier.'_help', $component)) { } if ($sm->string_exists($identifier.'_help', $component)) { - $options = new object; + $options = new stdClass(); $options->trusted = false; $options->noclean = false; $options->smiley = false; diff --git a/index.php b/index.php index 6c9e50dcea6..ae746329494 100644 --- a/index.php +++ b/index.php @@ -115,7 +115,7 @@ $context = get_context_instance(CONTEXT_COURSE, SITEID); $summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id); - $summaryformatoptions = new object(); + $summaryformatoptions = new stdClass(); $summaryformatoptions->noclean = true; echo format_text($summarytext, $section->summaryformat, $summaryformatoptions); diff --git a/install.php b/install.php index 1bf95bdc7ff..ab1781878e1 100644 --- a/install.php +++ b/install.php @@ -196,13 +196,13 @@ ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include require('version.php'); $CFG->target_release = $release; -$SESSION = new object(); +$SESSION = new stdClass(); $SESSION->lang = $CFG->lang; -$USER = new object(); +$USER = new stdClass(); $USER->id = 0; -$COURSE = new object(); +$COURSE = new stdClass(); $COURSE->id = 0; $SITE = $COURSE;