diff options
author | Nils Adermann <naderman@naderman.de> | 2006-06-03 22:19:41 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-06-03 22:19:41 +0000 |
commit | 6ba50e34d60441e3eaf6c9fe1bff95a902393c84 (patch) | |
tree | e9ba8f0c1c5ff596a41ca070a0a80e641efebc77 /phpBB/style.php | |
parent | 9aa9cb4bb6d9ad21db25bf24e70ed35b92c0f1a9 (diff) | |
download | forums-6ba50e34d60441e3eaf6c9fe1bff95a902393c84.tar forums-6ba50e34d60441e3eaf6c9fe1bff95a902393c84.tar.gz forums-6ba50e34d60441e3eaf6c9fe1bff95a902393c84.tar.bz2 forums-6ba50e34d60441e3eaf6c9fe1bff95a902393c84.tar.xz forums-6ba50e34d60441e3eaf6c9fe1bff95a902393c84.zip |
- removed useless code from style.php
- added a view template cache mode to acp_styles
- syntax highlighting for the acp css
- completed refresh actions for themes and templates
- fixed theme and template installation
- use a function for generating database theme data
- removed useless code from mcp_queue.php
we might need to do some more tests of acp_styles with safe_mode on
git-svn-id: file:///svn/phpbb/trunk@6007 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/style.php')
-rw-r--r-- | phpBB/style.php | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/phpBB/style.php b/phpBB/style.php index e1bc5ef375..341fea13c5 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -33,7 +33,7 @@ if (!empty($load_extensions)) $sid = (isset($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : ''; $id = (isset($_GET['id'])) ? intval($_GET['id']) : 0; -if (!preg_match('/^[A-Za-z0-9]*$/', $sid)) +if (!preg_match('/^[A-Za-z0-9]*$/', $sid)) { $sid = ''; } @@ -52,7 +52,7 @@ if ($id && $sid) $db = new $sql_db(); $cache = new cache(); - + // Connect to DB if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)) { @@ -66,7 +66,7 @@ if ($id && $sid) $result = $db->sql_query($sql); $user = $db->sql_fetchrow($result); $db->sql_freeresult($result); - + if ($user) { $sql = "SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.imageset_path, t.template_path @@ -84,33 +84,9 @@ if ($id && $sid) exit; } - /*$force_load = true; // Ideally this needs to be based on $config['load_tplcompile'] - - if ($theme['theme_mtime'] < filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css') || $force_load) - { - $theme['theme_data'] = file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'); - - // Match CSS imports - $matches = array(); - preg_match_all('/@import url\(\"(.*)\"\);/i', $theme['theme_data'], $matches); - - if (sizeof($matches)) - { - foreach ($matches[0] as $idx => $match) - { - $theme['theme_data'] = str_replace($match, file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/' . $matches[1][$idx]), $theme['theme_data']); - } - } - - $sql = "UPDATE {$table_prefix}styles_theme - SET theme_data = '" . $db->sql_escape(str_replace('./', "styles/{$theme['theme_path']}/theme/", $theme['theme_data'])) . "', theme_mtime = " . time() . " - WHERE theme_id = $id"; - $db->sql_query($sql); - }*/ - header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); header('Content-type: text/css'); - + // Parse Theme Data $replace = array( '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme', |