Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-07-29 16:24:42 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-07-29 16:24:42 (GMT)
commiteefda2b0de8e048a1e44280d38b8e7656b6fa3a3 (patch)
treed447eaaf5a1fcf9231377a787106e296e07d4209
parent8a4a437258111785eee635850e4607111784071d (diff)
Return file size in update.php service
-rw-r--r--site/app/webroot/services/update.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/site/app/webroot/services/update.php b/site/app/webroot/services/update.php
index 7931681..9371fb3 100644
--- a/site/app/webroot/services/update.php
+++ b/site/app/webroot/services/update.php
@@ -204,8 +204,8 @@ if (empty($errors) && !$detect_installed) {
}
if (isset($sql['appVersion'])) {
- $where .= " AND CAST('{$sql['appVersion']}' AS DECIMAL(2,2)) >= appmin.version";
- $where .= " AND CAST('{$sql['appVersion']}' AS DECIMAL(2,2)) <= appmax.version";
+ $where .= " AND CAST('{$sql['appVersion']}' AS DECIMAL(3,3)) >= CAST(appmin.version AS DECIMAL(3,3))";
+ $where .= " AND CAST('{$sql['appVersion']}' AS DECIMAL(3,3)) <= CAST(appmax.version AS DECIMAL(3,3))";
}
$os_query = ($sql['os_id']) ? " OR files.platform_id = {$sql['os_id']}" : ''; // Set up os_id.
@@ -224,6 +224,7 @@ if (empty($errors) && !$detect_installed) {
files.id as file_id,
files.hash,
files.filename,
+ files.size,
versions.id as version_id,
versions.releasenotes,
versions.version as version
@@ -414,6 +415,7 @@ echo <<<XMLBODY
<em:minVersion>{$update['min']}</em:minVersion>
<em:maxVersion>{$update['max']}</em:maxVersion>
<em:updateLink>{$update['uri']}</em:updateLink>
+ <em:updateSize>{$update['size']}</em:updateSize>
{$updateInfoURL}
{$hash}
</RDF:Description>