mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +03:00
This commit is contained in:
parent
514fe02619
commit
a21147e234
2 changed files with 13 additions and 7 deletions
|
|
@ -48,13 +48,15 @@ if (isset($options['plugins'])) {
|
||||||
@unlink($tgz_destination);
|
@unlink($tgz_destination);
|
||||||
@unlink("{$tar_destination}.gz");
|
@unlink("{$tar_destination}.gz");
|
||||||
$tar = new PharData($tar_destination);
|
$tar = new PharData($tar_destination);
|
||||||
$tar->buildFromDirectory('./plugins/', "@{$name}@");
|
$tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}", '/') . '/');
|
||||||
$tar->compress(Phar::GZ);
|
$tar->compress(Phar::GZ);
|
||||||
unlink($tar_destination);
|
unlink($tar_destination);
|
||||||
rename("{$tar_destination}.gz", $tgz_destination);
|
rename("{$tar_destination}.gz", $tgz_destination);
|
||||||
} else {
|
} else {
|
||||||
echo "- {$name} {$version}\n";
|
echo "- {$name} {$version}\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo "- {$name}\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,12 +136,16 @@ class Manager
|
||||||
{
|
{
|
||||||
foreach ($aGlob as $sPathName)
|
foreach ($aGlob as $sPathName)
|
||||||
{
|
{
|
||||||
$sName = \basename($sPathName);
|
try {
|
||||||
$sClassName = $this->loadPluginByName($sName);
|
$sName = \basename($sPathName);
|
||||||
$aList[] = array(
|
$sClassName = $this->loadPluginByName($sName);
|
||||||
$sName,
|
$aList[] = array(
|
||||||
$sClassName::VERSION
|
$sName,
|
||||||
);
|
$sClassName::VERSION
|
||||||
|
);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
\error_log($e->getMessage() . "\n\t{$sPathName}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue