Permalink
Browse files

Rework core.mq for options management, handling of "internal" ip's an…

…d ports, binary path moved from core.ajaxplorer to core.mq.

NSQ parameters are still not yet taken into account.
  • Loading branch information...
1 parent 87cd505 commit eb5afdb07748b2aa0609cce8c54b9d46e37869f1 @cdujeu cdujeu committed Aug 28, 2016
@@ -129,12 +129,13 @@ public static function applyActionInBackground(ContextInterface $ctx, $actionNam
/**
* @param $cmd
* @param $logFile
+ * @param $forceLog
* @return UnixProcess|null
*/
- public static function runCommandInBackground($cmd, $logFile)
+ public static function runCommandInBackground($cmd, $logFile, $forceLog = false)
{
if (PHP_OS == "WIN32" || PHP_OS == "WINNT" || PHP_OS == "Windows") {
- if (AJXP_SERVER_DEBUG) $cmd .= " > " . $logFile;
+ if (AJXP_SERVER_DEBUG || $forceLog) $cmd .= " > " . $logFile;
if (class_exists("COM") && ConfService::getGlobalConf("CLI_USE_COM")) {
$WshShell = new \COM("WScript.Shell");
$WshShell->Run("cmd /C $cmd", 0, false);
@@ -149,7 +150,7 @@ public static function runCommandInBackground($cmd, $logFile)
}
return null;
} else {
- $process = new UnixProcess($cmd, (AJXP_SERVER_DEBUG ? $logFile : null));
+ $process = new UnixProcess($cmd, (AJXP_SERVER_DEBUG || $forceLog ? $logFile : null));
Logger::debug("Starting process and sending output dev null");
return $process;
}
@@ -112,11 +112,11 @@ public static function generatePairForAdminTask($adminTaskId, $userId, $restrict
* @return array|null
* @throws PydioException
*/
- public static function findPairForAdminTask($adminTaskId, $userId){
+ public static function findPairForAdminTask($adminTaskId, $userId = ""){
$keys = self::getStore()->simpleStoreList("keystore", $cursor, "", "serial", '%"ADMIN_TASK_ID";s:' . strlen($adminTaskId) . ':"' . $adminTaskId . '"%');
foreach($keys as $kId => $kData){
- if($kData["USER_ID"] === $userId){
+ if(empty($userId) || $kData["USER_ID"] === $userId){
return ["t" => $kId, "p" => $kData["PRIVATE"]];
}
}
@@ -30,7 +30,6 @@
<global_param name="WEBDAV_BROWSER_LISTING" group="CONF_MESSAGE[WebDAV Server]" type="boolean" label="CONF_MESSAGE[Browser Access]" description="CONF_MESSAGE[Display the list of files and folder when accessing through the browser]" mandatory="false" default="false"/>
<global_param name="CMDLINE_ACTIVE" group="CONF_MESSAGE[Command Line]" type="boolean" label="CONF_MESSAGE[Command-line Active]" description="CONF_MESSAGE[Use Pydio framework via the command line, allowing CRONTAB jobs or background actions.]" mandatory="false" default="false"/>
<global_param name="CLI_PHP" group="CONF_MESSAGE[Command Line]" type="string" label="CONF_MESSAGE[Command-line PHP]" description="CONF_MESSAGE[On specific hosts, you may have to use a specific path to access the php command line]" mandatory="false" default="php"/>
- <global_param name="CLI_PYDIO" group="CONF_MESSAGE[Command Line]" type="string" label="CONF_MESSAGE[Command-line Pydio]" description="CONF_MESSAGE[On specific hosts, you may have to use a specific path to access the pydio command line]" mandatory="false" default="pydio"/>
<global_param name="CLI_USE_COM" group="CONF_MESSAGE[Command Line]" type="boolean" label="CONF_MESSAGE[Use COM class]" description="CONF_MESSAGE[On Windows running IIS, set this option to true if the COM extension is loaded, this may enable the use of the php command line.]" mandatory="false" default="false"/>
<global_param name="DISABLE_ZIP_BROWSING" group="CONF_MESSAGE[Compression Features]" type="boolean" label="CONF_MESSAGE[Disable Zip browsing]" description="CONF_MESSAGE[Disable Zip files inline browsing. This can be necessary if you always store huge zip archives: it can have some impact on performance.]" mandatory="false" default="false"/>
<global_param name="ZIP_CREATION" expose="true" group="CONF_MESSAGE[Compression Features]" type="boolean" label="CONF_MESSAGE[Zip Creation]" description="CONF_MESSAGE[If you encounter problems with online zip creation or multiple files downloading, you can disable the feature.]" mandatory="false" default="true"/>
@@ -0,0 +1,11 @@
+{
+ "name": "Internal Messaging",
+ "description": "Dispatch and collect messages inside the application or using external booster tool.",
+ "homepage": "https://pydio.com/",
+ "license":"AGPL-3.0",
+ "autoload": {
+ "psr-4": {
+ "Pydio\\Mq\\Core\\": "./src"
+ }
+ }
+}
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit eb5afdb

Please sign in to comment.