Permalink
Browse files

Group bug fixes

  • Loading branch information...
1 parent a893ef7 commit facccc3f4751b7350dd5a4891014a403b0d15924 @JKoff JKoff committed Apr 7, 2012
Showing with 6 additions and 5 deletions.
  1. +2 −2 activity.php
  2. +3 −2 groupResults.php
  3. +1 −1 match.php
View
@@ -171,9 +171,9 @@ function(responseText) {
}
?>
<script>
- function queue($activity) {
+ function queue(activity) {
$('#activity').attr('disabled', false);
- $('#activity').val($activity);
+ $('#activity').val(activity);
$('#SearchBar form').submit();
}
function unqueue() {
View
@@ -109,6 +109,7 @@ function format_rel_ts($secs) {
$prev_remaining = $remaining;
$remaining = $row['remaining'];
+ $prev_userInGroup = $userInGroup;
$userInGroup = $row['userInGroup'];
if ($previous_group_id != $group_id) {
@@ -117,11 +118,11 @@ function format_rel_ts($secs) {
<span class="LFNum">Looking for $prev_remaining more people</span>
EOH;
- if (!$userInGroup) {
+ if (!$prev_userInGroup) {
$html .= '<div class="MatchMe">Match Me</div>';
}
$html .= "</div>";
- if (!$userInGroup) {
+ if (!$prev_userInGroup) {
$html .= "</a>";
}
echo $html;
View
@@ -67,7 +67,7 @@
"LEFT JOIN groups ON groups.id = group_members.group_id " .
"LEFT JOIN users ON users.id = group_members.user_id " .
"WHERE groups.activity_id = $activity " .
- "ORDER BY groups.id = (SELECT group_id FROM group_members WHERE user_id=$user->id), groups.id DESC";
+ "ORDER BY (SELECT group_id FROM group_members WHERE user_id=$user->id AND group_id = groups.id) IS NULL, groups.id DESC";
$result = mysql_query($query) or die(mysql_error());
$userInGroup = false;

0 comments on commit facccc3

Please sign in to comment.