Commit 03fa1c5d authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Updated the blogandprofile template to allow blog posts in it. Prevented

the blog posts from showing duplicate format options
parent 5e0273ef
......@@ -303,13 +303,13 @@ class ArtefactTypeBlog extends ArtefactType {
}
public static function get_render_list() {
return array_merge(
return array_values(array_unique(array_merge(
array(
FORMAT_ARTEFACT_LISTCHILDREN,
FORMAT_ARTEFACT_RENDERFULL
),
parent::get_render_list()
);
)));
}
public static function is_singular() {
......@@ -581,13 +581,13 @@ class ArtefactTypeBlogPost extends ArtefactType {
}
public static function get_render_list() {
return array_merge(
return array_values(array_unique(array_merge(
array(
FORMAT_ARTEFACT_LISTSELF,
FORMAT_ARTEFACT_RENDERFULL
),
parent::get_render_list()
);
)));
}
public static function is_singular() {
......
......@@ -242,6 +242,11 @@ function xmldb_core_upgrade($oldversion=0) {
WHERE artefacttype = 'blog'");
}
if ($oldversion < 2007021905) {
$template = template_parse('blogandprofile');
upgrade_template('blogandprofile', $template);
}
return $status;
}
......
......@@ -8,8 +8,8 @@
<tr>
<td>
{{block type="label" id="tpl_blogslabel"}}<br>
{{block type="artefact" id="tpl_blog1" artefacttype="blog"}}<br>
{{block type="artefact" id="tpl_blog2" artefacttype="blog"}}<br>
{{block type="artefact" id="tpl_blog1" plugintype="blog"}}<br>
{{block type="artefact" id="tpl_blog2" plugintype="blog"}}<br>
</td>
<td>
{{block type="label" id="tpl_profilelabel"}}<br>
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007021904;
$config->version = 2007021905;
$config->release = '0.7.0.dev';
$config->minupgradefrom = 2007011600;
$config->minupgraderelease = '0.4.0 (build tag BUILD_20070122)';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment