MDL-24321 switching to stdClass in /blocks/

This commit is contained in:
Petr Skoda 2010-09-21 08:10:17 +00:00
parent 1dffbae2da
commit dd4bee83ae
9 changed files with 11 additions and 11 deletions

View File

@ -101,7 +101,7 @@ class block_community_manager {
fclose($fp);
$fs = get_file_storage();
$record = new object();
$record = new stdClass();
$record->contextid = get_context_instance(CONTEXT_USER, $USER->id)->id;
$record->component = 'user';
$record->filearea = 'private';

View File

@ -22,8 +22,8 @@ class block_course_summary extends block_base {
return '';
}
$this->content = new object();
$options = new object();
$this->content = new stdClass();
$options = new stdClass();
$options->noclean = true; // Don't clean Javascripts etc
$context = get_context_instance(CONTEXT_COURSE, $this->page->course->id);
$this->page->course->summary = file_rewrite_pluginfile_urls($this->page->course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL);

View File

@ -82,7 +82,7 @@ class block_glossary_random extends block_base {
$text = "<h3>".format_string($entry->concept,true)."</h3>";
}
$options = new object;
$options = new stdClass();
$options->trusted = $entry->definitiontrust;
$text .= format_text($entry->definition, $entry->definitionformat, $options);

View File

@ -14,7 +14,7 @@ class block_participants extends block_list {
return $this->content;
}
$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';

View File

@ -54,7 +54,7 @@ class block_private_files extends block_base {
$this->content->text = '';
$this->content->footer = '';
if (isloggedin() && !isguestuser()) { // Show the block
$this->content = new object();
$this->content = new stdClass();
//TODO: add capability check here!

View File

@ -44,7 +44,7 @@ $PAGE->set_heading($title);
$PAGE->set_pagelayout('mydashboard');
$PAGE->set_pagetype('user-private-files');
$data = new object();
$data = new stdClass();
$options = array('subdirs'=>1, 'maxbytes'=>$CFG->userquota, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
file_prepare_standard_filemanager($data, 'files', $options, $context, 'user', 'private', 0);

View File

@ -249,7 +249,7 @@
$description = break_up_long_words($description, 30);
$formatoptions = new object;
$formatoptions = new stdClass();
$formatoptions->para = false;
$r.= html_writer::start_tag('div',array('class'=>'description'));

View File

@ -16,7 +16,7 @@ class block_site_main_menu extends block_list {
return $this->content;
}
$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
@ -133,7 +133,7 @@ class block_site_main_menu extends block_list {
//Accessibility: incidental image - should be empty Alt text
$icon = '<img src="'.$icon.'" class="icon" alt="" />&nbsp;';
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$icon.$instancename.'</a>'.$editbuttons;
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$icon.$instancename.'</a>'.$editbuttons;
}
}
}

View File

@ -16,7 +16,7 @@ class block_social_activities extends block_list {
return $this->content;
}
$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';