Merge remote-tracking branch 'github-cs278/feature/remove-db-styles' into develop

* github-cs278/feature/remove-db-styles:
  [feature/remove-db-styles] Remove forgotten template variables.
  [feature/remove-db-styles] Removed style.php!
  [feature/remove-db-styles] Rework filesystem permission checks from 6d24a71.
  [feature/remove-db-styles] Update language to reflect removal of db storage.
  [feature/remove-db-styles] Mark log entrys as deprecated.
  [feature/remove-db-styles] Add error if template/theme file is unwritable.
  [feature/remove-db-styles] Add schema changes sinces 3.0.x.
  [feature/remove-db-styles] Readd table constant for upgrades etc.
  [feature/remove-db-styles] Update database schemas.
  [feature/remove-db-styles] Remove style.php DB storage.
  [feature/remove-db-styles] Remove parse_css_file option from themes.
  [feature/remove-db-styles] Remove DB theme handling code from session.
  [feature/remove-db-styles] ACP has forgotten how to store themes in the DB.
  [feature/remove-db-styles] Missed a few template DB bits in acp_styles.
  [feature/remove-db-styles] Removing unused methods from acp_style.
  [feature/remove-db-styles] Removed database storage of style components.
This commit is contained in:
Nils Adermann 2011-09-21 01:09:18 +02:00
commit fab0ec64b3
22 changed files with 140 additions and 1173 deletions

View file

@ -56,9 +56,6 @@ $template->set_custom_template($phpbb_admin_path . 'style', 'admin');
$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets'); $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
// the acp template is never stored in the database
$user->theme['template_storedb'] = false;
// Instantiate new module // Instantiate new module
$module = new p_master(); $module = new p_master();

View file

@ -362,13 +362,6 @@
<dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd> <dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
</dl> </dl>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF (S_TEMPLATE or S_THEME) and (S_LOCATION or not S_INSTALL) -->
<dl>
<dt><label for="store_db">{L_LOCATION}:</label><br /><span><!-- IF S_STORE_DB_DISABLED -->{L_LOCATION_DISABLED_EXPLAIN}<!-- ELSE -->{L_LOCATION_EXPLAIN}<!-- ENDIF --></span></dt>
<dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF --> /> {L_STORE_FILESYSTEM}</label>
<label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF -->/> {L_STORE_DATABASE}</label></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_STYLE --> <!-- IF S_STYLE -->
</fieldset> </fieldset>

View file

