aboutsummaryrefslogtreecommitdiffstats
path: root/admin/plugins_new.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-10-03 23:16:49 +0000
committerpatdenice <patdenice@piwigo.org>2008-10-03 23:16:49 +0000
commite53eee8f166e130ba428a97b0987c5df41959b67 (patch)
tree7c2390931c99e224c66834c83da6721045743f42 /admin/plugins_new.php
parent0287283e382bcc89d8806fa32576532d5cfbc3df (diff)
- Plugins manager now use PEM API.
- WARNING! Need to change PEM_URL constant and utf8 encoding when PEM will be updated. - Bug in roma/themeconf.inc.php: accordion menu wasn't selected in plugins_new et plugins_update tabs. git-svn-id: http://piwigo.org/svn/trunk@2647 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/plugins_new.php')
-rw-r--r--admin/plugins_new.php57
1 files changed, 25 insertions, 32 deletions
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index 19d2be9a4..e86dc0a16 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -36,10 +36,9 @@ $base_url = get_root_url().'admin.php?page='.$page['page'].'&order='.$order;
$plugins = new plugins();
//------------------------------------------------------automatic installation
-if (isset($_GET['install']) and isset($_GET['extension']) and !is_adviser())
+if (isset($_GET['revision']) and isset($_GET['extension']) and !is_adviser())
{
- $install_status =
- $plugins->extract_plugin_files('install', $_GET['install'], $_GET['extension']);
+ $install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
redirect($base_url.'&installstatus='.$install_status);
}
@@ -90,44 +89,38 @@ $template->assign('order_selected', $link.$order);
// +-----------------------------------------------------------------------+
// | start template output |
// +-----------------------------------------------------------------------+
-$plugins->get_server_plugins(true);
-
-if (is_array($plugins->server_plugins))
+if ($plugins->get_server_plugins(true))
{
$plugins->sort_server_plugins($order);
foreach($plugins->server_plugins as $plugin)
{
- $ext_desc = nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin['ext_description']))));
+ /* Need to remove this lines for final release : piwigo website will be utf8 only */
+ $plugin['extension_description'] = utf8_encode($plugin['extension_description']);
+ $plugin['revision_description'] = utf8_encode($plugin['revision_description']);
+
+ list($date, ) = explode(' ', $plugin['revision_date']);
$ver_desc = sprintf(l10n('plugins_description'),
- $plugin['version'],
- date('Y-m-d', $plugin['date']),
- nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin['description'])))));
+ $plugin['revision_name'],
+ $date,
+ $plugin['revision_description']);
$url_auto_install = htmlentities($base_url)
- . '&amp;extension=' . $plugin['id_extension']
- . '&amp;install=%2Fupload%2Fextension-' . $plugin['id_extension']
- . '%2Frevision-' . $plugin['id_revision'] . '%2F'
- . str_replace(' ', '%20',$plugin['url']);
-
- $url_download = PEM_URL .'/upload/extension-'.$plugin['id_extension']
- . '/revision-' . $plugin['id_revision']
- . '/' . str_replace(' ', '%20',$plugin['url']);
-
- $template->append('plugins',
- array('EXT_NAME' => $plugin['ext_name'],
- 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin['id_extension'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $plugin['version'],
- 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin['id_revision'],
- 'DATE' => date('Y-m-d', $plugin['date']),
- 'VER_DESC' => $ver_desc,
- 'AUTHOR' => $plugin['author'],
- 'URL_INSTALL' => $url_auto_install,
- 'URL_DOWNLOAD' => $url_download));
+ . '&amp;revision=' . $plugin['revision_id']
+ . '&amp;extension=' . $plugin['extension_id'];
+
+ $template->append('plugins', array(
+ 'EXT_NAME' => $plugin['extension_name'],
+ 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin['extension_id'],
+ 'EXT_DESC' => $plugin['extension_description'],
+ 'VERSION' => $plugin['revision_name'],
+ 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin['revision_id'],
+ 'DATE' => $date,
+ 'VER_DESC' => $ver_desc,
+ 'AUTHOR' => $plugin['author_name'],
+ 'URL_INSTALL' => $url_auto_install,
+ 'URL_DOWNLOAD' => $plugin['download_url'] . '&amp;origin=piwigo_download'));
}
}
else