mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-17 21:49:41 +01:00
Update j_plugins.php
Delete the file after closing the ZipArchive
This commit is contained in:
@@ -657,9 +657,6 @@ switch ($case):
|
|||||||
{
|
{
|
||||||
if ($zip->extractTo(PATH . KLEEJA_PLUGINS_FOLDER))
|
if ($zip->extractTo(PATH . KLEEJA_PLUGINS_FOLDER))
|
||||||
{
|
{
|
||||||
// we dont need the zip file anymore
|
|
||||||
kleeja_unlink(PATH . 'cache/' . $plugin_name . '.zip');
|
|
||||||
|
|
||||||
// uploaded plugin's archive has different name, so we change it
|
// uploaded plugin's archive has different name, so we change it
|
||||||
rename(
|
rename(
|
||||||
PATH . KLEEJA_PLUGINS_FOLDER . '/' . trim($zip->getNameIndex(0), '/'),
|
PATH . KLEEJA_PLUGINS_FOLDER . '/' . trim($zip->getNameIndex(0), '/'),
|
||||||
@@ -668,6 +665,9 @@ switch ($case):
|
|||||||
|
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
|
||||||
|
// we dont need the zip file anymore
|
||||||
|
kleeja_unlink(PATH . 'cache/' . $plugin_name . '.zip');
|
||||||
|
|
||||||
// download or update msg
|
// download or update msg
|
||||||
$adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $plugin_name);
|
$adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $plugin_name);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user