@ -1657,7 +1657,6 @@ function get_schema_struct()
'template_copyright' => array('VCHAR_UNI', ''), 'template_copyright' => array('VCHAR_UNI', ''),
'template_path' => array('VCHAR:100', ''), 'template_path' => array('VCHAR:100', ''),
'bbcode_bitfield' => array('VCHAR:255', 'kNg='), 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
'template_storedb' => array('BOOL', 0),
'template_inherits_id' => array('UINT:4', 0), 'template_inherits_id' => array('UINT:4', 0),
'template_inherit_path' => array('VCHAR', ''), 'template_inherit_path' => array('VCHAR', ''),
), ),
@ -1667,29 +1666,12 @@ function get_schema_struct()
), ),
); );
$schema_data['phpbb_styles_template_data'] = array(
'COLUMNS' => array(
'template_id' => array('UINT', 0),
'template_filename' => array('VCHAR:100', ''),
'template_included' => array('TEXT', ''),
'template_mtime' => array('TIMESTAMP', 0),
'template_data' => array('MTEXT_UNI', ''),
),
'KEYS' => array(
'tid' => array('INDEX', 'template_id'),
'tfn' => array('INDEX', 'template_filename'),
),
);
$schema_data['phpbb_styles_theme'] = array( $schema_data['phpbb_styles_theme'] = array(
'COLUMNS' => array( 'COLUMNS' => array(
'theme_id' => array('UINT', NULL, 'auto_increment'), 'theme_id' => array('UINT', NULL, 'auto_increment'),
'theme_name' => array('VCHAR_UNI:255', ''), 'theme_name' => array('VCHAR_UNI:255', ''),
'theme_copyright' => array('VCHAR_UNI', ''), 'theme_copyright' => array('VCHAR_UNI', ''),
'theme_path' => array('VCHAR:100', ''), 'theme_path' => array('VCHAR:100', ''),
'theme_storedb' => array('BOOL', 0),
'theme_mtime' => array('TIMESTAMP', 0),
'theme_data' => array('MTEXT_UNI', ''),
), ),
'PRIMARY_KEY' => 'theme_id', 'PRIMARY_KEY' => 'theme_id',
'KEYS' => array( 'KEYS' => array(

File diff suppressed because it is too large Load diff

View file

@ -4566,7 +4566,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/", 'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/", 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->lang_name), 'T_STYLESHEET_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css',
'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/' . $user->lang_name . '/stylesheet.css', 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/' . $user->lang_name . '/stylesheet.css',
'T_STYLESHEET_NAME' => $user->theme['theme_name'], 'T_STYLESHEET_NAME' => $user->theme['theme_name'],

View file

@ -1655,7 +1655,7 @@ class user extends session
$style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']); $style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
} }
$sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_name, c.theme_id
FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c
WHERE s.style_id = $style WHERE s.style_id = $style
AND t.template_id = s.template_id AND t.template_id = s.template_id
@ -1674,7 +1674,7 @@ class user extends session
WHERE user_id = {$this->data['user_id']}"; WHERE user_id = {$this->data['user_id']}";
$db->sql_query($sql); $db->sql_query($sql);
$sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_id
FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c
WHERE s.style_id = $style WHERE s.style_id = $style
AND t.template_id = s.template_id AND t.template_id = s.template_id
@ -1696,7 +1696,6 @@ class user extends session
$parsed_items = $parsed_items['theme']; $parsed_items = $parsed_items['theme'];
$check_for = array( $check_for = array(
'parse_css_file' => (int) 0,
'pagination_sep' => (string) ', ' 'pagination_sep' => (string) ', '
); );
@ -1711,52 +1710,6 @@ class user extends session
} }
} }
// If the style author specified the theme needs to be cached
// (because of the used paths and variables) than make sure it is the case.
// For example, if the theme uses language-specific images it needs to be stored in db.
if (!$this->theme['theme_storedb'] && $this->theme['parse_css_file'])
{
$this->theme['theme_storedb'] = 1;
$stylesheet = file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/stylesheet.css");
// Match CSS imports
$matches = array();
preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches);
if (sizeof($matches))
{
$content = '';
foreach ($matches[0] as $idx => $match)
{
if ($content = @file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/" . $matches[1][$idx]))
{
$content = trim($content);
}
else
{
$content = '';
}
$stylesheet = str_replace($match, $content, $stylesheet);
}
unset($content);
}
$stylesheet = str_replace('./', 'styles/' . $this->theme['theme_path'] . '/theme/', $stylesheet);
$sql_ary = array(
'theme_data' => $stylesheet,
'theme_mtime' => time(),
'theme_storedb' => 1
);
$sql = 'UPDATE ' . STYLES_THEME_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE theme_id = ' . $this->theme['theme_id'];
$db->sql_query($sql);
unset($sql_ary);
}
$template->set_template(); $template->set_template();
$this->img_lang = $this->lang_name; $this->img_lang = $this->lang_name;

View file

@ -1065,10 +1065,19 @@ function database_update_info()
STYLES_TABLE => array( STYLES_TABLE => array(
'imageset_id', 'imageset_id',
), ),
STYLES_TEMPLATE_TABLE => array(
'template_storedb',
),
STYLES_THEME_TABLE => array(
'theme_storedb',
'theme_mtime',
'theme_data',
),
), ),
'drop_tables' => array( 'drop_tables' => array(
STYLES_IMAGESET_TABLE, STYLES_IMAGESET_TABLE,
STYLES_IMAGESET_DATA_TABLE, STYLES_IMAGESET_DATA_TABLE,
STYLES_TEMPLATE_DATA_TABLE,
), ),
), ),
); );

View file

