This commit is contained in:
Jean-Christian Paul Denis 2022-11-26 22:22:42 +01:00
parent d07ccf9329
commit 4cf21eba91
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
5 changed files with 22 additions and 25 deletions

View File

@ -25,6 +25,6 @@ $this->registerModule(
'type' => 'plugin',
'support' => 'https://github.com/JcDenis/pacKman',
'details' => 'https://plugins.dotaddict.org/dc2/details/pacKman',
'repository' => 'https://raw.githubusercontent.com/JcDenis/pacKman/master/dcstore.xml'
'repository' => 'https://raw.githubusercontent.com/JcDenis/pacKman/master/dcstore.xml',
]
);

View File

@ -23,50 +23,49 @@ $mod_conf = [
'packman_menu_plugins',
'Add link to pacKman in plugins page',
false,
'boolean'
'boolean',
],
[
'packman_pack_nocomment',
'Remove comments from files',
false,
'boolean'
'boolean',
],
[
'packman_pack_overwrite',
'Overwrite existing package',
false,
'boolean'
'boolean',
],
[
'packman_pack_filename',
'Name of package',
'%type%-%id%',
'string'
'string',
],
[
'packman_secondpack_filename',
'Name of second package',
'%type%-%id%-%version%',
'string'
'string',
],
[
'packman_pack_repository',
'Path to package repository',
'',
'string'
'string',
],
[
'packman_pack_excludefiles',
'Extra files to exclude from package',
'*.zip,*.tar,*.tar.gz,.directory,.hg',
'string'
]
'string',
],
];
# -- Nothing to change below --
try {
# Check module version
if (version_compare(
dcCore::app()->getVersion($mod_id),

View File

@ -26,7 +26,7 @@ class dcPackman
'.git*',
'CVS',
'.DS_Store',
'Thumbs.db'
'Thumbs.db',
];
public static function quote_exclude(array $exclude): array
@ -96,7 +96,7 @@ class dcPackman
if (is_array($res[$i])) {
$res[$i] = array_merge($res[$i], [
'id' => $zip_root_dir,
'root' => $root . '/' . $zip_file
'root' => $root . '/' . $zip_file,
]);
unlink($cache . '_define.php');
@ -193,14 +193,14 @@ class dcPackman
'%id%',
'%version%',
'%author%',
'%time%'
'%time%',
],
[
$info['type'],
$info['id'],
$info['version'],
$info['author'],
time()
time(),
],
$file
);

View File

@ -74,7 +74,6 @@ try {
if (preg_match('/' . preg_quote($_REQUEST['package']) . '$/', $f['root'])
&& is_file($f['root']) && is_readable($f['root'])
) {
# --BEHAVIOR-- packmanBeforeDownloadPackage
dcCore::app()->callBehavior('packmanBeforeDownloadPackage', $f, $type);
@ -111,7 +110,7 @@ try {
$root = $s->packman_pack_repository;
$files = [
$s->packman_pack_filename,
$s->packman_secondpack_filename
$s->packman_secondpack_filename,
];
$nocomment = $s->packman_pack_nocomment;
$fixnewline = $s->packman_pack_fixnewline;
@ -160,7 +159,6 @@ try {
# Install
} elseif ($action == 'install') {
foreach ($_POST['modules'] as $root => $id) {
# --BEHAVIOR-- packmanBeforeInstallPackage
dcCore::app()->callBehavior('packmanBeforeInstallPackage', $type, $id, $root);
@ -256,7 +254,7 @@ echo
dcPage::breadcrumb([
__('Plugins') => '',
__('pacKman') => ''
__('pacKman') => '',
]) .
dcPage::notices();