aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/actions
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-04 13:23:02 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-04 13:23:02 +0000
commitd90262f965c85c86d36944ff31754abf850512a7 (patch)
tree2b1519ccc6332635cce183d241ea891ba0d6a7aa /mod/blog/actions
parent52cac1b8f3d7ead701dbf8d30fddb015cba69f85 (diff)
downloadelgg-d90262f965c85c86d36944ff31754abf850512a7.tar.gz
elgg-d90262f965c85c86d36944ff31754abf850512a7.tar.bz2
Added tags to the blog plugin
git-svn-id: https://code.elgg.org/elgg/trunk@401 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/actions')
-rw-r--r--mod/blog/actions/add.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/mod/blog/actions/add.php b/mod/blog/actions/add.php
index 21c871e16..f51bbedac 100644
--- a/mod/blog/actions/add.php
+++ b/mod/blog/actions/add.php
@@ -23,6 +23,9 @@
$_SESSION['blogbody'] = $body;
$_SESSION['blogtags'] = $tags;
+ // Convert string of tags into a preformatted array
+ $tagarray = string_to_tag_array($tags);
+
// Make sure the title / description aren't blank
if (empty($title) || empty($body)) {
register_error(elgg_echo("blog:blank"));
@@ -47,10 +50,9 @@
register_error(elgg_echo("blog:error"));
forward("mod/blog/add.php");
}
- // Now let's add tags. We can pass an array directly to setMetaData!
- // Not very painful.
- if (is_array($tags) && sizeof($tags) > 0) {
- $blog->tags = $tags;
+ // Now let's add tags. We can pass an array directly to the object property! Easy.
+ if (is_array($tagarray)) {
+ $blog->tags = $tagarray;
}
// Success message
system_message(elgg_echo("blog:posted"));