diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-16 13:39:56 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-16 13:39:56 +0100 |
| commit | 9a6b8f5562e0c59587a7e283733ccb2a94b1706b (patch) | |
| tree | bb81cd05bf82db9db1f4fe71da362584607707d6 | |
| parent | 80975a340c65e7fc02c7c7bcf23623abf6d9bcef (diff) | |
| download | themes-9a6b8f5562e0c59587a7e283733ccb2a94b1706b.tar.gz themes-9a6b8f5562e0c59587a7e283733ccb2a94b1706b.tar.bz2 themes-9a6b8f5562e0c59587a7e283733ccb2a94b1706b.zip | |
Tidy namespace errors
| -rwxr-xr-x | includes/class.JavaScriptPacker.php | 25 | ||||
| -rwxr-xr-x | smartyplugins/BlockForm.php | 7 |
2 files changed, 15 insertions, 17 deletions
diff --git a/includes/class.JavaScriptPacker.php b/includes/class.JavaScriptPacker.php index 635d1f5..9ed7ab6 100755 --- a/includes/class.JavaScriptPacker.php +++ b/includes/class.JavaScriptPacker.php @@ -362,7 +362,7 @@ class JavaScriptPacker { return "{" . $this->buffer . ";"; } function _insertFastEncode($match) { - return "{$encode=" . $this->buffer . ";"; + return "{$match}" . $this->buffer . ";"; } // mmm.. ..which one do i need ?? @@ -390,7 +390,7 @@ class JavaScriptPacker { if ($charCode >= $this->_encoding) { $res = $this->_encode62((int)($charCode / $this->_encoding)); } - $charCode = $charCode % $this->_encoding; + $charCode %= $this->_encoding; if ($charCode > 35) return $res . chr($charCode + 29); @@ -399,7 +399,7 @@ class JavaScriptPacker { } // use high-ascii values - // characters: ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃ?ÂÃÄÅÆÇÈÉÊËÌÃ?ÃŽÃ?Ã?ÑÒÓÔÕÖרÙÚÛÜÃ?Þßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþ + // characters: ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿À�?ÂÃÄÅÆÇÈÉÊËÌ�?�?�?ÑÒÓÔÕÖרÙÚÛÜ�?Þßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþ function _encode95($charCode) { $res = ""; if ($charCode >= $this->_encoding) @@ -501,15 +501,15 @@ class JavaScriptPacker { // zero encoding // characters: 0123456789 - var $JSFUNCTION_encode10 = "function($charCode) { + var $JSFUNCTION_encode10 = 'function($charCode) { return $charCode; -}";//;'; +}'; // inherent base36 support // characters: 0123456789abcdefghijklmnopqrstuvwxyz - var $JSFUNCTION_encode36 = "function($charCode) { + var $JSFUNCTION_encode36 = 'function($charCode) { return $charCode.toString(36); -}";//;'; +}'; // hitch a ride on base36 and add the upper case alpha characters // characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -519,7 +519,7 @@ class JavaScriptPacker { }'; // use high-ascii values - // characters: ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃ?ÂÃÄÅÆÇÈÉÊËÌÃ?ÃŽÃ?Ã?ÑÒÓÔÕÖרÙÚÛÜÃ?Þßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþ + // characters: ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿À�?ÂÃÄÅÆÇÈÉÊËÌ�?�?�?ÑÒÓÔÕÖרÙÚÛÜ�?Þßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþ var $JSFUNCTION_encode95 = 'function($charCode) { return ($charCode < _encoding ? \'\' : arguments.callee($charCode / _encoding)) + String.fromCharCode($charCode % _encoding + 161); @@ -712,11 +712,7 @@ class ParseMaster { } function _unescapeBis() { - if (!empty($this->_escaped[$this->buffer["i"]])) { - $temp = $this->_escaped[$this->buffer["i"]]; - } else { - $temp = ""; - } + $temp = ( !empty( $this->_escaped[$this->buffer["i"]] ) ) ? $this->_escaped[$this->buffer["i"]] : ""; $this->buffer["i"]++; return $this->buffer["escapeChar"] . $temp; } @@ -724,5 +720,4 @@ class ParseMaster { function _internalEscape($string) { return preg_replace($this->ESCAPE, "", $string); } -} -?> +}
\ No newline at end of file diff --git a/smartyplugins/BlockForm.php b/smartyplugins/BlockForm.php index ade37e7..01676eb 100755 --- a/smartyplugins/BlockForm.php +++ b/smartyplugins/BlockForm.php @@ -29,7 +29,7 @@ use Smarty\Template; class BlockForm implements BlockHandlerInterface { public function handle( $pParams, $pContent, Template $template, &$repeat): string { - global $gBitSystem, $gSniffer; + global $gBitSystem, $gBitUser, $gSniffer; if( !empty($pContent) ) { if ( $template ) { @@ -100,7 +100,10 @@ class BlockForm implements BlockHandlerInterface { $onsub = !empty( $onsubmit ) ? " onsubmit=\"$onsubmit\"" : ''; $ret = '<form action="'.$url.( !empty( $pParams['ianchor'] ) ? '#'.$pParams['ianchor'] : '' ).'" '.$atts.$onsub.'>'; - $ret .= isset( $legend ) ? "<fieldset>$legend" : ''; // adding the div makes it easier to be xhtml compliant + $ret .= isset( $legend ) ? "<fieldset>$legend" : ''; + if( is_object( $gBitUser ) && $gBitUser->isRegistered() ) { + $ret .= '<input type="hidden" name="tk" value="'.$gBitUser->mTicket.'" />'; + } $ret .= $pContent; $ret .= isset( $legend ) ? '</fieldset>' : ''; // close the open tags $ret .= '</form>'; |
