Fixes some packaging issues.

This commit is contained in:
Lars Jung 2013-07-16 23:43:26 +02:00
parent b09d4f638c
commit 7d2b1c1c30
3 changed files with 7 additions and 7 deletions

View File

@ -63,7 +63,7 @@ modulejs.define('ext/download', ['_', '$', 'core/settings', 'core/resource', 'co
selectedHrefsStr = _.map(items, function (item) {
return item.absHref;
}).join(':');
}).join('|:|');
$download.appendTo('#navbar').show();
} else {
$download.hide();
@ -82,9 +82,9 @@ modulejs.define('ext/download', ['_', '$', 'core/settings', 'core/resource', 'co
} else if (exe === 'SHELL') {
var query = '?action=passArchive';
query += '&as=' + (settings.packageName || location.getItem().label) + '.' + settings.format;
query += '&as=' + encodeURIComponent((settings.packageName || location.getItem().label) + '.' + settings.format);
query += '&format=' + settings.format;
query += '&hrefs=' + selectedHrefsStr;
query += '&hrefs=' + encodeURIComponent(selectedHrefsStr);
window.location = query;
}
},

View File

@ -105,7 +105,7 @@ Options
*/
"download": {
"enabled": true,
"execution": "php",
"execution": "shell",
"format": "tar",
"packageName": null
},

View File

@ -109,7 +109,7 @@ class Api {
normalized_require_once("/server/php/inc/Archive.php");
$archive = new Archive($this->app);
$hrefs = explode(":", trim($hrefs));
$hrefs = explode("|:|", trim($hrefs));
$target = $archive->create($format, $hrefs);
if (!is_string($target)) {
@ -160,7 +160,7 @@ class Api {
normalized_require_once("/server/php/inc/Archive.php");
$archive = new Archive($this->app);
$hrefs = explode(":", trim($hrefs));
$hrefs = explode("|:|", trim($hrefs));
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$as\"");
@ -206,7 +206,7 @@ class Api {
list($hrefs) = use_request_params(array("hrefs"));
$hrefs = explode(":", trim($hrefs));
$hrefs = explode("|:|", trim($hrefs));
$errors = array();
foreach ($hrefs as $href) {