Skip to content

Commit

Permalink
MDL-24321 switching to stdClass in /blocks/
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 21, 2010
1 parent 1dffbae commit dd4bee8
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion blocks/community/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function block_community_download_course_backup($course) {
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';
Expand Down
4 changes: 2 additions & 2 deletions blocks/course_summary/block_course_summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function get_content() {
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);
Expand Down
2 changes: 1 addition & 1 deletion blocks/glossary_random/block_glossary_random.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function specialization() {
$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);

Expand Down
2 changes: 1 addition & 1 deletion blocks/participants/block_participants.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function get_content() {
return $this->content;
}

$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
Expand Down
2 changes: 1 addition & 1 deletion blocks/private_files/block_private_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function get_content() {
$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!

Expand Down
2 changes: 1 addition & 1 deletion blocks/private_files/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$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);

Expand Down
2 changes: 1 addition & 1 deletion blocks/rss_client/block_rss_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function get_item_html($item){

$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'));
Expand Down
4 changes: 2 additions & 2 deletions blocks/site_main_menu/block_site_main_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function get_content() {
return $this->content;
}

$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
Expand Down Expand Up @@ -133,7 +133,7 @@ function get_content() {
//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;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion blocks/social_activities/block_social_activities.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function get_content() {
return $this->content;
}

$this->content = new object();
$this->content = new stdClass();
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
Expand Down

0 comments on commit dd4bee8

Please sign in to comment.