Skip to content

Instantly share code, notes, and snippets.

@mbabker
Created April 15, 2013 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbabker/5387245 to your computer and use it in GitHub Desktop.
Save mbabker/5387245 to your computer and use it in GitHub Desktop.
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