mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
More robustness fixes
This commit is contained in:
parent
6d6c938999
commit
f747744495
@ -6,6 +6,30 @@
|
||||
$defaultformat = FORMAT_MOODLE;
|
||||
$onsubmit = "";
|
||||
}
|
||||
if (empty($form->name)) {
|
||||
$form->name = "";
|
||||
}
|
||||
if (empty($form->description)) {
|
||||
$form->description = "";
|
||||
}
|
||||
if (empty($form->format)) {
|
||||
$form->format = "";
|
||||
}
|
||||
if (empty($form->type)) {
|
||||
$form->type = "";
|
||||
}
|
||||
if (empty($form->resubmit)) {
|
||||
$form->resubmit = "";
|
||||
}
|
||||
if (empty($form->grade)) {
|
||||
$form->grade = "";
|
||||
}
|
||||
if (empty($form->maxbytes)) {
|
||||
$form->maxbytes = "";
|
||||
}
|
||||
if (empty($form->timedue)) {
|
||||
$form->timedue = "";
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
|
||||
@ -107,7 +131,6 @@
|
||||
print_date_selector("dueday", "duemonth", "dueyear", $form->timedue);
|
||||
echo " - ";
|
||||
print_time_selector("duehour", "dueminute", $form->timedue);
|
||||
formerr($err["duedate"]);
|
||||
?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1472,7 +1472,11 @@ function forum_print_latest_discussions($forum_id=0, $forum_numdiscussions=5, $f
|
||||
} else {
|
||||
$discussion->replies = 0;
|
||||
}
|
||||
$ownpost = ($discussion->userid == $USER->id);
|
||||
if (!empty($USER->id)) {
|
||||
$ownpost = ($discussion->userid == $USER->id);
|
||||
} else {
|
||||
$ownpost=false;
|
||||
}
|
||||
switch ($forum_style) {
|
||||
case "minimal":
|
||||
echo "<P><FONT COLOR=#555555>".userdate($discussion->modified, "%d %b, %H:%M")." - $discussion->firstname</FONT>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user