MDL-51239 core_blog: coding style fixes

This commit is contained in:
Andrew Davis 2015-08-28 16:13:26 +08:00
parent c18acb8997
commit 0e32a56591
8 changed files with 88 additions and 84 deletions

View file

@ -132,8 +132,12 @@ if ($action === 'delete') {
redirect($returnurl);
}
} else if (blog_user_can_edit_entry($entry)) {
$optionsyes = array('entryid'=>$id, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey(), 'courseid'=>$courseid);
$optionsno = array('userid'=>$entry->userid, 'courseid'=>$courseid);
$optionsyes = array('entryid' => $id,
'action' => 'delete',
'confirm' => 1,
'sesskey' => sesskey(),
'courseid' => $courseid);
$optionsno = array('userid' => $entry->userid, 'courseid' => $courseid);
$PAGE->set_title("$SITE->shortname: $strblogs");
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
@ -181,9 +185,9 @@ if (!empty($entry->id)) {
}
require_once('edit_form.php');
$summaryoptions = array('maxfiles'=> 99, 'maxbytes'=>$CFG->maxbytes, 'trusttext'=>true, 'context'=>$sitecontext,
'subdirs'=>file_area_contains_subdirs($sitecontext, 'blog', 'post', $entry->id));
$attachmentoptions = array('subdirs'=>false, 'maxfiles'=> 99, 'maxbytes'=>$CFG->maxbytes);
$summaryoptions = array('maxfiles' => 99, 'maxbytes' => $CFG->maxbytes, 'trusttext' => true, 'context' => $sitecontext,
'subdirs' => file_area_contains_subdirs($sitecontext, 'blog', 'post', $entry->id));
$attachmentoptions = array('subdirs' => false, 'maxfiles' => 99, 'maxbytes' => $CFG->maxbytes);
$blogeditform = new blog_edit_form(null, compact('entry',
'summaryoptions',