more compat
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@927 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
79767033b7
commit
058f2ff1ed
@ -105,7 +105,10 @@ class NumericScore extends Extension {
|
||||
private function add_vote($image_id, $user_id, $score) {
|
||||
global $database;
|
||||
$database->Execute(
|
||||
"REPLACE INTO numeric_score_votes(image_id, user_id, score) VALUES(?, ?, ?)",
|
||||
"DELETE FROM numeric_score_votes WHERE image_id=? AND user_id=?",
|
||||
array($image_id, $user_id));
|
||||
$database->Execute(
|
||||
"INSERT INTO numeric_score_votes(image_id, user_id, score) VALUES(?, ?, ?)",
|
||||
array($image_id, $user_id, $score));
|
||||
$database->Execute(
|
||||
"UPDATE images SET numeric_score=(SELECT SUM(score) FROM numeric_score_votes WHERE image_id=?) WHERE id=?",
|
||||
|
@ -101,7 +101,7 @@ class TagList extends Extension {
|
||||
$result = $database->execute("
|
||||
SELECT
|
||||
tag,
|
||||
FLOOR(LOG(LOG(count - ? + 1)+1)*1.5*100)/100 AS scaled
|
||||
FLOOR(LOG(2.7, LOG(2.7, count - ? + 1)+1)*1.5*100)/100 AS scaled
|
||||
FROM tags
|
||||
WHERE count >= ?
|
||||
ORDER BY tag
|
||||
|
Loading…
x
Reference in New Issue
Block a user