aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-07-09 16:23:57 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-07-09 16:23:57 +0000
commit46af817cb058e2eecd89081af4a40075426a32ef (patch)
treed27156cb086223b91b8c67f23db969a980e1b7b8 /phpBB/includes/acm
parent455add06f29400af3176eea7c4958ed772934460 (diff)
downloadforums-46af817cb058e2eecd89081af4a40075426a32ef.tar
forums-46af817cb058e2eecd89081af4a40075426a32ef.tar.gz
forums-46af817cb058e2eecd89081af4a40075426a32ef.tar.bz2
forums-46af817cb058e2eecd89081af4a40075426a32ef.tar.xz
forums-46af817cb058e2eecd89081af4a40075426a32ef.zip
- tackle some usability issues
- fix bug #3147 - added the lock-images made by SHS` - fixed MSSQL errors (adding the correct ESCAPE sequence) git-svn-id: file:///svn/phpbb/trunk@6161 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_file.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index fadef07ac3..8de53144ea 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -69,7 +69,7 @@ class acm
}
global $phpEx;
- $file = '<?php $this->vars=' . $this->format_array($this->vars) . ";\n\$this->var_expires=" . $this->format_array($this->var_expires) . ' ?>';
+ $file = "<?php\n\$this->vars = " . $this->format_array($this->vars) . ";\n\n\$this->var_expires = " . $this->format_array($this->var_expires) . "\n?>";
if ($fp = @fopen($this->cache_dir . 'data_global.' . $phpEx, 'wb'))
{
@@ -255,26 +255,28 @@ class acm
/**
* Format an array to be stored on filesystem
*/
- function format_array($array)
+ function format_array($array, $tab = '')
{
+ $tab .= "\t";
+
$lines = array();
foreach ($array as $k => $v)
{
if (is_array($v))
{
- $lines[] = "\n'$k' => " . $this->format_array($v);
+ $lines[] = "\n{$tab}'$k' => " . $this->format_array($v, $tab);
}
else if (is_int($v))
{
- $lines[] = "\n'$k' => $v";
+ $lines[] = "\n{$tab}'$k' => $v";
}
else if (is_bool($v))
{
- $lines[] = "\n'$k' => " . (($v) ? 'true' : 'false');
+ $lines[] = "\n{$tab}'$k' => " . (($v) ? 'true' : 'false');
}
else
{
- $lines[] = "\n'$k' => '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $v)) . "'";
+ $lines[] = "\n{$tab}'$k' => '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $v)) . "'";
}
}