MDL-23395, go straight to page editing page when title is not empyt and forceformat is set

This commit is contained in:
Dongsheng Cai
2010-11-08 06:33:00 +00:00
parent ae671b6c67
commit 97f2eb45a1
4 changed files with 24 additions and 19 deletions
+3 -5
View File
@@ -94,15 +94,13 @@ case 'create':
$wikipage->create_page($title);
break;
case 'new':
if (!empty($title)) {
// create page from interlink with pagetitle
$wikipage->print_header();
$wikipage->print_content($title);
if ((int)$wiki->forceformat == 1 && !empty($title)) {
$wikipage->create_page($title);
} else {
// create link from moodle navigation block without pagetitle
$wikipage->print_header();
// new page without page title
$wikipage->print_content();
$wikipage->print_content($title);
}
$wikipage->print_footer();
break;