Skip to content

Commit

Permalink
Merge pull request #1 from kleeja-official/hanirouatbi1-patch-1
Browse files Browse the repository at this point in the history
Delete file after closing ZipArchive
  • Loading branch information
RouatbiH committed Jul 1, 2024
2 parents 6310957 + 7390cac commit 5361611
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions alternative_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@

if ($zip->open(PATH . 'cache/' . $plugin_name . '.zip') === true) {
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
rename(
PATH . KLEEJA_PLUGINS_FOLDER . '/' . trim($zip->getNameIndex(0), '/'),
Expand All @@ -576,6 +573,9 @@

$zip->close();

// we dont need the zip file anymore
kleeja_unlink(PATH . 'cache/' . $plugin_name . '.zip');

// download or update msg
$adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $plugin_name);

Expand Down
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
// Kleeja Plugin
// ALTERNATIVE_STORE
// Version: 1.0
// Version: 1.1
// Developer: Kleeja Team

// Prevent illegal run
Expand All @@ -19,7 +19,7 @@
// Who wrote this plugin?
'plugin_developer' => 'Kleeja Team',
// This plugin version
'plugin_version' => '1.0',
'plugin_version' => '1.1',
// Explain what is this plugin, why should I use it?
'plugin_description' => [
'en' => 'Alternative Store for kleeja',
Expand Down

0 comments on commit 5361611

Please sign in to comment.