MDL-24321 switching to stdClass in /notes/
authorPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 08:19:28 +0000 (08:19 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 08:19:28 +0000 (08:19 +0000)
notes/edit.php
notes/lib.php

index 77d6dfc..47aeb2a 100644 (file)
@@ -22,7 +22,7 @@ if ($noteid) {
     $userid   = required_param('userid', PARAM_INT);
     $state    = optional_param('publishstate', NOTES_STATE_PUBLIC, PARAM_ALPHA);
 
     $userid   = required_param('userid', PARAM_INT);
     $state    = optional_param('publishstate', NOTES_STATE_PUBLIC, PARAM_ALPHA);
 
-    $note = new object();
+    $note = new stdClass();
     $note->courseid     = $courseid;
     $note->userid       = $userid;
     $note->publishstate = $state;
     $note->courseid     = $courseid;
     $note->userid       = $userid;
     $note->publishstate = $state;
index 5fd84d3..18fd077 100644 (file)
@@ -173,7 +173,7 @@ function note_print($note, $detail = NOTES_SHOW_FULL) {
     $context = get_context_instance(CONTEXT_COURSE, $note->courseid);
     $systemcontext = get_context_instance(CONTEXT_SYSTEM);
 
     $context = get_context_instance(CONTEXT_COURSE, $note->courseid);
     $systemcontext = get_context_instance(CONTEXT_SYSTEM);
 
-    $authoring = new object();
+    $authoring = new stdClass();
     $authoring->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$author->id.'&amp;course='.$note->courseid.'">'.fullname($author).'</a>';
     $authoring->date = userdate($note->lastmodified);
 
     $authoring->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$author->id.'&amp;course='.$note->courseid.'">'.fullname($author).'</a>';
     $authoring->date = userdate($note->lastmodified);