Merge branch 'wip-MDL-35653-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE

This commit is contained in:
Sam Hemelryk 2012-12-24 09:40:36 +13:00
commit 2c292b48da
2 changed files with 5 additions and 3 deletions

View file

@ -111,14 +111,14 @@ case 'create':
redirect($CFG->wwwroot . '/mod/wiki/edit.php?pageid='.$newpageid);
break;
case 'new':
if ((int)$wiki->forceformat == 1 && !empty($title)) {
// Go straight to editing if we know the page title and we're in force format mode.
if ((int)$wiki->forceformat == 1 && $title != get_string('newpage', 'wiki')) {
$newpageid = $wikipage->create_page($title);
add_to_log($course->id, 'wiki', 'add page', "view.php?pageid=".$newpageid, $newpageid, $cm->id);
redirect($CFG->wwwroot . '/mod/wiki/edit.php?pageid='.$newpageid);
} else {
// create link from moodle navigation block without pagetitle
$wikipage->print_header();
// new page without page title
// Create a new page.
$wikipage->print_content($title);
}
$wikipage->print_footer();

View file

@ -936,6 +936,8 @@ class page_wiki_create extends page_wiki {
$data = $this->mform->get_data();
if (isset($data->groupinfo)) {
$groupid = $data->groupinfo;
} else if (!empty($this->gid)) {
$groupid = $this->gid;
} else {
$groupid = '0';
}