@ -205,9 +205,6 @@ $template->set_custom_template('../adm/style', 'admin');
$template->assign_var('T_ASSETS_PATH', '../assets'); $template->assign_var('T_ASSETS_PATH', '../assets');
$template->assign_var('T_TEMPLATE_PATH', '../adm/style'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style');
// the acp template is never stored in the database
$user->theme['template_storedb'] = false;
$install = new module(); $install = new module();
$install->create('install', "index.$phpEx", $mode, $sub); $install->create('install', "index.$phpEx", $mode, $sub);

View file

@ -134,9 +134,6 @@ class install_update extends module
// Set custom template again. ;) // Set custom template again. ;)
$template->set_custom_template('../adm/style', 'admin'); $template->set_custom_template('../adm/style', 'admin');
// still, the acp template is never stored in the database
$user->theme['template_storedb'] = false;
$template->assign_vars(array( $template->assign_vars(array(
'S_USER_LANG' => $user->lang['USER_LANG'], 'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],

View file

@ -1104,7 +1104,6 @@ CREATE TABLE phpbb_styles_template (
template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
template_storedb INTEGER DEFAULT 0 NOT NULL,
template_inherits_id INTEGER DEFAULT 0 NOT NULL, template_inherits_id INTEGER DEFAULT 0 NOT NULL,
template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
);; );;
@ -1124,27 +1123,12 @@ BEGIN
END;; END;;
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id INTEGER DEFAULT 0 NOT NULL,
template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
template_mtime INTEGER DEFAULT 0 NOT NULL,
template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
# Table: 'phpbb_styles_theme' # Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme ( CREATE TABLE phpbb_styles_theme (
theme_id INTEGER NOT NULL, theme_id INTEGER NOT NULL,
theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
theme_storedb INTEGER DEFAULT 0 NOT NULL,
theme_mtime INTEGER DEFAULT 0 NOT NULL,
theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);; );;
ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);; ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;

View file

@ -1337,7 +1337,6 @@ CREATE TABLE [phpbb_styles_template] (
[template_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[template_path] [varchar] (100) DEFAULT ('') NOT NULL , [template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
[template_storedb] [int] DEFAULT (0) NOT NULL ,
[template_inherits_id] [int] DEFAULT (0) NOT NULL , [template_inherits_id] [int] DEFAULT (0) NOT NULL ,
[template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY] ) ON [PRIMARY]
@ -1354,25 +1353,6 @@ CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON
GO GO
/*
Table: 'phpbb_styles_template_data'
*/
CREATE TABLE [phpbb_styles_template_data] (
[template_id] [int] DEFAULT (0) NOT NULL ,
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
[template_mtime] [int] DEFAULT (0) NOT NULL ,
[template_data] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
GO
CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
GO
/* /*
Table: 'phpbb_styles_theme' Table: 'phpbb_styles_theme'
*/ */
@ -1380,11 +1360,8 @@ CREATE TABLE [phpbb_styles_theme] (
[theme_id] [int] IDENTITY (1, 1) NOT NULL , [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
[theme_name] [varchar] (255) DEFAULT ('') NOT NULL , [theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL , [theme_path] [varchar] (100) DEFAULT ('') NOT NULL
[theme_storedb] [int] DEFAULT (0) NOT NULL , ) ON [PRIMARY]
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
[theme_data] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO GO
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD

View file

@ -766,7 +766,6 @@ CREATE TABLE phpbb_styles_template (
template_copyright blob NOT NULL, template_copyright blob NOT NULL,
template_path varbinary(100) DEFAULT '' NOT NULL, template_path varbinary(100) DEFAULT '' NOT NULL,
bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
template_inherit_path varbinary(255) DEFAULT '' NOT NULL, template_inherit_path varbinary(255) DEFAULT '' NOT NULL,
PRIMARY KEY (template_id), PRIMARY KEY (template_id),
@ -774,27 +773,12 @@ CREATE TABLE phpbb_styles_template (
); );
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
template_filename varbinary(100) DEFAULT '' NOT NULL,
template_included blob NOT NULL,
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
template_data mediumblob NOT NULL,
KEY tid (template_id),
KEY tfn (template_filename)
);
# Table: 'phpbb_styles_theme' # Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme ( CREATE TABLE phpbb_styles_theme (
theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
theme_name blob NOT NULL, theme_name blob NOT NULL,
theme_copyright blob NOT NULL, theme_copyright blob NOT NULL,
theme_path varbinary(100) DEFAULT '' NOT NULL, theme_path varbinary(100) DEFAULT '' NOT NULL,
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
theme_data mediumblob NOT NULL,
PRIMARY KEY (theme_id), PRIMARY KEY (theme_id),
UNIQUE theme_name (theme_name(255)) UNIQUE theme_name (theme_name(255))
); );

View file

@ -766,7 +766,6 @@ CREATE TABLE phpbb_styles_template (
template_copyright varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
template_inherit_path varchar(255) DEFAULT '' NOT NULL, template_inherit_path varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (template_id), PRIMARY KEY (template_id),
@ -774,27 +773,12 @@ CREATE TABLE phpbb_styles_template (
) CHARACTER SET `utf8` COLLATE `utf8_bin`; ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
template_filename varchar(100) DEFAULT '' NOT NULL,
template_included text NOT NULL,
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
template_data mediumtext NOT NULL,
KEY tid (template_id),
KEY tfn (template_filename)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_theme' # Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme ( CREATE TABLE phpbb_styles_theme (
theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
theme_name varchar(255) DEFAULT '' NOT NULL, theme_name varchar(255) DEFAULT '' NOT NULL,
theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL,
theme_path varchar(100) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL,
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
theme_data mediumtext NOT NULL,
PRIMARY KEY (theme_id), PRIMARY KEY (theme_id),
UNIQUE theme_name (theme_name) UNIQUE theme_name (theme_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`; ) CHARACTER SET `utf8` COLLATE `utf8_bin`;

View file

@ -1467,7 +1467,6 @@ CREATE TABLE phpbb_styles_template (
template_copyright varchar2(765) DEFAULT '' , template_copyright varchar2(765) DEFAULT '' ,
template_path varchar2(100) DEFAULT '' , template_path varchar2(100) DEFAULT '' ,
bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL, bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
template_storedb number(1) DEFAULT '0' NOT NULL,
template_inherits_id number(4) DEFAULT '0' NOT NULL, template_inherits_id number(4) DEFAULT '0' NOT NULL,
template_inherit_path varchar2(255) DEFAULT '' , template_inherit_path varchar2(255) DEFAULT '' ,
CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id), CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
@ -1492,23 +1491,6 @@ END;
/ /
/*
Table: 'phpbb_styles_template_data'
*/
CREATE TABLE phpbb_styles_template_data (
template_id number(8) DEFAULT '0' NOT NULL,
template_filename varchar2(100) DEFAULT '' ,
template_included clob DEFAULT '' ,
template_mtime number(11) DEFAULT '0' NOT NULL,
template_data clob DEFAULT ''
)
/
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
/
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
/
/* /*
Table: 'phpbb_styles_theme' Table: 'phpbb_styles_theme'
*/ */
@ -1517,9 +1499,6 @@ CREATE TABLE phpbb_styles_theme (
theme_name varchar2(765) DEFAULT '' , theme_name varchar2(765) DEFAULT '' ,
theme_copyright varchar2(765) DEFAULT '' , theme_copyright varchar2(765) DEFAULT '' ,
theme_path varchar2(100) DEFAULT '' , theme_path varchar2(100) DEFAULT '' ,
theme_storedb number(1) DEFAULT '0' NOT NULL,
theme_mtime number(11) DEFAULT '0' NOT NULL,
theme_data clob DEFAULT '' ,
CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id), CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name) CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
) )

View file

@ -1001,7 +1001,6 @@ CREATE TABLE phpbb_styles_template (
template_copyright varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0),
template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0), template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0),
template_inherit_path varchar(255) DEFAULT '' NOT NULL, template_inherit_path varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (template_id) PRIMARY KEY (template_id)
@ -1009,20 +1008,6 @@ CREATE TABLE phpbb_styles_template (
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
/*
Table: 'phpbb_styles_template_data'
*/
CREATE TABLE phpbb_styles_template_data (
template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
template_filename varchar(100) DEFAULT '' NOT NULL,
template_included varchar(8000) DEFAULT '' NOT NULL,
template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0),
template_data TEXT DEFAULT '' NOT NULL
);
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
/* /*
Table: 'phpbb_styles_theme' Table: 'phpbb_styles_theme'
*/ */
@ -1033,9 +1018,6 @@ CREATE TABLE phpbb_styles_theme (
theme_name varchar(255) DEFAULT '' NOT NULL, theme_name varchar(255) DEFAULT '' NOT NULL,
theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL,
theme_path varchar(100) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL,
theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0),
theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0),
theme_data TEXT DEFAULT '' NOT NULL,
PRIMARY KEY (theme_id) PRIMARY KEY (theme_id)
); );

View file

@ -437,10 +437,10 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id) VALUES ('prosilver', '&copy; phpBB Group', 1, 1, 1); INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id) VALUES ('prosilver', '&copy; phpBB Group', 1, 1, 1);
# -- phpbb_styles_template # -- phpbb_styles_template
INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield, template_storedb) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 'lNg=', 0); INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 'lNg=');
# -- phpbb_styles_theme # -- phpbb_styles_theme
INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_storedb, theme_data) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 1, ''); INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver');
# -- Forums # -- Forums
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');

View file

@ -741,34 +741,18 @@ CREATE TABLE phpbb_styles_template (
template_copyright varchar(255) NOT NULL DEFAULT '', template_copyright varchar(255) NOT NULL DEFAULT '',
template_path varchar(100) NOT NULL DEFAULT '', template_path varchar(100) NOT NULL DEFAULT '',
bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=', bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0', template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_inherit_path varchar(255) NOT NULL DEFAULT '' template_inherit_path varchar(255) NOT NULL DEFAULT ''
); );
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_filename varchar(100) NOT NULL DEFAULT '',
template_included text(65535) NOT NULL DEFAULT '',
template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_data mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
# Table: 'phpbb_styles_theme' # Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme ( CREATE TABLE phpbb_styles_theme (
theme_id INTEGER PRIMARY KEY NOT NULL , theme_id INTEGER PRIMARY KEY NOT NULL ,
theme_name varchar(255) NOT NULL DEFAULT '', theme_name varchar(255) NOT NULL DEFAULT '',
theme_copyright varchar(255) NOT NULL DEFAULT '', theme_copyright varchar(255) NOT NULL DEFAULT '',
theme_path varchar(100) NOT NULL DEFAULT '', theme_path varchar(100) NOT NULL DEFAULT ''
theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
theme_data mediumtext(16777215) NOT NULL DEFAULT ''
); );
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);

View file

@ -675,22 +675,28 @@ $lang = array_merge($lang, array(
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s', 'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
'LOG_STYLE_EXPORT' => '<strong>Exported style</strong><br />» %s', 'LOG_STYLE_EXPORT' => '<strong>Exported style</strong><br />» %s',
// @deprecated 3.1
'LOG_TEMPLATE_ADD_DB' => '<strong>Added new template set to database</strong><br />» %s', 'LOG_TEMPLATE_ADD_DB' => '<strong>Added new template set to database</strong><br />» %s',
// @deprecated 3.1
'LOG_TEMPLATE_ADD_FS' => '<strong>Add new template set on filesystem</strong><br />» %s', 'LOG_TEMPLATE_ADD_FS' => '<strong>Add new template set on filesystem</strong><br />» %s',
'LOG_TEMPLATE_CACHE_CLEARED' => '<strong>Deleted cached versions of template files in template set <em>%1$s</em></strong><br />» %2$s', 'LOG_TEMPLATE_CACHE_CLEARED' => '<strong>Deleted cached versions of template files in template set <em>%1$s</em></strong><br />» %2$s',
'LOG_TEMPLATE_DELETE' => '<strong>Deleted template set</strong><br />» %s', 'LOG_TEMPLATE_DELETE' => '<strong>Deleted template set</strong><br />» %s',
'LOG_TEMPLATE_EDIT' => '<strong>Edited template set <em>%1$s</em></strong><br />» %2$s', 'LOG_TEMPLATE_EDIT' => '<strong>Edited template set <em>%1$s</em></strong><br />» %2$s',
'LOG_TEMPLATE_EDIT_DETAILS' => '<strong>Edited template details</strong><br />» %s', 'LOG_TEMPLATE_EDIT_DETAILS' => '<strong>Edited template details</strong><br />» %s',
'LOG_TEMPLATE_EXPORT' => '<strong>Exported template set</strong><br />» %s', 'LOG_TEMPLATE_EXPORT' => '<strong>Exported template set</strong><br />» %s',
// @deprecated 3.1
'LOG_TEMPLATE_REFRESHED' => '<strong>Refreshed template set</strong><br />» %s', 'LOG_TEMPLATE_REFRESHED' => '<strong>Refreshed template set</strong><br />» %s',
// @deprecated 3.1
'LOG_THEME_ADD_DB' => '<strong>Added new theme to database</strong><br />» %s', 'LOG_THEME_ADD_DB' => '<strong>Added new theme to database</strong><br />» %s',
// @deprecated 3.1
'LOG_THEME_ADD_FS' => '<strong>Add new theme on filesystem</strong><br />» %s', 'LOG_THEME_ADD_FS' => '<strong>Add new theme on filesystem</strong><br />» %s',
'LOG_THEME_DELETE' => '<strong>Theme deleted</strong><br />» %s', 'LOG_THEME_DELETE' => '<strong>Theme deleted</strong><br />» %s',
'LOG_THEME_EDIT_DETAILS' => '<strong>Edited theme details</strong><br />» %s', 'LOG_THEME_EDIT_DETAILS' => '<strong>Edited theme details</strong><br />» %s',
'LOG_THEME_EDIT' => '<strong>Edited theme <em>%1$s</em></strong>', 'LOG_THEME_EDIT' => '<strong>Edited theme <em>%1$s</em></strong>',
'LOG_THEME_EDIT_FILE' => '<strong>Edited theme <em>%1$s</em></strong><br />» Modified file <em>%2$s</em>', 'LOG_THEME_EDIT_FILE' => '<strong>Edited theme <em>%1$s</em></strong><br />» Modified file <em>%2$s</em>',
'LOG_THEME_EXPORT' => '<strong>Exported theme</strong><br />» %s', 'LOG_THEME_EXPORT' => '<strong>Exported theme</strong><br />» %s',
// @deprecated 3.1
'LOG_THEME_REFRESHED' => '<strong>Refreshed theme</strong><br />» %s', 'LOG_THEME_REFRESHED' => '<strong>Refreshed theme</strong><br />» %s',
'LOG_UPDATE_DATABASE' => '<strong>Updated Database from version %1$s to version %2$s</strong>', 'LOG_UPDATE_DATABASE' => '<strong>Updated Database from version %1$s to version %2$s</strong>',

View file

@ -60,8 +60,6 @@ $lang = array_merge($lang, array(
'CACHE_FILESIZE' => 'File size', 'CACHE_FILESIZE' => 'File size',
'CACHE_MODIFIED' => 'Modified', 'CACHE_MODIFIED' => 'Modified',
'CONFIRM_TEMPLATE_CLEAR_CACHE' => 'Are you sure you wish to clear all cached versions of your template files?', 'CONFIRM_TEMPLATE_CLEAR_CACHE' => 'Are you sure you wish to clear all cached versions of your template files?',
'CONFIRM_TEMPLATE_REFRESH' => 'Are you sure you wish to refresh all template data in the database with the contents of the template files on the filesystem? This will overwrite all modifications which have been carried out with the template editor while the template was stored in the database.',
'CONFIRM_THEME_REFRESH' => 'Are you sure you wish to refresh the theme data stored in the database with the contents of the theme on the filesystem? This will overwrite all modifications which have been carried out with the theme editor while the theme was stored in the database.',
'COPYRIGHT' => 'Copyright', 'COPYRIGHT' => 'Copyright',
'CREATE_STYLE' => 'Create new style', 'CREATE_STYLE' => 'Create new style',
'CREATE_TEMPLATE' => 'Create new template set', 'CREATE_TEMPLATE' => 'Create new template set',
@ -83,16 +81,13 @@ $lang = array_merge($lang, array(
'EDIT_DETAILS_STYLE' => 'Edit style', 'EDIT_DETAILS_STYLE' => 'Edit style',
'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template and theme which define the style itself. You may also make the style the default one.', 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template and theme which define the style itself. You may also make the style the default one.',
'EDIT_DETAILS_TEMPLATE' => 'Edit template details', 'EDIT_DETAILS_TEMPLATE' => 'Edit template details',
'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the web server.', 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name.',
'EDIT_DETAILS_THEME' => 'Edit theme details', 'EDIT_DETAILS_THEME' => 'Edit theme details',
'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the web server.', 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name.',
'EDIT_TEMPLATE' => 'Edit template', 'EDIT_TEMPLATE' => 'Edit template',
'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. If PHP can write to the template files in your styles directory any changes here will be written directly to those files. If PHP cannot write to those files they will be copied into the database and all changes will only be reflected there. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.', 'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.',
'EDIT_TEMPLATE_STORED_DB' => 'The template file was unwritable so the template set is now stored in the database containing the modified file.',
'EDIT_THEME' => 'Edit theme', 'EDIT_THEME' => 'Edit theme',
'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.', 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.',
'EDIT_THEME_STORED_DB' => 'The stylesheet file was unwritable so the stylesheet is now stored in the database containing your modification.',
'EDIT_THEME_STORE_PARSED' => 'The theme requires that its stylesheet is parsed. This is only possible if its stored in the database.',
'EDITOR_DISABLED' => 'The template editor is disabled.', 'EDITOR_DISABLED' => 'The template editor is disabled.',
'EXPORT' => 'Export', 'EXPORT' => 'Export',
@ -258,7 +253,6 @@ $lang = array_merge($lang, array(
'LINE_SPACING' => 'Line spacing', 'LINE_SPACING' => 'Line spacing',
'LOCALISED_IMAGES' => 'Localised', 'LOCALISED_IMAGES' => 'Localised',
'LOCATION_DISABLED_EXPLAIN' => 'This setting is inherited and cannot be changed.',
'NO_CLASS' => 'Cannot find class in stylesheet.', 'NO_CLASS' => 'Cannot find class in stylesheet.',
'NO_IMAGE' => 'No image', 'NO_IMAGE' => 'No image',
@ -299,7 +293,6 @@ $lang = array_merge($lang, array(
'SELECTED_TEMPLATE_FILE' => 'Selected template file', 'SELECTED_TEMPLATE_FILE' => 'Selected template file',
'SELECTED_THEME' => 'Selected theme', 'SELECTED_THEME' => 'Selected theme',
'SELECTED_THEME_FILE' => 'Selected theme file', 'SELECTED_THEME_FILE' => 'Selected theme file',
'STORE_DATABASE' => 'Database',
'STORE_FILESYSTEM' => 'Filesystem', 'STORE_FILESYSTEM' => 'Filesystem',
'STYLE_ACTIVATE' => 'Activate', 'STYLE_ACTIVATE' => 'Activate',
'STYLE_ACTIVE' => 'Active', 'STYLE_ACTIVE' => 'Active',
@ -325,15 +318,14 @@ $lang = array_merge($lang, array(
'STYLE_THEME' => 'Theme', 'STYLE_THEME' => 'Theme',
'STYLE_USED_BY' => 'Used by (including robots)', 'STYLE_USED_BY' => 'Used by (including robots)',
'TEMPLATE_ADDED' => 'Template set added and stored on filesystem.', 'TEMPLATE_ADDED' => 'Template set added.',
'TEMPLATE_ADDED_DB' => 'Template set added and stored in database.',
'TEMPLATE_CACHE' => 'Template cache', 'TEMPLATE_CACHE' => 'Template cache',
'TEMPLATE_CACHE_EXPLAIN' => 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.', 'TEMPLATE_CACHE_EXPLAIN' => 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.',
'TEMPLATE_CACHE_CLEARED' => 'Template cache cleared successfully.', 'TEMPLATE_CACHE_CLEARED' => 'Template cache cleared successfully.',
'TEMPLATE_CACHE_EMPTY' => 'There are no cached templates.', 'TEMPLATE_CACHE_EMPTY' => 'There are no cached templates.',
'TEMPLATE_DELETED' => 'Template set deleted successfully.', 'TEMPLATE_DELETED' => 'Template set deleted successfully.',
'TEMPLATE_DELETE_DEPENDENT' => 'The template set cannot be deleted as there are one or more other template sets inheriting from it:', 'TEMPLATE_DELETE_DEPENDENT' => 'The template set cannot be deleted as there are one or more other template sets inheriting from it:',
'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem.', 'TEMPLATE_DELETED_FS' => 'Template set removed from database but files remain on the filesystem.',
'TEMPLATE_DETAILS_UPDATED' => 'Template details successfully updated.', 'TEMPLATE_DETAILS_UPDATED' => 'Template details successfully updated.',
'TEMPLATE_EDITOR' => 'Raw HTML template editor', 'TEMPLATE_EDITOR' => 'Raw HTML template editor',
'TEMPLATE_EDITOR_HEIGHT' => 'Template editor height', 'TEMPLATE_EDITOR_HEIGHT' => 'Template editor height',
@ -352,14 +344,10 @@ $lang = array_merge($lang, array(
'TEMPLATE_FILE' => 'Template file', 'TEMPLATE_FILE' => 'Template file',
'TEMPLATE_FILE_UPDATED' => 'Template file updated successfully.', 'TEMPLATE_FILE_UPDATED' => 'Template file updated successfully.',
'TEMPLATE_INHERITS' => 'This template sets inherits from %s and thus cannot have a different storage setting than its super template.', 'TEMPLATE_INHERITS' => 'This template sets inherits from %s and thus cannot have a different storage setting than its super template.',
'TEMPLATE_LOCATION' => 'Store templates in',
'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
'TEMPLATE_NAME' => 'Template name', 'TEMPLATE_NAME' => 'Template name',
'TEMPLATE_FILE_NOT_WRITABLE'=> 'Unable to write to template file %s. Please check the permissions for the directory and the files.', 'TEMPLATE_FILE_NOT_WRITABLE'=> 'Unable to write to template file %s. Please check the permissions for the directory and the files.',
'TEMPLATE_REFRESHED' => 'Template refreshed successfully.',
'THEME_ADDED' => 'New theme added on filesystem.', 'THEME_ADDED' => 'New theme added.',
'THEME_ADDED_DB' => 'New theme added to database.',
'THEME_CLASS_ADDED' => 'Custom class added successfully.', 'THEME_CLASS_ADDED' => 'Custom class added successfully.',
'THEME_DELETED' => 'Theme deleted successfully.', 'THEME_DELETED' => 'Theme deleted successfully.',
'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem.', 'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem.',
@ -373,16 +361,13 @@ $lang = array_merge($lang, array(
'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists.', 'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists.',
'THEME_ERR_NAME_LONG' => 'The theme name can be no longer than 30 characters.', 'THEME_ERR_NAME_LONG' => 'The theme name can be no longer than 30 characters.',
'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.', 'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.',
'THEME_ERR_REFRESH_FS' => 'This theme is stored on the filesystem so there is no need to refresh it.',
'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme.', 'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme.',
'THEME_FILE' => 'Theme file', 'THEME_FILE' => 'Theme file',
'THEME_FILE_NOT_WRITABLE' => 'Unable to write to theme file %s. Please check the permissions for the directory and the files.',
'THEME_EXPORT' => 'Export Theme', 'THEME_EXPORT' => 'Export Theme',
'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', 'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
'THEME_EXPORTED' => 'Theme exported successfully and stored in %s.', 'THEME_EXPORTED' => 'Theme exported successfully and stored in %s.',
'THEME_LOCATION' => 'Store stylesheet in',
'THEME_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
'THEME_NAME' => 'Theme name', 'THEME_NAME' => 'Theme name',
'THEME_REFRESHED' => 'Theme refreshed successfully.',
'THEME_UPDATED' => 'Theme updated successfully.', 'THEME_UPDATED' => 'Theme updated successfully.',
'UNDERLINE' => 'Underline', 'UNDERLINE' => 'Underline',

View file

@ -1,222 +0,0 @@
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'includes/startup.' . $phpEx);
require($phpbb_root_path . 'config.' . $phpEx);
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
{
exit;
}
// Load Extensions
if (!empty($load_extensions) && function_exists('dl'))
{
$load_extensions = explode(',', $load_extensions);
foreach ($load_extensions as $extension)
{
@dl(trim($extension));
}
}
// no $request here because it is not loaded yet
$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
// This is a simple script to grab and output the requested CSS data stored in the DB
// We include a session_id check to try and limit 3rd party linking ... unless they
// happen to have a current session it will output nothing. We will also cache the
// resulting CSS data for five minutes ... anything to reduce the load on the SQL
// server a little
if ($id)
{
// Include files
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx);
$class_loader->register();
// set up caching
$cache_factory = new phpbb_cache_factory($acm_type);
$cache = $cache_factory->get_service();
$class_loader->set_cache($cache->get_driver());
$request = new phpbb_request();
$db = new $sql_db();
// make sure request_var uses this request instance
request_var('', 0, false, false, $request); // "dependency injection" for a function
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
{
exit;
}
unset($dbpasswd);
$config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
$user = false;
// try to get a session ID from REQUEST array
$sid = request_var('sid', '');
if (!$sid)
{
// if that failed, then look in the cookies
$sid = request_var($config['cookie_name'] . '_sid', '', false, true);
}
if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
{
$sid = '';
}
if ($sid)
{
$sql = 'SELECT u.user_id, u.user_lang
FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
WHERE s.session_id = '" . $db->sql_escape($sid) . "'
AND s.session_user_id = u.user_id";
$result = $db->sql_query($sql);
$user = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
$recompile = $config['load_tplcompile'];
if (!$user)
{
$id = ($id) ? $id : $config['default_style'];
// Commented out because calls do not always include the SID anymore
// $recompile = false;
$user = array('user_id' => ANONYMOUS);
}
$sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, t.template_path
FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c
WHERE s.style_id = ' . $id . '
AND t.template_id = s.template_id
AND c.theme_id = s.theme_id';
$result = $db->sql_query($sql, 300);
$theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$theme)
{
exit;
}
if ($user['user_id'] == ANONYMOUS)
{
$user['user_lang'] = $config['default_lang'];
}
// gzip_compression
if ($config['gzip_compress'])
{
// IE6 is not able to compress the style (do not ask us why!)
$browser = strtolower($request->header('User-Agent'));
if ($browser && strpos($browser, 'msie 6.0') === false && @extension_loaded('zlib') && !headers_sent())
{
ob_start('ob_gzhandler');
}
}
// Expire time of seven days if not recached
$expire_time = 7*86400;
$recache = false;
// Re-cache stylesheet data if necessary
if ($recompile || empty($theme['theme_data']))
{
$recache = (empty($theme['theme_data'])) ? true : false;
$update_time = time();
// We test for stylesheet.css because it is faster and most likely the only file changed on common themes
if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
{
$recache = true;
$update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
}
else if (!$recache)
{
$last_change = $theme['theme_mtime'];
$dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
if ($dir)
{
while (($entry = readdir($dir)) !== false)
{
if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
{
$recache = true;
break;
}
}
closedir($dir);
}
}
}
if ($recache)
{
include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
$theme['theme_data'] = acp_styles::db_theme_data($theme);
$theme['theme_mtime'] = $update_time;
// Save CSS contents
$sql_ary = array(
'theme_mtime' => $theme['theme_mtime'],
'theme_data' => $theme['theme_data']
);
$sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE theme_id = {$theme['theme_id']}";
$db->sql_query($sql);
$cache->destroy('sql', STYLES_THEME_TABLE);
}
// Only set the expire time if the theme changed data is older than 30 minutes - to cope with changes from the ACP
if ($recache || $theme['theme_mtime'] > (time() - 1800))
{
header('Expires: 0');
}
else
{
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire_time));
}
header('Content-type: text/css; charset=UTF-8');
// Echo Theme Data
echo $theme['theme_data'];
if (!empty($cache))
{
$cache->unload();
}
$db->sql_close();
}

View file

@ -14,12 +14,8 @@
# the value, then enclose the value with single or double quotes. # the value, then enclose the value with single or double quotes.
# Single and double quotes do not need to be escaped. # Single and double quotes do not need to be escaped.
# #
# Available and used values:
# parse_css_file
#
# General Information about this theme # General Information about this theme
name = prosilver name = prosilver
copyright = &copy; phpBB Group, 2007 copyright = &copy; phpBB Group, 2007
version = 3.1.0-dev version = 3.1.0-dev

View file

@ -14,9 +14,6 @@
# the value, then enclose the value with single or double quotes. # the value, then enclose the value with single or double quotes.
# Single and double quotes do not need to be escaped. # Single and double quotes do not need to be escaped.
# #
# Available and used values:
# parse_css_file
#
# General Information about this theme # General Information about this theme
name = subsilver2 name = subsilver2