[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 9974b7e74bb7b9172b6d9fcf95d8f006ab3684a0
Stefan Hornburg
racke at rt.icdevgroup.org
Fri Jun 5 18:50:11 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 9974b7e74bb7b9172b6d9fcf95d8f006ab3684a0 (commit)
from ca3fb0071706776fe8f1472339572830444f6ac1 (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 9974b7e74bb7b9172b6d9fcf95d8f006ab3684a0
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Fri Jun 5 20:49:53 2009 +0200
exists and add functions implemented
-----------------------------------------------------------------------
Summary of changes and diff:
plugins/content/code/content.tag | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/plugins/content/code/content.tag b/plugins/content/code/content.tag
index 257523a..3050876 100644
--- a/plugins/content/code/content.tag
+++ b/plugins/content/code/content.tag
@@ -9,6 +9,22 @@ sub {
$Tag->perl({tables => 'content'});
+ if ($function eq 'add') {
+ my %content;
+
+ # created timestamp
+ $content{type} = $opt->{type} || 'page';
+ $content{title} = $opt->{title};
+ $content{body} = $opt->{body};
+ $content{uid} = $opt->{uid} || $Session->{username};
+ $content{uri} = $opt->{uri};
+ $content{created} = $opt->{created} || $Tag->time({format => '%s'});
+
+ $code = $Db{content}->set_slice([{dml => 'insert'}], \%content);
+
+ return $code;
+ }
+
if ($opt->{uri}) {
my ($ctset, $uri_qt);
@@ -26,6 +42,10 @@ sub {
$ctref = $Db{content}->row_hash($code);
}
+ if ($function eq 'exists') {
+ return $ctref;
+ }
+
if ($ctref) {
if ($opt->{edit_link}) {
my (@edit_perms, $uri);
hooks/post-receive
--
Interchange wellwell catalog
More information about the wellwell-devel
mailing list