Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed tags tab to display correctly #54

Merged
merged 1 commit into from

2 participants

@bones418

Fixed tags tab to act-as "containable" so that the tagSearch function can retrieve results. Also respect the flagged threshold and don't display answers that have been excessively flagged

@bones418 bones418 Update app/models/tag.php
Fix tags tab to include "containable" and exclude answers that are over the flagged threshold
f168dc2
@Datawalke Datawalke merged commit 948f194 into from
@Datawalke
Owner

@bones418 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 14, 2012
  1. @bones418

    Update app/models/tag.php

    bones418 authored
    Fix tags tab to include "containable" and exclude answers that are over the flagged threshold
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/models/tag.php
View
5 app/models/tag.php
@@ -2,6 +2,8 @@
class Tag extends AppModel {
var $name = 'Tag';
+ var $actsAs = array('Containable');
+
var $hasAndBelongsToMany = array(
'Post' => array(
'className' => 'Post',
@@ -54,7 +56,8 @@ public function tagSearch($tag, $page) {
'fields' => array('User.public_key', 'User.username')
),
'Answer' => array(
- 'fields' => array('Answer.id')
+ 'fields' => array('Answer.id'),
+ 'conditions' => array('Answer.flags <' => $flag_check['Setting']['value'])
),
'conditions' => array('Post.flags <' => $flag_check['Setting']['value']),
'fields' => array('Post.title', 'Post.url_title', 'Post.public_key',
Something went wrong with that request. Please try again.