Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Set package name in an external variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Nov 3, 2015
1 parent 53c7dd8 commit 512949c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/src/plugins/action.updater/class.AjaXplorerUpgrader.php
Expand Up @@ -117,10 +117,14 @@ public static function getContext(){

public static function getUpgradePath($url, $format = "php", $channel="stable")
{
$packageName = "pydio-core";
if(defined('AJXP_PACKAGE_NAME')){
$packageName = AJXP_PACKAGE_NAME;
}
if (isSet(self::$context)) {
$json = file_get_contents($url."?channel=".$channel."&version=".AJXP_VERSION."&package=pydio-core", null, self::$context);
$json = file_get_contents($url."?channel=".$channel."&version=".AJXP_VERSION."&package=".$packageName, null, self::$context);
} else {
$json = AJXP_Utils::getRemoteContent($url."?channel=".$channel."&version=".AJXP_VERSION."&package=pydio-core");
$json = AJXP_Utils::getRemoteContent($url."?channel=".$channel."&version=".AJXP_VERSION."&package=".$packageName);
}
if($format == "php") return json_decode($json, true);
else return $json;
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/action.updater/manifest.xml
Expand Up @@ -2,7 +2,7 @@
<ajxp_plugin name="updater" label="CONF_MESSAGE[Update Engine]" description="CONF_MESSAGE[Automatic update of Pydio. Since version 3.3.3]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<server_settings>
<global_param name="UPDATE_SITE" group="CONF_MESSAGE[Updater Configuration]" type="string" label="CONF_MESSAGE[Update Site]" description="CONF_MESSAGE[Where to update]" default="https://pyd.io/update/"/>
<global_param name="UPDATE_CHANNEL" group="CONF_MESSAGE[Updater Configuration]" type="select" choices="stable|CONF_MESSAGE[Stable],dev|CONF_MESSAGE[Development],test|CONF_MESSAGE[Testing (blank)]" label="CONF_MESSAGE[Update Channel]" description="CONF_MESSAGE[Check stable or dev channel]" default="stable" mandatory="true"/>
<global_param name="UPDATE_CHANNEL" group="CONF_MESSAGE[Updater Configuration]" type="select" choices="stable|CONF_MESSAGE[Stable],migrate|CONF_MESSAGE[Install Enterprise Distribution],dev|CONF_MESSAGE[Development],test|CONF_MESSAGE[Testing (blank)]" label="CONF_MESSAGE[Update Channel]" description="CONF_MESSAGE[Check stable or dev channel]" default="stable" mandatory="true"/>
<global_param name="PRESERVE_FILES" group="CONF_MESSAGE[Updater Configuration]" type="textarea" label="CONF_MESSAGE[Preserve Files]" description="CONF_MESSAGE[Files declared here (enter pathes from the root of Ajxp installation, comma-separated) will be backed up and restored before and after upgrade.]" default=""/>
<global_param name="UPDATE_SITE_USER" group="CONF_MESSAGE[Authenticated Update Site]" type="string" label="CONF_MESSAGE[Update Site User]" description="CONF_MESSAGE[Required if the update site is requiring credentials.]" default="" mandatory="false"/>
<global_param name="UPDATE_SITE_PASS" group="CONF_MESSAGE[Authenticated Update Site]" type="password" label="CONF_MESSAGE[Update Site Password]" description="CONF_MESSAGE[Required if the update site is requiring credentials.]" default="" mandatory="false"/>
Expand Down

0 comments on commit 512949c

Please sign in to comment.