Alexander Nicolaysen Sørnes : Remove ' maintainer' from version rating fields
Chris Morgan
cmorgan at winehq.org
Wed Jan 2 20:51:44 CST 2008
Module: appdb
Branch: master
Commit: 2c2c6fffc13fa8c7dd801d4de6c87f9a1b2bc91a
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=2c2c6fffc13fa8c7dd801d4de6c87f9a1b2bc91a
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Fri Dec 28 22:57:02 2007 +0100
Remove 'maintainer' from version rating fields
---
include/application.php | 4 ++--
include/util.php | 4 ++--
include/version.php | 16 ++++++++--------
tables/appdb_tables.sql | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/application.php b/include/application.php
index fcbde66..b1db516 100644
--- a/include/application.php
+++ b/include/application.php
@@ -450,7 +450,7 @@ class Application {
{
$sQuery = "SELECT DISTINCT count(appId) as total
FROM appVersion
- WHERE maintainer_rating = '?'
+ WHERE rating = '?'
AND state = 'accepted'";
if($hResult = query_parameters($sQuery, $sRating))
@@ -465,7 +465,7 @@ class Application {
$aApps = array();
$sQuery = "SELECT DISTINCT appId
FROM appVersion
- WHERE maintainer_rating = '?'
+ WHERE rating = '?'
AND state = 'accepted'
ORDER BY appId ASC LIMIT ?, ?";
diff --git a/include/util.php b/include/util.php
index 2628ca7..0048da7 100644
--- a/include/util.php
+++ b/include/util.php
@@ -293,7 +293,7 @@ function outputTopXRowAppsFromRating($sRating, $iNumApps)
$sQuery = "SELECT appVotes.versionId, COUNT( appVotes.versionId ) AS c
FROM appVotes, appVersion
- WHERE appVersion.maintainer_rating = '?'
+ WHERE appVersion.rating = '?'
AND appVersion.versionId = appVotes.versionId
GROUP BY appVotes.versionId
ORDER BY c DESC
@@ -313,7 +313,7 @@ function outputTopXRowAppsFromRating($sRating, $iNumApps)
/* if we have any empty spots in the list, get these from applications with images */
$sQuery = "SELECT DISTINCT appVersion.versionId
FROM appVersion, appData
- WHERE appVersion.maintainer_rating = '$sRating'
+ WHERE appVersion.rating = '$sRating'
AND appVersion.versionId = appData.versionId
AND appData.type = 'screenshot'
AND appData.queued = 'false'";
diff --git a/include/version.php b/include/version.php
index 1a910e3..d3ebff3 100644
--- a/include/version.php
+++ b/include/version.php
@@ -75,8 +75,8 @@ class version {
$this->sSubmitTime = $oRow->submitTime;
$this->sName = $oRow->versionName;
$this->sDescription = $oRow->description;
- $this->sTestedRelease = $oRow->maintainer_release;
- $this->sTestedRating = $oRow->maintainer_rating;
+ $this->sTestedRelease = $oRow->ratingRelease;
+ $this->sTestedRating = $oRow->rating;
$this->sState = $oRow->state;
$this->sLicense = $oRow->license;
$this->iObsoleteBy = $oRow->obsoleteBy;
@@ -99,8 +99,8 @@ class version {
$this->sState = $this->mustBeQueued() ? 'queued' : 'accepted';
$hResult = query_parameters("INSERT INTO appVersion
- (versionName, description, maintainer_release,
- maintainer_rating, appId, submitTime, submitterId,
+ (versionName, description, ratingRelease,
+ rating, appId, submitTime, submitterId,
state, license)
VALUES ('?', '?', '?', '?', '?', ?, '?', '?', '?')",
$this->sName, $this->sDescription, $this->sTestedRelease,
@@ -180,7 +180,7 @@ class version {
if ($this->sTestedRelease && ($this->sTestedRelease!=$oVersion->sTestedRelease))
{
- if (!query_parameters("UPDATE appVersion SET maintainer_release = '?' WHERE versionId = '?'",
+ if (!query_parameters("UPDATE appVersion SET ratingRelease = '?' WHERE versionId = '?'",
$this->sTestedRelease, $this->iVersionId))
return false;
@@ -192,7 +192,7 @@ class version {
if ($this->sTestedRating && ($this->sTestedRating!=$oVersion->sTestedRating))
{
- if (!query_parameters("UPDATE appVersion SET maintainer_rating = '?' WHERE versionId = '?'",
+ if (!query_parameters("UPDATE appVersion SET rating = '?' WHERE versionId = '?'",
$this->sTestedRating, $this->iVersionId))
return false;
@@ -791,8 +791,8 @@ class version {
$aRatingInfo = $this->getRatingInfo();
$hResult = query_parameters("UPDATE appVersion SET
- maintainer_rating = '?',
- maintainer_release = '?'
+ rating = '?',
+ ratingRelease = '?'
WHERE versionId = '?'",
$aRatingInfo[0],
$aRatingInfo[1],
diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql
index 8c444cc..5f486e7 100644
--- a/tables/appdb_tables.sql
+++ b/tables/appdb_tables.sql
@@ -54,8 +54,8 @@ create table appVersion (
appId int not null,
versionName varchar(100) not null,
description text,
- maintainer_rating text,
- maintainer_release text,
+ rating text,
+ ratingRelease text,
submitTime datetime NOT NULL,
submitterId int(11) NOT NULL default '0',
license enum('Retail','Open Source','Freeware','Demo','Shareware'),
More information about the wine-cvs
mailing list