1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2006-07-09 16:23:57 +00:00
parent 455add06f2
commit 46af817cb0
60 changed files with 527 additions and 216 deletions

View File

@@ -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)) . "'";
}
}