diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-02-07 16:57:09 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-02-07 16:57:09 +0100 |
commit | d4e00b6c0dd75c757797a0fc8bc30e9b8672e094 (patch) | |
tree | a8127689e83019fc5ea097252eb6b131f7440860 /phpBB/includes/acp/acp_styles.php | |
parent | 2929d345ab93e4814d3880313f6ea78cb30fabe6 (diff) | |
parent | 3feeb382c5faa00cbe69870ed7b96e927f8f59e2 (diff) | |
download | forums-d4e00b6c0dd75c757797a0fc8bc30e9b8672e094.tar forums-d4e00b6c0dd75c757797a0fc8bc30e9b8672e094.tar.gz forums-d4e00b6c0dd75c757797a0fc8bc30e9b8672e094.tar.bz2 forums-d4e00b6c0dd75c757797a0fc8bc30e9b8672e094.tar.xz forums-d4e00b6c0dd75c757797a0fc8bc30e9b8672e094.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10616] Add template inheritance to exported template
[ticket/10616] Ignore template inheritance that points to self
[ticket/10616] Add template inheritance to default styles
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index c8fe748c02..7b449d3b35 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -83,11 +83,11 @@ version = {VERSION} $this->template_cfg .= ' # Some configuration options -# -# You can use this function to inherit templates from another template. -# The template of the given name has to be installed. -# Templates cannot inherit from inheriting templates. -#'; +# Template inheritance +# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/ +# Set value to empty or this template name to ignore template inheritance. +inherit_from = {INHERIT_FROM} +'; // Execute overall actions switch ($action) @@ -1346,9 +1346,7 @@ version = {VERSION} // Export template core code if ($mode == 'template' || $inc_template) { - $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg); - - $use_template_name = ''; + $use_template_name = $style_row['template_name']; // Add the inherit from variable, depending on it's use... if ($style_row['template_inherits_id']) @@ -1362,7 +1360,8 @@ version = {VERSION} $db->sql_freeresult($result); } - $template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = "; + $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg); + $template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}"; $data[] = array( |