Modified: branches/tags_as_terms/system/classes/tag.php (3826 => 3827)
--- branches/tags_as_terms/system/classes/tag.php 2009-11-25 03:52:16 UTC (rev 3826)
+++ branches/tags_as_terms/system/classes/tag.php 2009-11-25 04:26:39 UTC (rev 3827)
@@ -57,6 +57,31 @@
}
/**
+ * function __get
+ * Overrides QueryRecord __get to implement custom object properties
+ * @param string Name of property to return
+ * @return mixed The requested field value
+ **/
+ public function __get( $name )
+ {
+ switch ($name) {
+ case 'tag':
+ $out = parent::__get( 'tag_text' );
+ break;
+ case 'slug':
+ $out = parent::__get( 'tag_slug' );
+ break;
+ case 'count':
+ $out = $this->get_count();
+ break;
+ default:
+ $out = parent::__get( $name );
+ break;
+ }
+ return $out;
+ }
+
+ /**
* Return a single requested tag.
*
* <code>
Modified: branches/tags_as_terms/system/classes/tags.php (3826 => 3827)
--- branches/tags_as_terms/system/classes/tags.php 2009-11-25 03:52:16 UTC (rev 3826)
+++ branches/tags_as_terms/system/classes/tags.php 2009-11-25 04:26:39 UTC (rev 3827)
@@ -17,7 +17,7 @@
* Returns a tag or tags based on supplied parameters.
* @return array An array of Tag objects
**/
- public static function get()
+ public static function get( $paramarray = array() )
{
$tags = array();
$terms = Vocabulary::get( self::$vocabulary )->get_tree();
@@ -66,6 +66,7 @@
$post_ids = array();
$tag_names = array();
+ $post_ids = array();
// get array of existing tags first to make sure we don't conflict with a new master tag
foreach ( $tags as $tag ) {