mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 11:49:56 +03:00
Corections to respect coding conventions.
Change plugins versions to 1.8 Change 3 plugins URI. git-svn-id: http://piwigo.org/svn/trunk@2243 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
78e175b3fb
commit
1283b5ecb1
19 changed files with 274 additions and 262 deletions
|
@ -182,18 +182,24 @@ function extract_plugin_files($action, $source, $dest)
|
|||
{
|
||||
// we search main.inc.php in archive
|
||||
if (basename($file['filename']) == 'main.inc.php'
|
||||
and (!isset($main_filepath) or strlen($file['filename']) < strlen($main_filepath)))
|
||||
and (!isset($main_filepath)
|
||||
or strlen($file['filename']) < strlen($main_filepath)))
|
||||
{
|
||||
$main_filepath = $file['filename'];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($main_filepath))
|
||||
{
|
||||
$root = dirname($main_filepath); // main.inc.php path in archive
|
||||
if ($action == 'upgrade') $extract_path = PHPWG_PLUGINS_PATH . $dest;
|
||||
else $extract_path = PHPWG_PLUGINS_PATH . ($root == '.' ? 'extension_' . $dest : basename($root));
|
||||
|
||||
if ($action == 'upgrade')
|
||||
{
|
||||
$extract_path = PHPWG_PLUGINS_PATH.$dest;
|
||||
}
|
||||
else
|
||||
{
|
||||
$extract_path = PHPWG_PLUGINS_PATH
|
||||
. ($root == '.' ? 'extension_' . $dest : basename($root));
|
||||
}
|
||||
if($result = $zip->extract(PCLZIP_OPT_PATH, $extract_path,
|
||||
PCLZIP_OPT_REMOVE_PATH, $root,
|
||||
PCLZIP_OPT_REPLACE_NEWER))
|
||||
|
@ -226,7 +232,7 @@ function extract_plugin_files($action, $source, $dest)
|
|||
* delete $path directory
|
||||
* @param string - path
|
||||
*/
|
||||
function pm_deltree($path)
|
||||
function deltree($path)
|
||||
{
|
||||
if (is_dir($path))
|
||||
{
|
||||
|
@ -236,8 +242,14 @@ function pm_deltree($path)
|
|||
if ($file != '.' and $file != '..')
|
||||
{
|
||||
$pathfile = $path . '/' . $file;
|
||||
if (is_dir($pathfile)) pm_deltree($pathfile);
|
||||
else @unlink($pathfile);
|
||||
if (is_dir($pathfile))
|
||||
{
|
||||
deltree($pathfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@unlink($pathfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($fh);
|
||||
|
@ -250,7 +262,7 @@ function pm_deltree($path)
|
|||
* send $path to trash directory
|
||||
* @param string - path
|
||||
*/
|
||||
function send_pm_trash($path)
|
||||
function send_to_trash($path)
|
||||
{
|
||||
$trash_path = PHPWG_PLUGINS_PATH . 'trash';
|
||||
if (!is_dir($trash_path))
|
||||
|
|
|
@ -153,9 +153,9 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
|
|||
break;
|
||||
|
||||
case 'delete':
|
||||
if (!pm_deltree(PHPWG_PLUGINS_PATH . $plugin_id))
|
||||
if (!deltree(PHPWG_PLUGINS_PATH . $plugin_id))
|
||||
{
|
||||
send_pm_trash(PHPWG_PLUGINS_PATH . $plugin_id);
|
||||
send_to_trash(PHPWG_PLUGINS_PATH . $plugin_id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: LocalFiles Editor
|
||||
Version: 1.0
|
||||
Description: Edit local files from administration panel
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Version: 1.8
|
||||
Description: Edit local files from administration panel / Editeur de fichiers locaux
|
||||
Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=144
|
||||
Author: PhpWebGallery team
|
||||
Author URI: http://www.phpwebgallery.net
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php /*
|
||||
Plugin Name: Add Index
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: Add file index.php file on all sub-directories of local galleries pictures. / Ajoute le fichier index.php sur les sous-répertoires de galeries d'images locales.
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php /*
|
||||
Plugin Name: Admin Advices
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: Give you an advice on the administration page.
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php /*
|
||||
Plugin Name: Multi view
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: Allows administrators to view gallery as guests and/or change the language and/or theme on the fly. Practical to debug changes ...
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: Check upgrades
|
||||
Version:
|
||||
Version: 1.8
|
||||
Description: Check integrity of upgrades / Contrôle d'intégrité des mises à jour
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php /*
|
||||
Plugin Name: Event tracer
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: For developers. Shows all calls to trigger_event.
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: Extended Description
|
||||
Version: 1.8.a
|
||||
Version: 1.8
|
||||
Description: Allow multilanguage description / Permet d'avoir des descriptions mutilingues
|
||||
Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=175
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php /*
|
||||
Plugin Name: Hello World
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: This example plugin changes the page banner for the administration page.
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Author: PhpWebGallery team
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php /*
|
||||
Plugin Name: Language Switch
|
||||
Version: 1.0
|
||||
Version: 1.8
|
||||
Description: Switch to another language from flags on your gallery home page.
|
||||
Plugin URI: http://www.phpwebgallery.net
|
||||
Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=123
|
||||
Author: PhpWebGallery team
|
||||
Author URI: http://www.phpwebgallery.net
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue