aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/plugins.class.php9
-rw-r--r--admin/plugins_new.php11
-rw-r--r--language/en_UK/admin.lang.php2
-rw-r--r--language/fr_FR/admin.lang.php2
4 files changed, 15 insertions, 9 deletions
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 0ddc85b50..b410ff647 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -509,7 +509,7 @@ DELETE FROM '. PLUGINS_TABLE .'
* @param string - archive URL
* @param string - plugin id or extension id
*/
- function extract_plugin_files($action, $revision, $dest)
+ function extract_plugin_files($action, $revision, $dest, &$plugin_id=null)
{
if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip'))
{
@@ -541,13 +541,14 @@ DELETE FROM '. PLUGINS_TABLE .'
$root = dirname($main_filepath); // main.inc.php path in archive
if ($action == 'upgrade')
{
- $extract_path = PHPWG_PLUGINS_PATH . $dest;
+ $plugin_id = $dest;
}
else
{
- $extract_path = PHPWG_PLUGINS_PATH
- . ($root == '.' ? 'extension_' . $dest : basename($root));
+ $plugin_id = ($root == '.' ? 'extension_' . $dest : basename($root));
}
+ $extract_path = PHPWG_PLUGINS_PATH . $plugin_id;
+
if($result = $zip->extract(PCLZIP_OPT_PATH, $extract_path,
PCLZIP_OPT_REMOVE_PATH, $root,
PCLZIP_OPT_REPLACE_NEWER))
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index 379077410..a8df9359c 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -45,9 +45,9 @@ if (isset($_GET['revision']) and isset($_GET['extension']))
{
check_pwg_token();
- $install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
+ $install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension'], $plugin_id);
- redirect($base_url.'&installstatus='.$install_status);
+ redirect($base_url.'&installstatus='.$install_status.'&plugin_id='.$plugin_id);
}
}
@@ -57,8 +57,13 @@ if (isset($_GET['installstatus']))
switch ($_GET['installstatus'])
{
case 'ok':
+ $activate_url = get_root_url().'admin.php?page=plugins'
+ . '&plugin=' . $_GET['plugin_id']
+ . '&pwg_token=' . get_pwg_token()
+ . '&action=activate';
+
$page['infos'][] = l10n('Plugin has been successfully copied');
- $page['infos'][] = l10n('You might go to plugin list to install and activate it.');
+ $page['infos'][] = '<a href="'. $activate_url . '">' . l10n('Activate it now') . '</a>';
break;
case 'temp_path_error':
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 1cbc91929..4abe5641d 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -119,6 +119,7 @@ $lang['Activate icon "new" next to albums and pictures'] = 'Activate icon "new"
$lang['Activate Navigation Bar'] = 'Activate navigation bar';
$lang['Activate Navigation Thumbnails'] = 'Activate navigation thumbnails';
$lang['Activate'] = "Activate";
+$lang['Activate it now'] = 'Activate it now';
$lang['Active Languages'] = 'Active Languages';
$lang['Active Plugins'] = 'Active Plugins';
$lang['Active Themes'] = 'Active Themes';
@@ -944,7 +945,6 @@ $lang['You have %d orphan tags: %s.'] = 'You have %d orphan tags: %s.';
$lang['You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'] = 'You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !';
$lang['You have subscribed to receiving notifications by mail.'] = "You have subscribed to receive notifications by mail.";
$lang['You have unsubscribed from receiving notifications by mail.'] = "You have unsubscribed from being notified by mail.";
-$lang['You might go to plugin list to install and activate it.'] = "Go to the plugins list to install and activate it.";
$lang['You need to confirm deletion'] = "You must confirm deletion";
$lang['You need to upgrade your system to take full advantage of the application else the application will not work correctly, or not at all'] = "You should upgrade your system to take full advantage of the application, otherwise the application could work improperly, or not at all";
$lang['Your configuration settings are saved'] = 'Your configuration settings are saved';
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 3a49ebca5..9aab4de48 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -480,7 +480,6 @@ $lang['Are you sure you want to delete this plugin?'] = "Etes-vous sûr de voulo
$lang['Are you sure you want to install this plugin?'] = "Etes-vous sûr de vouloir installer ce plugin?";
$lang['Are you sure to install this upgrade? You must verify if this version does not need uninstallation.'] = "Etes-vous sur de vouloir installer cette mise à jour? Vous devez vérifiez que cette mise à jour ne nécessite pas de désinstallation préalable.";
$lang['Plugin has been successfully copied'] = "Le plugin a été copié avec succès.";
-$lang['You might go to plugin list to install and activate it.'] = "Rendez-vous dans la liste des plugins pour l'installer et l'activer.";
$lang['Can\'t create temporary file.'] = "Impossible de créer un fichier temporaire.";
$lang['Can\'t download archive.'] = "Impossible de télécharger l'archive.";
$lang['Can\'t read or extract archive.'] = "Impossible de lire ou d'extraire l'archive.";
@@ -976,4 +975,5 @@ $lang['Users modified'] = 'Utilisateurs modifiés';
$lang['Open user details'] = 'Ouvrir les détails de l\'utilisateur';
$lang['Close user details'] = 'Fermer les détails de l\'utilisateur';
$lang['close'] = 'fermer';
+$lang['Activate it now'] = 'Activate it now';
?> \ No newline at end of file