From: Aaron Schulz Date: Fri, 16 Feb 2007 20:48:33 +0000 (+0000) Subject: * Add no-html option for block log parsing for future use X-Git-Tag: 1.31.0-rc.0~54024 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=2bec48af138d6294efc421139c4a0dc42ec44cfd;p=lhc%2Fweb%2Fwiklou.git * Add no-html option for block log parsing for future use --- diff --git a/languages/Language.php b/languages/Language.php index 47f169b675..aed7534707 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1315,10 +1315,11 @@ class Language { /** * For translaing of expiry times * @param string The validated block time in English + * @param $forContent, avoid html? * @return Somehow translated block time * @see LanguageFi.php for example implementation */ - function translateBlockExpiry( $str ) { + function translateBlockExpiry( $str, $forContent=false ) { $scBlockExpiryOptions = $this->getMessageFromDB( 'ipboptions' ); @@ -1330,9 +1331,12 @@ class Language { if ( strpos($option, ":") === false ) continue; list($show, $value) = explode(":", $option); - if ( strcmp ( $str, $value) == 0 ) - return '' . - htmlspecialchars( trim( $show ) ) . ''; + if ( strcmp ( $str, $value) == 0 ) { + if ( $forContent ) + return htmlspecialchars($str) . htmlspecialchars( trim( $show ) ); + else + return '' . htmlspecialchars( trim( $show ) ) . ''; + } } return $str;