MDL-24321 switching to stdClass in /admin/ and /
This commit is contained in:
+2
-2
@@ -126,11 +126,11 @@
|
||||
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
|
||||
$blockobject = false;
|
||||
$strblockname = '<span class="notifyproblem">'.$blockname.' ('.get_string('missingfromdisk').')</span>';
|
||||
$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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -20,7 +20,7 @@ admin_externalpage_setup('reportdbtest');
|
||||
echo $OUTPUT->header();
|
||||
|
||||
global $UNITTEST;
|
||||
$UNITTEST = new object();
|
||||
$UNITTEST = new stdClass();
|
||||
|
||||
if (!data_submitted()) {
|
||||
$selected = array();
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -93,7 +93,7 @@ class check_bigints extends XMLDBCheckAction {
|
||||
if ($metacolumn->type != $this->correct_type || ($this->dbfamily == 'mysql' && $xmldb_field->getUnsigned() && !$metacolumn->unsigned)) {
|
||||
$o.='<font color="red">' . $this->str['wrong'] . '</font>';
|
||||
/// Add the wrong field to the list
|
||||
$obj = new object;
|
||||
$obj = new stdClass();
|
||||
$obj->table = $xmldb_table;
|
||||
$obj->field = $xmldb_field;
|
||||
$wrong_fields[] = $obj;
|
||||
|
||||
@@ -90,7 +90,7 @@ class check_defaults extends XMLDBCheckAction {
|
||||
" '$physicaldefault')";
|
||||
$o.='<font color="red">' . $this->str['wrong'] . " $info</font>";
|
||||
/// Add the wrong field to the list
|
||||
$obj = new object;
|
||||
$obj = new stdClass();
|
||||
$obj->table = $xmldb_table;
|
||||
$obj->field = $xmldb_field;
|
||||
$obj->physicaldefault = $physicaldefault;
|
||||
|
||||
@@ -92,7 +92,7 @@ class check_indexes extends XMLDBCheckAction {
|
||||
} else {
|
||||
$o.='<font color="red">' . $this->str['missing'] . '</font>';
|
||||
/// 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.='<font color="red">' . $this->str['missing'] . '</font>';
|
||||
/// Add the missing index to the list
|
||||
$obj = new object;
|
||||
$obj = new stdClass();
|
||||
$obj->table = $xmldb_table;
|
||||
$obj->index = $xmldb_index;
|
||||
$missing_indexes[] = $obj;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user