[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. e6dc0529a1cf538db8bc8dbba21f0b2ec01109fc

Stefan Hornburg racke at rt.icdevgroup.org
Fri Feb 27 14:12:53 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".

The branch, master has been updated
       via  e6dc0529a1cf538db8bc8dbba21f0b2ec01109fc (commit)
      from  a6c1039bc33cd39c1cefa62e0832b33e82a3612a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e6dc0529a1cf538db8bc8dbba21f0b2ec01109fc
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Fri Feb 27 11:14:09 2009 +0100

    content from db may serve as template

-----------------------------------------------------------------------

Summary of changes and diff:
 plugins/content/code/content.tag |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/plugins/content/code/content.tag b/plugins/content/code/content.tag
index 1406a71..f6b0d4f 100644
--- a/plugins/content/code/content.tag
+++ b/plugins/content/code/content.tag
@@ -4,7 +4,7 @@ UserTag content HasEndTag
 UserTag content Routine <<EOR
 sub {
 	my ($function, $code, $opt, $body) = @_;
-	my ($ctref, $out, %content);
+	my ($ctref, $out, %content, $istemplate);
 
 	$Tag->perl({tables => 'content'});
 
@@ -62,10 +62,26 @@ sub {
 		}
 	}
 
+	# Determine whether content is a template or just text
+	if (ref($opt->{params}) eq 'HASH') {
+		$istemplate = 1;
+	}
+
 	if ($body) {
+		if ($istemplate) {
+			for (keys %{$opt->{params}}) {
+				$content{$_} = $opt->{params}->{$_};
+			}
+		}
+
 		return $Tag->uc_attr_list({hash => \%content, body => $body});
 	}
 
+	if ($istemplate) {
+		$content{body} = $Tag->uc_attr_list({hash => $opt->{params},
+			body => $content{body}});
+	}
+
 	return $content{edit_link} . $content{title} . $content{body};
 }
 EOR


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list