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-06-30 01:28:58 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-06-30 01:28:58 (GMT)
commit9ffd2025d3403b498b739ee0d45680f19edd4e9b (patch)
treec98feac77b349de6ebfd3158ea6d9fee11d7822d
parentaa387acd2937fa3c5c6664fbb56ca3fb0a5aaead (diff)
Sugarize services/update.php
-rw-r--r--site/app/webroot/services/update.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/site/app/webroot/services/update.php b/site/app/webroot/services/update.php
index f31ff85..80d8b2a 100644
--- a/site/app/webroot/services/update.php
+++ b/site/app/webroot/services/update.php
@@ -68,11 +68,7 @@ require_once('./functions.php');
*/
// Required variables that we need to run the script.
-$required_vars = array('reqVersion',
- 'id',
- 'version',
- 'appID',
- 'appVersion');
+$required_vars = array('id');
// Mapping of addontypes to addontype_id.
// These are used in the urn, and should not be localized.
@@ -162,6 +158,9 @@ if (empty($errors) && !$detect_installed) {
foreach ($required_vars as $var) {
$sql[$var] = mysql_real_escape_string($_GET[$var]);
}
+
+ // we are sugar
+ $sql['appID'] = '{3ca105e0-2280-4897-99a0-c277d1b733d2}';
/**
* Determine whether the add-on is hosted on AMO and if so, if it's public
@@ -193,11 +192,6 @@ if (empty($errors) && !$detect_installed) {
// If public, we only pull public files
$where = 'WHERE files.status = '.STATUS_PUBLIC;
}
- else {
- // Otherwise, we pull the appropriate file and find the same version
- // currently in use for updated compatibility information
- $where = "WHERE files.status > ".STATUS_NULL." AND versions.version = '{$sql['version']}'";
- }
$os_query = ($sql['os_id']) ? " OR files.platform_id = {$sql['os_id']}" : ''; // Set up os_id.
@@ -248,7 +242,7 @@ if (empty($errors) && !$detect_installed) {
*
* If you want to test updates, change your config and set up a web dir with public files in it.
*/
- $data['uri'] = FILES_HOST . '/' . $data['id'] . '/' . $data['filename'];
+ $data['uri'] = FILES_HOST.'/downloads/file/'.$data['file_id'].'/'.$data['filename'];
}
if (!empty($data['type'])) {