- Timestamp:
- Mar 10, 2008, 7:01:17 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_plugins.inc.php
r2263 r2272 47 47 return $url; 48 48 } 49 50 /** 51 * Set tabsheet for plugins pages. 52 * @param string selected page. 53 */ 54 function set_plugins_tabsheet($selected) 55 { 56 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 57 58 $link = get_root_url().'admin.php?page='; 59 60 $tabsheet = new tabsheet(); 61 $tabsheet->add('plugins_list', l10n('plugins_tab_list'), $link.'plugins_list'); 62 $tabsheet->add('plugins_update', l10n('plugins_tab_update'), $link.'plugins_update'); 63 $tabsheet->add('plugins_new', l10n('plugins_tab_new'), $link.'plugins_new'); 64 $tabsheet->select($selected); 65 $tabsheet->assign(); 66 } 49 67 ?> -
trunk/admin/include/plugins.class.php
r2264 r2272 29 29 var $fs_plugins = array(); 30 30 var $db_plugins_by_id = array(); 31 var $server_plugins = array();31 var $server_plugins; 32 32 33 33 /** … … 50 50 * @param array - errors 51 51 */ 52 function perform_action($action, $plugin_id , $errors=array())52 function perform_action($action, $plugin_id) 53 53 { 54 54 if (isset($this->db_plugins_by_id[$plugin_id])) … … 57 57 } 58 58 $file_to_include = PHPWG_PLUGINS_PATH . $plugin_id . '/maintain.inc.php'; 59 60 $errors = array(); 59 61 60 62 switch ($action) … … 280 282 $this->server_plugins = @unserialize($source); 281 283 } 282 else283 {284 $this->server_plugins = false;285 }286 284 } 287 285 … … 295 293 case 'date': 296 294 krsort($this->server_plugins); 295 break; 296 case 'revision': 297 usort($this->server_plugins, array($this, 'extension_revision_compare')); 297 298 break; 298 299 case 'name': … … 428 429 function plugin_version_compare($a, $b) 429 430 { 430 $r = version_compare($a['version'], $b['version']); 431 if ($r == 0) return strcasecmp($a['version'], $b['version']); 432 else return $r; 431 $pattern = array('/([a-z])/ei', '/\.+/', '/\.\Z|\A\./'); 432 $replacement = array( "'.'.intval('\\1', 36).'.'", '.', ''); 433 434 $array = preg_replace($pattern, $replacement, array($a['version'], $b['version'])); 435 436 return version_compare($array[0], $array[1], '>='); 437 } 438 439 function extension_revision_compare($a, $b) 440 { 441 if ($a['date'] < $b['date']) return 1; 442 else return -1; 433 443 } 434 444 -
trunk/admin/plugins_list.php
r2264 r2272 42 42 { 43 43 $page['errors'] = 44 $plugins->perform_action($_GET['action'], $_GET['plugin'] , $page['errors']);44 $plugins->perform_action($_GET['action'], $_GET['plugin']); 45 45 46 46 if (empty($page['errors'])) redirect($base_url); … … 48 48 49 49 //--------------------------------------------------------------------Tabsheet 50 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 51 $link = get_root_url().'admin.php?page='; 52 $tabsheet = new tabsheet(); 53 $tabsheet->add('plugins_list', l10n('plugins_tab_list'), $link.'plugins_list'); 54 $tabsheet->add('plugins_update', l10n('plugins_tab_update'), $link.'plugins_update'); 55 $tabsheet->add('plugins_new', l10n('plugins_tab_new'), $link.'plugins_new'); 56 $tabsheet->select($page['page']); 57 $tabsheet->assign(); 50 set_plugins_tabsheet($page['page']); 58 51 59 52 //---------------------------------------------------------------Order options 60 $link .=$page['page'].'&order=';53 $link = get_root_url().'admin.php?page='.$page['page'].'&order='; 61 54 $template->assign('order_options', 62 55 array( -
trunk/admin/plugins_new.php
r2264 r2272 78 78 79 79 //--------------------------------------------------------------------Tabsheet 80 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 81 $link = get_root_url().'admin.php?page='; 82 $tabsheet = new tabsheet(); 83 $tabsheet->add('plugins_list', l10n('plugins_tab_list'), $link.'plugins_list'); 84 $tabsheet->add('plugins_update', l10n('plugins_tab_update'), $link.'plugins_update'); 85 $tabsheet->add('plugins_new', l10n('plugins_tab_new'), $link.'plugins_new'); 86 $tabsheet->select($page['page']); 87 $tabsheet->assign(); 80 set_plugins_tabsheet($page['page']); 88 81 89 82 //---------------------------------------------------------------Order options 90 $link .=$page['page'].'&order=';83 $link = get_root_url().'admin.php?page='.$page['page'].'&order='; 91 84 $template->assign('order_options', 92 85 array( 93 86 $link.'date' => l10n('Post date'), 87 $link.'revision' => l10n('plugins_revisions'), 94 88 $link.'name' => l10n('Name'), 95 89 $link.'author' => l10n('Author'))); … … 100 94 // +-----------------------------------------------------------------------+ 101 95 $plugins->get_server_plugins(true); 102 $plugins->sort_server_plugins($order);103 96 104 if ( $plugins->server_plugins !== false)97 if (is_array($plugins->server_plugins)) 105 98 { 99 $plugins->sort_server_plugins($order); 100 106 101 foreach($plugins->server_plugins as $plugin) 107 102 { … … 131 126 'VERSION' => $plugin['version'], 132 127 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin['id_revision'], 128 'DATE' => date('Y-m-d', $plugin['date']), 133 129 'VER_DESC' => $ver_desc, 134 130 'AUTHOR' => $plugin['author'], -
trunk/admin/plugins_update.php
r2264 r2272 95 95 96 96 //--------------------------------------------------------------------Tabsheet 97 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 98 $link = get_root_url().'admin.php?page='; 99 $tabsheet = new tabsheet(); 100 $tabsheet->add('plugins_list', l10n('plugins_tab_list'), $link.'plugins_list'); 101 $tabsheet->add('plugins_update', l10n('plugins_tab_update'), $link.'plugins_update'); 102 $tabsheet->add('plugins_new', l10n('plugins_tab_new'), $link.'plugins_new'); 103 $tabsheet->select($page['page']); 104 $tabsheet->assign(); 97 set_plugins_tabsheet($page['page']); 105 98 106 99 // +-----------------------------------------------------------------------+ … … 109 102 $plugins->get_server_plugins(); 110 103 111 if ( $plugins->server_plugins !== false)104 if (is_array($plugins->server_plugins)) 112 105 { 113 106 foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) … … 127 120 utf8_encode($plugin_info['description']))))); 128 121 129 if ($plugins->plugin_version_compare($fs_plugin, $plugin_info) >= 0)122 if ($plugins->plugin_version_compare($fs_plugin, $plugin_info)) 130 123 { 131 124 // Plugin is up to date -
trunk/language/en_UK/admin.lang.php
r2268 r2272 231 231 $lang['config'] = 'Configuration'; 232 232 $lang['confirm'] = 'confirm'; 233 $lang[' date'] = 'date';233 $lang['Date'] = 'Date'; 234 234 $lang['delete category'] = 'delete category'; 235 235 $lang['description'] = 'description'; … … 627 627 $lang['plugins_tab_update'] = 'Check for updates'; 628 628 $lang['plugins_tab_new'] = 'Other plugins'; 629 $lang['plugins_revisions'] = 'Last revisions'; 629 630 $lang['plugins_delete'] = 'Delete'; 630 631 $lang['plugins_confirm_delete'] = 'Are you sure you want to delete this plugin?'; -
trunk/language/es_ES/admin.lang.php
r2268 r2272 230 230 $lang['config'] = 'Configuración'; 231 231 $lang['confirm'] = 'Confirmar'; 232 $lang[' date'] = 'Fecha';232 $lang['Date'] = 'Fecha'; 233 233 $lang['delete category'] = 'Suprimir la categoría'; 234 234 $lang['description'] = 'Descripción'; … … 619 619 $lang['c13y_anomalies_ignored_count'] = '%d anomalías han sido ignoradas.'; 620 620 621 /* TODO */ $lang['plugins_need_update'] = 'Plugins which need upgrade'; 622 /* TODO */ $lang['plugins_dontneed_update'] = 'Plugins up to date'; 623 /* TODO */ $lang['plugins_cant_check'] = 'Plugin versions can\'t be checked'; 624 /* TODO */ $lang['plugins_actual_version'] = 'Current<br>version'; 625 /* TODO */ $lang['plugins_new_version'] = 'Available<br>version'; 626 /* TODO */ $lang['plugins_auto_update'] = 'Automatic upgrade'; 627 /* TODO */ $lang['plugins_auto_install'] = 'Automatic installation'; 628 /* TODO */ $lang['plugins_download'] = 'Download file'; 629 /* TODO */ $lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s'; 630 /* TODO */ $lang['plugins_tab_list'] = 'Plugin list'; 631 /* TODO */ $lang['plugins_tab_update'] = 'Check for updates'; 632 /* TODO */ $lang['plugins_tab_new'] = 'Other plugins'; 633 /* TODO */ $lang['plugins_revisions'] = 'Last revisions'; 634 /* TODO */ $lang['plugins_delete'] = 'Delete'; 635 /* TODO */ $lang['plugins_confirm_delete'] = 'Are you sure you want to delete this plugin?'; 636 /* TODO */ $lang['plugins_confirm_install'] = 'Are you sure you want to install this plugin?'; 637 /* TODO */ $lang['plugins_confirm_upgrade'] = 'Are you sur to install this upgrade? You must verify if this version does not need uninstallation.'; 638 /* TODO */ $lang['plugins_upgrade_ok'] = '%s has been successfully upgraded.'; 639 /* TODO */ $lang['plugins_install_ok'] = 'Plugin has been successfully copied'; 640 /* TODO */ $lang['plugins_install_need_activate'] = 'You might go to plugin list to install and activate it.'; 641 /* TODO */ $lang['plugins_temp_path_error'] = 'Can\'t create temporary file.'; 642 /* TODO */ $lang['plugins_dl_archive_error'] = 'Can\'t download archive.'; 643 /* TODO */ $lang['plugins_archive_error'] = 'Can\'t read or extract archive.'; 644 /* TODO */ $lang['plugins_extract_error'] = 'An error occured during extraction (%s).'; 645 /* TODO */ $lang['plugins_check_chmod'] = 'Please check "plugins" folder and sub-folders permissions (CHMOD).'; 646 /* TODO */ $lang['plugins_server_error'] = 'Can\'t connect to server.'; 647 621 648 /* TODO */ $lang['Purge compiled templates'] = 'Purge compiled templates'; 622 649 ?> -
trunk/language/fr_FR/admin.lang.php
r2268 r2272 231 231 $lang['config'] = 'Configuration'; 232 232 $lang['confirm'] = 'confirmer'; 233 $lang[' date'] = 'date';233 $lang['Date'] = 'Date'; 234 234 $lang['delete category'] = 'supprimer la catégorie'; 235 235 $lang['description'] = 'description'; … … 627 627 $lang['plugins_tab_update'] = 'Vérifier les mises à jour'; 628 628 $lang['plugins_tab_new'] = 'Autres plugins disponibles'; 629 $lang['plugins_revisions'] = 'Dernières révisions'; 629 630 $lang['plugins_delete'] = 'Supprimer'; 630 631 $lang['plugins_confirm_install'] = 'Etes-vous sûr de vouloir installer ce plugin?'; -
trunk/language/nl_NL/admin.lang.php
r2268 r2272 231 231 $lang['config'] = 'Configuratie'; 232 232 $lang['confirm'] = 'bevestig'; 233 $lang[' date'] = 'datum';233 $lang['Date'] = 'Datum'; 234 234 $lang['delete category'] = 'verwijder categorie'; 235 235 $lang['description'] = 'omschrijving'; … … 621 621 /* TODO */ $lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.'; 622 622 623 /* TODO */ $lang['plugins_need_update'] = 'Plugins which need upgrade'; 624 /* TODO */ $lang['plugins_dontneed_update'] = 'Plugins up to date'; 625 /* TODO */ $lang['plugins_cant_check'] = 'Plugin versions can\'t be checked'; 626 /* TODO */ $lang['plugins_actual_version'] = 'Current<br>version'; 627 /* TODO */ $lang['plugins_new_version'] = 'Available<br>version'; 628 /* TODO */ $lang['plugins_auto_update'] = 'Automatic upgrade'; 629 /* TODO */ $lang['plugins_auto_install'] = 'Automatic installation'; 630 /* TODO */ $lang['plugins_download'] = 'Download file'; 631 /* TODO */ $lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s'; 632 /* TODO */ $lang['plugins_tab_list'] = 'Plugin list'; 633 /* TODO */ $lang['plugins_tab_update'] = 'Check for updates'; 634 /* TODO */ $lang['plugins_tab_new'] = 'Other plugins'; 635 /* TODO */ $lang['plugins_revisions'] = 'Last revisions'; 636 /* TODO */ $lang['plugins_delete'] = 'Delete'; 637 /* TODO */ $lang['plugins_confirm_delete'] = 'Are you sure you want to delete this plugin?'; 638 /* TODO */ $lang['plugins_confirm_install'] = 'Are you sure you want to install this plugin?'; 639 /* TODO */ $lang['plugins_confirm_upgrade'] = 'Are you sur to install this upgrade? You must verify if this version does not need uninstallation.'; 640 /* TODO */ $lang['plugins_upgrade_ok'] = '%s has been successfully upgraded.'; 641 /* TODO */ $lang['plugins_install_ok'] = 'Plugin has been successfully copied'; 642 /* TODO */ $lang['plugins_install_need_activate'] = 'You might go to plugin list to install and activate it.'; 643 /* TODO */ $lang['plugins_temp_path_error'] = 'Can\'t create temporary file.'; 644 /* TODO */ $lang['plugins_dl_archive_error'] = 'Can\'t download archive.'; 645 /* TODO */ $lang['plugins_archive_error'] = 'Can\'t read or extract archive.'; 646 /* TODO */ $lang['plugins_extract_error'] = 'An error occured during extraction (%s).'; 647 /* TODO */ $lang['plugins_check_chmod'] = 'Please check "plugins" folder and sub-folders permissions (CHMOD).'; 648 /* TODO */ $lang['plugins_server_error'] = 'Can\'t connect to server.'; 649 623 650 /* TODO */ $lang['Purge compiled templates'] = 'Purge compiled templates'; 624 651 ?> -
trunk/template/yoga/admin/history.tpl
r2245 r2272 117 117 <table class="table2" id="detailedStats"> 118 118 <tr class="throw"> 119 <th>{' date'|@translate}</th>119 <th>{'Date'|@translate}</th> 120 120 <th>{'time'|@translate}</th> 121 121 <th>{'user'|@translate}</th> -
trunk/template/yoga/admin/plugins_new.tpl
r2263 r2272 5 5 6 6 {'Sort order'|@translate} : 7 <select onchange="document.location = this.options[this.selectedIndex].value;" style="width:1 20px">7 <select onchange="document.location = this.options[this.selectedIndex].value;" style="width:150px"> 8 8 {html_options options=$order_options selected=$order_selected} 9 9 </select> … … 16 16 <td>{'Name'|@translate}</td> 17 17 <td>{'Version'|@translate}</td> 18 <td>{'Date'|@translate}</td> 18 19 <td>{'Author'|@translate}</td> 19 20 <td>{'Actions'|@translate}</td> … … 26 27 <td style="text-align:center;"><a href="{$plugin.VERSION_URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.VERSION} 27 28 <span>{$plugin.VER_DESC}</span></a></td> 29 <td>{$plugin.DATE}</td> 28 30 <td>{$plugin.AUTHOR}</td> 29 31 <td style="text-align:center;"><a href="{$plugin.URL_INSTALL}" onclick="return confirm('{'plugins_confirm_install'|@translate|@escape:javascript}');">{'plugins_auto_install'|@translate}</a> -
trunk/template/yoga/admin/plugins_update.tpl
r2263 r2272 64 64 {foreach from=$plugins_cant_check item=plugin name=plugins_loop} 65 65 <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}"> 66 <td> {$plugin.NAME} </td>66 <td>{$plugin.NAME}</td> 67 67 <td style="text-align:center;">{$plugin.VERSION}</td> 68 68 </tr> -
trunk/template/yoga/admin/upload.tpl
r2260 r2272 11 11 <tr class="throw"> 12 12 <th style="width:20%;">{'category'|@translate}</th> 13 <th style="width:20%;">{' date'|@translate}</th>13 <th style="width:20%;">{'Date'|@translate}</th> 14 14 <th style="width:20%;">{'file'|@translate}</th> 15 15 <th style="width:20%;">{'thumbnail'|@translate}</th>
Note: See TracChangeset
for help on using the changeset viewer.