From 38fca4198a4a29c5ada166adda876d1772b0c2af Mon Sep 17 00:00:00 2001 From: rurban Date: Wed, 17 Mar 2004 18:41:05 +0000 Subject: [PATCH] initial_content and template support for CreatePage git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@3189 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/editpage.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/editpage.php b/lib/editpage.php index 87a1bbbfc..8bd0e2151 100644 --- a/lib/editpage.php +++ b/lib/editpage.php @@ -1,5 +1,5 @@ _initializeState(); $this->_initialEdit = true; - } + // The edit request has specified some initial content from a template + if ( ($template = $request->getArg('template')) and + $request->_dbi->isWikiPage($template)) { + $page = $request->_dbi->getPage($template); + $current = $page->getCurrentRevision(); + $this->_content = $current->getPackedContent(); + } elseif ($initial_content = $request->getArg('initial_content')) { + $this->_content = $initial_content; + } + } header("Content-Type: text/html; charset=" . CHARSET); } @@ -612,6 +621,10 @@ extends PageEditor /** $Log: not supported by cvs2svn $ + Revision 1.61 2004/03/12 20:59:17 rurban + important cookie fix by Konstantin Zadorozhny + new editpage feature: JS_SEARCHREPLACE + Revision 1.60 2004/02/15 21:34:37 rurban PageList enhanced and improved. fixed new WikiAdmin... plugins -- 2.45.0