Skip to content

Instantly share code, notes, and snippets.

@mbabker mbabker/tags.diff
Created Apr 15, 2013

Embed
What would you like to do?
Tags patch
diff --git a/libraries/cms/helper/tags.php b/libraries/cms/helper/tags.php
index 607bc9f..bd6cd35 100644
--- a/libraries/cms/helper/tags.php
+++ b/libraries/cms/helper/tags.php
@@ -20,6 +20,14 @@ defined('JPATH_PLATFORM') or die;
class JHelperTags
{
/**
+ * A list of tag IDs
+ *
+ * @var string
+ * @since 3.1
+ */
+ public $tags = null;
+
+ /**
* Method to add or update tags associated with an item. Generally used as a postSaveHook.
*
* @param integer $id The id (primary key) of the item to be tagged.
@@ -209,14 +217,10 @@ class JHelperTags
// Add the tags to the content data.
$tagsList = $db->loadColumn();
- $tags = implode(',', $tagsList);
- }
- else
- {
- $tags = null;
+ $this->tags = implode(',', $tagsList);
}
- return $tags;
+ return $this->tags;
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.