浏览代码

- Added a 'pre' method for transparent support of the CLI (Command Line Interface) mode.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@942 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 年之前
父节点
当前提交
d7188a4ed6
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 5 0
      application/clipage.class.inc.php
  2. 8 0
      application/webpage.class.inc.php

+ 5 - 0
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";

+ 8 - 0
application/webpage.class.inc.php

@@ -104,6 +104,14 @@ class WebPage
     }
     
 	/**
+	 * Add a pre-formatted text to the body of the page
+	 */
+    public function pre($s_html)
+    {
+        $this->add('<pre>'.$s_html.'</pre>');
+    }
+    
+	/**
 	 * Add a paragraph to the body of the page
 	 */
     public function GetP($s_html)