1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Bugtracker #4452 - sort charset in print_a()

This commit is contained in:
e107steved
2008-07-17 19:31:33 +00:00
parent 67eb78e511
commit 8397fcbc7b

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/class2.php,v $ | $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.61 $ | $Revision: 1.62 $
| $Date: 2008-07-04 20:19:46 $ | $Date: 2008-07-17 19:31:25 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -1576,19 +1576,25 @@ function include_lan($path, $force = false) {
return (isset($ret)) ? $ret : ""; return (isset($ret)) ? $ret : "";
} }
if(!function_exists("print_a")) { if(!function_exists("print_a"))
{
function print_a($var, $return = false)
{
$charset = "utf-8"; $charset = "utf-8";
if(defined("CHARSET")) { if(defined("CHARSET"))
$charset = CHARSET; {
$charset = CHARSET;
} }
function print_a($var, $return = false) { if(!$return)
if(!$return){ {
echo '<pre>'.htmlspecialchars(print_r($var, true), ENT_QUOTES, $charset).'</pre>'; echo '<pre>'.htmlspecialchars(print_r($var, true), ENT_QUOTES, $charset).'</pre>';
return true; return true;
} else { }
return '<pre>'.htmlspecialchars(print_r($var, true), ENT_QUOTES, $charset).'</pre>'; else
} {
return '<pre>'.htmlspecialchars(print_r($var, true), ENT_QUOTES, $charset).'</pre>';
} }
}
} }