Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@activitycentral.org>2011-03-11 19:21:08 (GMT)
committer Aleksey Lim <alsroot@activitycentral.org>2011-03-11 19:21:08 (GMT)
commit80b60b895d3e9561a04baa00cf59c1d9c1a543ab (patch)
tree6e3b179d581c20b25d7f465591af17697c90f7b2
parent0f12fd5a40986da70d3122136f648e9b6617fcc3 (diff)
Add experimental argument to update-aslo.php to return files for experimental addons
-rw-r--r--site/app/webroot/services/update-aslo.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/site/app/webroot/services/update-aslo.php b/site/app/webroot/services/update-aslo.php
index dfb3cae..eddf9e9 100644
--- a/site/app/webroot/services/update-aslo.php
+++ b/site/app/webroot/services/update-aslo.php
@@ -70,7 +70,7 @@ require_once('./functions.php');
// Required variables that we need to run the script.
$required_vars = array('id');
-$optional_vars = array('appVersion');
+$optional_vars = array('appVersion', 'experimental');
// Mapping of addontypes to addontype_id.
// These are used in the urn, and should not be localized.
@@ -175,6 +175,11 @@ if (empty($errors) && !$detect_installed) {
* or in the sandbox.
*/
+ $where = '';
+ if (!isset($sql['experimental']) || $sql['experimental'] == '0' || $sql['experimental'] == '') {
+ $where .= ' AND status = '.STATUS_PUBLIC;
+ }
+
$id_query = "
SELECT
id,
@@ -182,7 +187,7 @@ if (empty($errors) && !$detect_installed) {
FROM
addons
WHERE
- guid = '{$sql['id']}' AND
+ guid = '{$sql['id']}' {$where} AND
inactive = 0
LIMIT 1
";
@@ -198,7 +203,7 @@ if (empty($errors) && !$detect_installed) {
$where = 'WHERE TRUE';
- if ($addon['status'] == STATUS_PUBLIC) {
+ if (!isset($sql['experimental']) || $sql['experimental'] == '0' || $sql['experimental'] == '') {
// If public, we only pull public files
$where .= ' AND files.status = '.STATUS_PUBLIC;
}