From e4a0c35afecd2552ff6b0f3b9f4df0af561f0c10 Mon Sep 17 00:00:00 2001 From: rurban Date: Sun, 27 Feb 2005 19:31:52 +0000 Subject: [PATCH] hack: display errorstack without sideeffects (save and restore) git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4616 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/editpage.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/editpage.php b/lib/editpage.php index 6a7df5bcc..ba4f3498e 100644 --- a/lib/editpage.php +++ b/lib/editpage.php @@ -1,5 +1,5 @@ _postponed_errors; + $warnings = $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML(); + $GLOBALS['ErrorManager']->_postponed_errors = $errors; + $dbi = $request->getDbh(); - $warnings = $dbi->GenericWarnings(); $dbi->touch(); global $WikiTheme; - if (empty($warnings) && ! $WikiTheme->getImageURL('signature')) { + if (empty($warnings->_content) && ! $WikiTheme->getImageURL('signature')) { // Do redirect to browse page if no signature has // been defined. In this case, the user will most // likely not see the rest of the HTML we generate @@ -281,7 +285,7 @@ class PageEditor $template = Template('savepage', $this->tokens); $template->replace('CONTENT', $newrevision->getTransformedContent()); - if (!empty($warnings)) + if (!empty($warnings->_content)) $template->replace('WARNINGS', $warnings); $pagelink = WikiLink($page); @@ -710,6 +714,9 @@ extends PageEditor /** $Log: not supported by cvs2svn $ + Revision 1.92 2005/01/29 20:37:21 rurban + no edit toolbar at all if ENABLE_EDITTOOLBAR = false + Revision 1.91 2005/01/25 07:05:49 rurban extract toolbar code, support new tags to get rid of php inside templates -- 2.45.0