Skip to content

Commit

Permalink
Add check for zip archive on the plugin engine
Browse files Browse the repository at this point in the history
  • Loading branch information
gillesdubois committed Jun 10, 2016
1 parent a011a6a commit a1c2d65
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/language/english/english.txt
Expand Up @@ -1436,6 +1436,7 @@
6004 Total available
6005 Power on/off
6006 WARNING : Please install php-soap, the plugin engine can't work without it
6007 Please install ZipArchive for php if you want to user this feature
7000 Plugins
7001 Plugins manager
7002 Plugin's name
Expand Down
1 change: 1 addition & 0 deletions plugins/language/french/french.txt
Expand Up @@ -1436,6 +1436,7 @@
6004 Nombre Total disponible
6005 Eteinte/allumée
6006 AVERTISSEMENT : Le module php-soap n'est pas installé, le moteur de plugin ne fonctionnera pas.
6007 Veulliez installer ZipArchive pour utiliser cette fonctionnalitée
7000 Plugins
7001 Gestionnaire de plugins
7002 Nom du plugin
Expand Down
15 changes: 15 additions & 0 deletions plugins/main_sections/ms_plugins/functions_check.php 100755 → 100644
Expand Up @@ -192,3 +192,18 @@ function mv_server_side($name){

}

/**
* This function check for required php dependencies
* Die if not compliant
*/
function checkDependencies(){

global $l;

if(!class_exists('ZipArchive')){
msg_error($l->g(6007));
die;
}

}

2 changes: 2 additions & 0 deletions plugins/main_sections/ms_plugins/ms_pluginsmanager.php 100755 → 100644
Expand Up @@ -53,6 +53,8 @@

}

checkDependencies();

// Plugins Install menu.

printEnTete($l->g(7008));
Expand Down

2 comments on commit a1c2d65

@ronator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so sorry, but there is a minor typo in the english translation, it should be
+6007 "Please install ZipArchive for php if you want to use this feature"

@ronator
Copy link

@ronator ronator commented on a1c2d65 Jun 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the french one misses the link "for php" ... just saying, it might reduce any questions (I do not have zip/unzip installed on the ocs server only php zip-libs and it works, so "zip for php" is an important info)...

Please sign in to comment.