Commit dd4bee83 authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-24321 switching to stdClass in /blocks/

parent 1dffbae2
......@@ -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';
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 = '';
......
......@@ -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!
......
......@@ -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);
......
......@@ -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'));
......
......@@ -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;
}
}
}
......
......@@ -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 = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment