From 28572594d92b48676c7ebff0ff7935fab5c54d74 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 May 2008 14:46:01 +0000 Subject: [PATCH] Monotone-Parent: f7856cb718cba85ddb1e204c7a45f6f9dad528b5 Monotone-Revision: 03c1031b520e0b1094e5e7cf635bc6be4d30dac3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-05-30T14:46:01 Monotone-Branch: ca.inverse.sogo --- Scripts/updates.php | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/Scripts/updates.php b/Scripts/updates.php index 18de99938..4cfcded74 100755 --- a/Scripts/updates.php +++ b/Scripts/updates.php @@ -24,18 +24,18 @@ /* This script handles the automatic propagation of extensions pertaining to a SOGo site */ $plugins -= array("sogo-connector@inverse.ca" += array( "sogo-connector@inverse.ca" => array( "application" => "thunderbird", "version" => "0.67", "filename" => "sogo-connector-0.80.xpi" ), - "sogo-integrator@inverse.ca" - => array( "application" => "thunderbird", - "version" => "0.67", - "filename" => "sogo-integrator-0.80-sogo-demo.xpi" ), - "{e2fda1a4-762b-4020-b5ad-a41df1933103}" - => array( "application" => "thunderbird", + "sogo-integrator@inverse.ca" + => array( "application" => "thunderbird", + "version" => "0.67", + "filename" => "sogo-integrator-0.80-sogo-demo.xpi" ), + "{e2fda1a4-762b-4020-b5ad-a41df1933103}" + => array( "application" => "thunderbird", "version" => "0.8", - "filename" => "lightning-0.8.xpi" )); + "filename" => "lightning-0.8.xpi" )); $applications = array( "thunderbird" => "{3550f703-e582-4d05-9a08-453d09bdfdc6} @@ -49,7 +49,18 @@ $pluginname = $HTTP_GET_VARS["plugin"]; $plugin =& $plugins[$pluginname]; $application =& $applications[$plugin["application"]]; -if ($plugin) { +if ( $plugin ) { + $platform = $HTTP_GET_VARS["platform"]; + if ( $platform + && file_exists( $platform . "/" . $plugin["filename"] ) ) { + $plugin["filename"] = $platform . "/" . $plugin["filename"]; + } + elseif ( !file_exists( $plugin["filename"] ) ) { + $plugin = false; + } +} + +if ( $plugin ) { header("Content-type: text/xml; charset=utf-8"); echo ('' . "\n"); ?>