aboutsummaryrefslogtreecommitdiffstats
path: root/admin/plugins_new.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-03-10 11:36:14 +0000
committerpatdenice <patdenice@piwigo.org>2011-03-10 11:36:14 +0000
commitcefb33dffe06b35760b3e8b22345df742e2de255 (patch)
treebbe70d4972ce3f735f3db89f3c481affa1424545 /admin/plugins_new.php
parent59b87ac06b92aafaee841ec8fdabb3cef8afb956 (diff)
feature:2219
Sort available plugins without reloading the whole page git-svn-id: http://piwigo.org/svn/trunk@9598 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/plugins_new.php')
-rw-r--r--admin/plugins_new.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index d1ecfcf64..710ce8eec 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -30,8 +30,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
$template->set_filenames(array('plugins' => 'plugins_new.tpl'));
-$order = isset($_GET['order']) ? $_GET['order'] : 'date';
-$base_url = get_root_url().'admin.php?page='.$page['page'].'&order='.$order;
+$base_url = get_root_url().'admin.php?page='.$page['page'];
$plugins = new plugins();
@@ -86,22 +85,20 @@ if (isset($_GET['installstatus']))
$plugins->set_tabsheet($page['page']);
//---------------------------------------------------------------Order options
-$link = get_root_url().'admin.php?page='.$page['page'].'&amp;order=';
$template->assign('order_options',
array(
- $link.'date' => l10n('Post date'),
- $link.'revision' => l10n('Last revisions'),
- $link.'name' => l10n('Name'),
- $link.'author' => l10n('Author'),
- $link.'downloads' => l10n('Number of downloads')));
-$template->assign('order_selected', $link.$order);
+ 'date' => l10n('Post date'),
+ 'revision' => l10n('Last revisions'),
+ 'name' => l10n('Name'),
+ 'author' => l10n('Author'),
+ 'downloads' => l10n('Number of downloads')));
// +-----------------------------------------------------------------------+
// | start template output |
// +-----------------------------------------------------------------------+
if ($plugins->get_server_plugins(true))
{
- $plugins->sort_server_plugins($order);
+ $plugins->sort_server_plugins('date');
foreach($plugins->server_plugins as $plugin)
{
@@ -121,6 +118,7 @@ if ($plugins->get_server_plugins(true))
'SMALL_DESC' => trim($small_desc, " \r\n"),
'BIG_DESC' => $ext_desc,
'VERSION' => $plugin['revision_name'],
+ 'REVISION_DATE' => preg_replace('/[^0-9]/', '', $plugin['revision_date']),
'AUTHOR' => $plugin['author_name'],
'DOWNLOADS' => $plugin['extension_nb_downloads'],
'URL_INSTALL' => $url_auto_install,