Bladeren bron

Fixed weird error where random users where shown as creators

pull/24/head
Teknikode 4 jaren geleden
bovenliggende
commit
8c9484f13f
3 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1
    1
      api/api.php
  2. 1
    1
      ricehalla/main.php
  3. 1
    1
      ricehalla/view_image.php

+ 1
- 1
api/api.php Bestand weergeven

@@ -219,7 +219,7 @@ if (isset($_GET['component']))
$limit = " LIMIT ".$_POST['limit'];
}
}
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE ".$filter." GROUP BY votes.row_id ORDER BY ".$order_by." ".$order.$limit, $filter_content, 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, votes.user_id, sum(votes.points) TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * abs(sum(votes.points)) as TotalRank, ricehalla.date_added');
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE ".$filter." GROUP BY votes.row_id ORDER BY ".$order_by." ".$order.$limit, $filter_content, 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, sum(votes.points) TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * abs(sum(votes.points)) as TotalRank, ricehalla.date_added');
if ($Results)
{
$result_list = array();

+ 1
- 1
ricehalla/main.php Bestand weergeven

@@ -1,5 +1,5 @@
<?php
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? GROUP BY votes.row_id ORDER BY TotalRank DESC, TotalVotes DESC, TotalPoints DESC", array("ricehalla"), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, votes.user_id, sum(votes.points) as TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * abs(sum(votes.points)) as TotalRank, ricehalla.date_added');
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? GROUP BY votes.row_id ORDER BY TotalRank DESC, TotalVotes DESC, TotalPoints DESC", array("ricehalla"), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, sum(votes.points) as TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * abs(sum(votes.points)) as TotalRank, ricehalla.date_added');

$result_list = array();
foreach ($Results as $result)

+ 1
- 1
ricehalla/view_image.php Bestand weergeven

@@ -14,7 +14,7 @@ include('../templates/'.$CONF['template'].'/header.php');
if (isset($_GET['id']))
{
$desktop_id = $_GET['id'];
$result = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? AND ricehalla.id=? GROUP BY votes.row_id ORDER BY TotalPoints DESC", array("ricehalla", $desktop_id), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, votes.user_id, sum(votes.points) TotalPoints, ricehalla.date_added');
$result = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? AND ricehalla.id=? GROUP BY votes.row_id ORDER BY TotalPoints DESC", array("ricehalla", $desktop_id), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, sum(votes.points) TotalPoints, ricehalla.date_added');
if ($result)
{

Laden…
Annuleren
Opslaan