From effa212261a1a38b8cc7076ea848888daaba59d8 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Fri, 12 Nov 2010 16:28:17 +0000 Subject: [PATCH] - Added a 'pre' method for transparent support of the CLI (Command Line Interface) mode. SVN:trunk[942] --- application/clipage.class.inc.php | 5 +++++ application/webpage.class.inc.php | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/application/clipage.class.inc.php b/application/clipage.class.inc.php index 2514a391f..afeaa1694 100644 --- a/application/clipage.class.inc.php +++ b/application/clipage.class.inc.php @@ -46,6 +46,11 @@ class CLIPage echo $sText."\n"; } + public function pre($sText) + { + echo $sText."\n"; + } + public function add_comment($sText) { echo "#".$sText."\n"; diff --git a/application/webpage.class.inc.php b/application/webpage.class.inc.php index b3eddd14a..4842fcbd7 100644 --- a/application/webpage.class.inc.php +++ b/application/webpage.class.inc.php @@ -103,6 +103,14 @@ class WebPage $this->add($this->GetP($s_html)); } + /** + * Add a pre-formatted text to the body of the page + */ + public function pre($s_html) + { + $this->add('
'.$s_html.'
'); + } + /** * Add a paragraph to the body of the page */