[geeklog-hg] geeklog: workaround to fix error reporting for when 'XHTML' is n...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Dec 30 05:45:47 EST 2012


changeset 8904:8e1ad894aefe
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/8e1ad894aefe
user: Dirk Haun <dirk at haun-online.de>
date: Sun Dec 30 11:45:40 2012 +0100
description:
workaround to fix error reporting for when 'XHTML' is not yet defined

diffstat:

 public_html/lib-common.php |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 391b274af4b8 -r 8e1ad894aefe public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Dec 30 10:42:38 2012 +0100
+++ b/public_html/lib-common.php	Sun Dec 30 11:45:40 2012 +0100
@@ -8420,7 +8420,12 @@
  * @param    string    $string  The string to modify
  * @return   string             The modified string
  */
-function COM_nl2br($string) {
+function COM_nl2br($string)
+{
+    if (! defined('XHTML')) {
+        define('XHTML', '');
+    }
+
     $tag = '<br' . XHTML . '>';
     $find = array("\r\n", "\n\r", "\r", "\n");
     $replace = array($tag."\r\n", $tag."\n\r", $tag."\r", $tag."\n");



More information about the geeklog-cvs mailing list