Remove 'maintainer' from version rating fields

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-12-28 22:57:02 +01:00
committed by Chris Morgan
parent e8bfc0024c
commit 2c2c6fffc1
4 changed files with 14 additions and 14 deletions

View File

@@ -450,7 +450,7 @@ class Application {
{ {
$sQuery = "SELECT DISTINCT count(appId) as total $sQuery = "SELECT DISTINCT count(appId) as total
FROM appVersion FROM appVersion
WHERE maintainer_rating = '?' WHERE rating = '?'
AND state = 'accepted'"; AND state = 'accepted'";
if($hResult = query_parameters($sQuery, $sRating)) if($hResult = query_parameters($sQuery, $sRating))
@@ -465,7 +465,7 @@ class Application {
$aApps = array(); $aApps = array();
$sQuery = "SELECT DISTINCT appId $sQuery = "SELECT DISTINCT appId
FROM appVersion FROM appVersion
WHERE maintainer_rating = '?' WHERE rating = '?'
AND state = 'accepted' AND state = 'accepted'
ORDER BY appId ASC LIMIT ?, ?"; ORDER BY appId ASC LIMIT ?, ?";

View File

@@ -293,7 +293,7 @@ function outputTopXRowAppsFromRating($sRating, $iNumApps)
$sQuery = "SELECT appVotes.versionId, COUNT( appVotes.versionId ) AS c $sQuery = "SELECT appVotes.versionId, COUNT( appVotes.versionId ) AS c
FROM appVotes, appVersion FROM appVotes, appVersion
WHERE appVersion.maintainer_rating = '?' WHERE appVersion.rating = '?'
AND appVersion.versionId = appVotes.versionId AND appVersion.versionId = appVotes.versionId
GROUP BY appVotes.versionId GROUP BY appVotes.versionId
ORDER BY c DESC 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 */ /* if we have any empty spots in the list, get these from applications with images */
$sQuery = "SELECT DISTINCT appVersion.versionId $sQuery = "SELECT DISTINCT appVersion.versionId
FROM appVersion, appData FROM appVersion, appData
WHERE appVersion.maintainer_rating = '$sRating' WHERE appVersion.rating = '$sRating'
AND appVersion.versionId = appData.versionId AND appVersion.versionId = appData.versionId
AND appData.type = 'screenshot' AND appData.type = 'screenshot'
AND appData.queued = 'false'"; AND appData.queued = 'false'";

View File

@@ -75,8 +75,8 @@ class version {
$this->sSubmitTime = $oRow->submitTime; $this->sSubmitTime = $oRow->submitTime;
$this->sName = $oRow->versionName; $this->sName = $oRow->versionName;
$this->sDescription = $oRow->description; $this->sDescription = $oRow->description;
$this->sTestedRelease = $oRow->maintainer_release; $this->sTestedRelease = $oRow->ratingRelease;
$this->sTestedRating = $oRow->maintainer_rating; $this->sTestedRating = $oRow->rating;
$this->sState = $oRow->state; $this->sState = $oRow->state;
$this->sLicense = $oRow->license; $this->sLicense = $oRow->license;
$this->iObsoleteBy = $oRow->obsoleteBy; $this->iObsoleteBy = $oRow->obsoleteBy;
@@ -99,8 +99,8 @@ class version {
$this->sState = $this->mustBeQueued() ? 'queued' : 'accepted'; $this->sState = $this->mustBeQueued() ? 'queued' : 'accepted';
$hResult = query_parameters("INSERT INTO appVersion $hResult = query_parameters("INSERT INTO appVersion
(versionName, description, maintainer_release, (versionName, description, ratingRelease,
maintainer_rating, appId, submitTime, submitterId, rating, appId, submitTime, submitterId,
state, license) state, license)
VALUES ('?', '?', '?', '?', '?', ?, '?', '?', '?')", VALUES ('?', '?', '?', '?', '?', ?, '?', '?', '?')",
$this->sName, $this->sDescription, $this->sTestedRelease, $this->sName, $this->sDescription, $this->sTestedRelease,
@@ -180,7 +180,7 @@ class version {
if ($this->sTestedRelease && ($this->sTestedRelease!=$oVersion->sTestedRelease)) 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)) $this->sTestedRelease, $this->iVersionId))
return false; return false;
@@ -192,7 +192,7 @@ class version {
if ($this->sTestedRating && ($this->sTestedRating!=$oVersion->sTestedRating)) 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)) $this->sTestedRating, $this->iVersionId))
return false; return false;
@@ -791,8 +791,8 @@ class version {
$aRatingInfo = $this->getRatingInfo(); $aRatingInfo = $this->getRatingInfo();
$hResult = query_parameters("UPDATE appVersion SET $hResult = query_parameters("UPDATE appVersion SET
maintainer_rating = '?', rating = '?',
maintainer_release = '?' ratingRelease = '?'
WHERE versionId = '?'", WHERE versionId = '?'",
$aRatingInfo[0], $aRatingInfo[0],
$aRatingInfo[1], $aRatingInfo[1],

View File

@@ -54,8 +54,8 @@ create table appVersion (
appId int not null, appId int not null,
versionName varchar(100) not null, versionName varchar(100) not null,
description text, description text,
maintainer_rating text, rating text,
maintainer_release text, ratingRelease text,
submitTime datetime NOT NULL, submitTime datetime NOT NULL,
submitterId int(11) NOT NULL default '0', submitterId int(11) NOT NULL default '0',
license enum('Retail','Open Source','Freeware','Demo','Shareware'), license enum('Retail','Open Source','Freeware','Demo','Shareware'),