[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. c2a952fdc79f616e1b0dff00edc8d457208428b8
Stefan Hornburg
racke at rt.icdevgroup.org
Sun Dec 27 11:22:35 UTC 2009
via c2a952fdc79f616e1b0dff00edc8d457208428b8 (commit)
from 7320a8ecc7bf546d32e68df1c180557c9eb096fc (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 c2a952fdc79f616e1b0dff00edc8d457208428b8
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Sun Dec 27 12:21:36 2009 +0100
[wiki] format function added
formatter configuration is now also stored as array/hash pair
-----------------------------------------------------------------------
Summary of changes and diff:
lib/Vend/Wiki.pm | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/lib/Vend/Wiki.pm b/lib/Vend/Wiki.pm
index f597402..7224b5d 100644
--- a/lib/Vend/Wiki.pm
+++ b/lib/Vend/Wiki.pm
@@ -65,13 +65,13 @@ sub new {
my @formatters;
# single or multiple formatter(s) ?
- @formatters = keys %{$self->{formatter}};
+ @formatters = @{$self->{formatter}->{array}};
if (@formatters > 1) {
my (%parms, $fmt);
for (@formatters) {
- $fmt = $self->{formatter}->{$_};
+ $fmt = $self->{formatter}->{hash}->{$_};
$self->load_formatter($fmt);
$parms{$_} = $fmt->{object};
}
@@ -82,7 +82,7 @@ sub new {
else {
my ($fmt);
- $fmt = $self->{formatter}->{$formatters[0]};
+ $fmt = $self->{formatter}->{hash}->{$formatters[0]};
$self->load_formatter($fmt);
$self->{formatter_object} = $fmt->{object};
}
@@ -171,6 +171,11 @@ sub wiki {
return join(',', @out);
}
}
+
+ if ($function eq 'format') {
+ # determine current format
+ return $wiki{$name}->{formatter}->{array}->[0];
+ }
if ($function eq 'list') {
my @nodes;
@@ -428,8 +433,12 @@ sub parse_wiki {
else {
$class = "Wiki::Toolkit::Formatter::$value";
}
+
+ unless (exists $C->{$item}->{$name}->{$param}->{hash}->{$value}) {
+ push(@{$C->{$item}->{$name}->{$param}->{array}}, $value);
+ }
- $C->{$item}->{$name}->{formatter}->{$value} = {class => $class};
+ $C->{$item}->{$name}->{$param}->{hash}->{$value} = {class => $class};
}
elsif ($param eq 'metadata') {
unless (exists $C->{$item}->{$name}->{$param}->{hash}->{$value}) {
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list