From 09389d89ccaf48fd168662d01837ad4ec9b2950c Mon Sep 17 00:00:00 2001 From: rkemmere Date: Wed, 11 Mar 2020 12:25:46 +0100 Subject: [PATCH] Changes 1.2.10 --- CHANGELOG.md | 18 +++++++++ package.yml | 2 +- .../client/lib/rex_api_project_manager.php | 8 +++- plugins/client/package.yml | 2 +- plugins/hosting/package.yml | 4 +- plugins/hosting/pages/content.hosting.php | 14 +++---- .../project_manager.hosting.overview.php | 9 +++-- plugins/pagespeed/package.yml | 4 +- .../project_manager.pagespeed.overview.php | 6 ++- .../server/assets/js/tablesorter-custom.js | 38 ++++++++++++++++++- plugins/server/package.yml | 4 +- .../pages/project_manager.server.config.php | 2 + .../pages/project_manager.server.overview.php | 15 ++++---- .../pages/project_manager.server.projects.php | 20 +++++----- 14 files changed, 106 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c386f..b5f1d5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## Version 1.2.10 // 11.03.2020 + +# Plugin: Server 1.2.6 +* Versions-Auswahl um R5.9.0 und R5.10.0 erweitert +* Tablesorter in Listenansicht angepasst +* Lesbare Darstellung vom Datum in Listen- und Detailansicht + +# Plugin: Client 1.0.7 +* Syslog Abfrage für > R5.9 geändert + +# Plugin: Pagespeed 1.2.1 +* Lesbare Darstellung vom Datum in Listenansicht + +# Plugin: Hosting 1.0.4 +* Lesbare Darstellung vom Datum in Listenansicht +* Notices entfernt + + ## Version 1.2.9 // 27.11.2019 ## Plugin: Server 1.2.5 diff --git a/package.yml b/package.yml index 83c867c..478d50d 100644 --- a/package.yml +++ b/package.yml @@ -1,5 +1,5 @@ package: project_manager -version: '1.2.9' +version: '1.2.10' author: 'Friends Of REDAXO' supportpage: https://github.com/FriendsOfREDAXO/project_manager diff --git a/plugins/client/lib/rex_api_project_manager.php b/plugins/client/lib/rex_api_project_manager.php index 8a28705..5931e5c 100644 --- a/plugins/client/lib/rex_api_project_manager.php +++ b/plugins/client/lib/rex_api_project_manager.php @@ -88,7 +88,11 @@ public function execute() # SYSLOG - $log = new rex_log_file(rex_path::coreData('system.log')); + if (version_compare(rex::getVersion(), '5.9') >= 0) { + $log = new rex_log_file(rex_path::log('system.log')); + } else { + $log = new rex_log_file(rex_path::coreData('system.log')); + } $i = 0; foreach (new LimitIterator($log, 0, 30) as $entry) { @@ -139,4 +143,4 @@ public function execute() } } -?> +?> \ No newline at end of file diff --git a/plugins/client/package.yml b/plugins/client/package.yml index a55a057..47d53b9 100644 --- a/plugins/client/package.yml +++ b/plugins/client/package.yml @@ -1,5 +1,5 @@ package: project_manager/client -version: '1.0.6' +version: '1.0.7' author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther' supportpage: https://github.com/FriendsOfREDAXO/project_manager diff --git a/plugins/hosting/package.yml b/plugins/hosting/package.yml index 9bf43c2..e763a14 100644 --- a/plugins/hosting/package.yml +++ b/plugins/hosting/package.yml @@ -1,6 +1,6 @@ package: project_manager/hosting -version: '1.0.3' -author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther' +version: '1.0.4' +author: 'Friends Of REDAXO' supportpage: https://github.com/FriendsOfREDAXO/project_manager page: diff --git a/plugins/hosting/pages/content.hosting.php b/plugins/hosting/pages/content.hosting.php index bdc7ca6..1430c59 100644 --- a/plugins/hosting/pages/content.hosting.php +++ b/plugins/hosting/pages/content.hosting.php @@ -22,14 +22,14 @@ if (is_numeric($raw['validTo'])) { if ($raw['validTo'] < (time() + 2764800) ) { - $validTo = ''.date('Y-m-d H:i:s', $raw['validTo']).''; - $validFrom = date('Y-m-d H:i:s', $raw['validFrom']); + $validTo = ''.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').''; + $validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s'); } else if ($raw['validTo'] < time()) { - $validTo = ''.date('Y-m-d H:i:s', $raw['validTo']).''; - $validFrom = date('Y-m-d H:i:s', $raw['validFrom']); + $validTo = ''.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').''; + $validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s'); } else { - $validTo = date('Y-m-d H:i:s', $raw['validTo']); - $validFrom = date('Y-m-d H:i:s', $raw['validFrom']); + $validTo = rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s'); + $validFrom = rex_formatter::format($raw['validFrom'],'date','d.m.Y H:i:s'); } } else { $validFrom = "-"; @@ -37,7 +37,7 @@ } $output = ''; - $output .= ''; + $output .= ''; $output .= '
'.$this->i18n('organisation').''.$this->i18n('isp').''. $this->i18n('project_manager_hosting_ip').''.$this->i18n('validFrom').''.$this->i18n('validTo').'
'.$raw['org'].''.$raw['isp'].'
'.$raw['zip'].' '.$raw['city'].'
'.$raw['country'].'
'.$item['ip'].''.$validFrom.''.$validTo.'
'.(isset($raw['org']) ? $raw['org'] : '').''.(isset($raw['isp']) ? $raw['isp'] : '').'
'.(isset($raw['zip']) ? $raw['zip'] : '').' '.(isset($raw['city']) ? $raw['city'] : '').'
'.(isset($raw['country']) ? $raw['country'] : '').'
'.(isset($item['ip']) ? $item['ip']: '').''.$validFrom.''.$validTo.'
'; } diff --git a/plugins/hosting/pages/project_manager.hosting.overview.php b/plugins/hosting/pages/project_manager.hosting.overview.php index 623a3b1..be4997a 100644 --- a/plugins/hosting/pages/project_manager.hosting.overview.php +++ b/plugins/hosting/pages/project_manager.hosting.overview.php @@ -68,6 +68,9 @@ $list->setColumnParams('name', ['page' => 'project_manager/server/projects', 'func' => 'updateinfos', 'domain' => '###domain###']); $list->setColumnLabel('createdate_psi', $this->i18n('project_manager_hosting_updatedate')); + $list->setColumnFormat('createdate_psi', 'custom', function ($params) { + return (rex_formatter::format($params['list']->getValue('createdate_psi'),'date','d.m.Y H:i:s')); + }); // icon column (Domain hinzufügen bzw. bearbeiten) $thIcon = ''; @@ -142,11 +145,11 @@ if (is_numeric($raw['validTo'])) { if ($raw['validTo'] < (time() + 2764800) ) { - return ''.date('Y-m-d H:i:s', $raw['validTo']).''; + return ''.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').''; } else if ($raw['validTo'] < time()) { - return ''.date('Y-m-d H:i:s', $raw['validTo']).''; + return ''.rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s').''; } else { - return date('Y-m-d H:i:s', $raw['validTo']); + return rex_formatter::format($raw['validTo'],'date','d.m.Y H:i:s'); } } else { return "-"; diff --git a/plugins/pagespeed/package.yml b/plugins/pagespeed/package.yml index b994a13..176ff16 100644 --- a/plugins/pagespeed/package.yml +++ b/plugins/pagespeed/package.yml @@ -1,6 +1,6 @@ package: project_manager/pagespeed -version: '1.2.0' -author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther' +version: '1.2.1' +author: 'Friends Of REDAXO' supportpage: https://github.com/FriendsOfREDAXO/project_manager page: diff --git a/plugins/pagespeed/pages/project_manager.pagespeed.overview.php b/plugins/pagespeed/pages/project_manager.pagespeed.overview.php index b8691bf..5ccf363 100644 --- a/plugins/pagespeed/pages/project_manager.pagespeed.overview.php +++ b/plugins/pagespeed/pages/project_manager.pagespeed.overview.php @@ -75,6 +75,9 @@ $list->setColumnParams('name', ['page' => 'project_manager/server/projects', 'func' => 'updateinfos', 'domain' => '###domain###']); $list->setColumnLabel('createdate_psi', $this->i18n('project_manager_pagespeed_updatedate')); + $list->setColumnFormat('createdate_psi', 'custom', function ($params) { + return (rex_formatter::format($params['list']->getValue('createdate_psi'),'date','d.m.Y H:i:s')); + }); // icon column (Domain hinzufügen bzw. bearbeiten) $thIcon = ''; @@ -116,7 +119,8 @@ return ''; } }); - $list->setColumnLayout('status', ['###VALUE###', '###VALUE###']); + + $list->setColumnLayout('status', ['###VALUE###', '###VALUE###']); $list->addColumn("Pagespeed", false, -1, ['PageSpeed', '###VALUE###']); diff --git a/plugins/server/assets/js/tablesorter-custom.js b/plugins/server/assets/js/tablesorter-custom.js index a3bbb40..f1b640b 100644 --- a/plugins/server/assets/js/tablesorter-custom.js +++ b/plugins/server/assets/js/tablesorter-custom.js @@ -1,11 +1,45 @@ $(document).on('rex:ready', function (event, container) { - $(".project_manager-tablesorter").tablesorter({ + $("#rex-page-project-manager-server-overview .project_manager-tablesorter").tablesorter({ theme : 'default', widthFixed: true, widgets: ["saveSort"], widgetOptions: { saveSort: true }, - headers: { 0: { sorter: false} } + dateFormat : "ddmmyyyy", + headers: { + 0: { sorter: false}, + 5: { sorter: "shortDate", dateFormat: "ddmmyyyy" }, + 6: { sorter: 'text' }, + 7: { sorter: 'text' } + } + }); + $("#rex-page-project-manager-hosting-overview .project_manager-tablesorter").tablesorter({ + theme : 'default', + widthFixed: true, + widgets: ["saveSort"], + widgetOptions: { + saveSort: true + }, + dateFormat : "ddmmyyyy", + headers: { + 0: { sorter: false}, + 7: { sorter: "shortDate", dateFormat: "ddmmyyyy" } + } + }); + $("#rex-page-project-manager-pagespeed-overview .project_manager-tablesorter").tablesorter({ + theme : 'default', + widthFixed: true, + widgets: ["saveSort"], + widgetOptions: { + saveSort: true + }, + dateFormat : "ddmmyyyy", + headers: { + 0: { sorter: false}, + 4: { sorter: "shortDate", dateFormat: "ddmmyyyy" } + } + }); + }); \ No newline at end of file diff --git a/plugins/server/package.yml b/plugins/server/package.yml index f179e2c..8bbe622 100644 --- a/plugins/server/package.yml +++ b/plugins/server/package.yml @@ -1,6 +1,6 @@ package: project_manager/server -version: '1.2.5' -author: 'Friends Of REDAXO, Manétage - Ronny Kemmereit, Alexander Walther' +version: '1.2.6' +author: 'Friends Of REDAXO' supportpage: https://github.com/FriendsOfREDAXO/project_manager page: diff --git a/plugins/server/pages/project_manager.server.config.php b/plugins/server/pages/project_manager.server.config.php index 8f7e697..2e27625 100644 --- a/plugins/server/pages/project_manager.server.config.php +++ b/plugins/server/pages/project_manager.server.config.php @@ -90,6 +90,8 @@ $select->addOption('5.7.1', '5.7.1'); $select->addOption('5.8.0', '5.8.0'); $select->addOption('5.8.1', '5.8.1'); +$select->addOption('5.9.0', '5.9.0'); +$select->addOption('5.10.0', '5.10.0'); $select->setSelected($this->getConfig('cms_min')); $n['field'] = $select->get(); $formElements[] = $n; diff --git a/plugins/server/pages/project_manager.server.overview.php b/plugins/server/pages/project_manager.server.overview.php index d536b91..ce32298 100644 --- a/plugins/server/pages/project_manager.server.overview.php +++ b/plugins/server/pages/project_manager.server.overview.php @@ -51,7 +51,6 @@ } } else if ($func == 'edit') { - $yform->setValueField('text', ['api_key', $this->i18n('project_manager_server_api_key_info'), 'notice' => ''.$this->i18n('api_key_notice').'']); $yform->setValidateField('empty', ['api_key', $this->i18n('no_api_key_defined')]); @@ -227,15 +226,16 @@ if (substr($raw['cms_version'], 0, 1) == 4 ) { //if REX 4.x if (array_key_exists('update_article', $raw) && array_key_exists('update_media', $raw)) { if ($raw['update_media'] > $raw['update_article']) { - return date('Y-m-d H:i:s', $raw['update_media']); + return date('d.m.Y H:i:s', $raw['update_media']); } else { - return date('Y-m-d H:i:s', $raw['update_article']); + return date('d.m.Y H:i:s', $raw['update_article']); } } else { return "-"; } } else { //if REX 5.x - return date('Y-m-d H:i:s', strtotime($raw['article'][0]['updatedate'])); + return date('d.m.Y H:i:s', strtotime($raw['article'][0]['updatedate'])); + } } }); @@ -294,8 +294,8 @@ } else { return $raw['cms_version']; } - } else if ($params['list']->getValue('cms') == '5') { - if ( $raw['cms_version'] < $cms_min) { + } else if ($params['list']->getValue('cms') == '5') { + if (version_compare($raw['cms_version'], $cms_min) < 0 ) { return ''.$raw['cms_version'].''; } else { return $raw['cms_version']; @@ -314,7 +314,8 @@ if($params['list']->getValue('raw')) { $raw= json_decode($params['list']->getValue('raw'), true); $php_min = rex_config::get('project_manager/server', 'php_min'); - if ( $raw['php_version'] < $php_min) { + + if (version_compare($raw['php_version'], $php_min) < 0 ) { return ''.substr($raw['php_version'],0,3).''; } else { return substr($raw['php_version'],0,3); diff --git a/plugins/server/pages/project_manager.server.projects.php b/plugins/server/pages/project_manager.server.projects.php index c0637e2..a540812 100644 --- a/plugins/server/pages/project_manager.server.projects.php +++ b/plugins/server/pages/project_manager.server.projects.php @@ -96,11 +96,11 @@ $output = ''; if (array_key_exists('update_article', $raw) && array_key_exists('update_media', $raw)) { - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; } - $output .= ''; + $output .= ''; $output .= '
Letzte ÄnderungDatum
Artikel'.date('Y-m-d H:i:s', $raw['update_article']).'
Medienpool'.date('Y-m-d H:i:s', $raw['update_media']).'
Artikel'.date('d.m.Y H:i:s', $raw['update_article']).'
Medienpool'.date('d.m.Y H:i:s', $raw['update_media']).'
Synchronisierung mit Projekt Manager'.$item['updatedate'].'
Synchronisierung mit Projekt Manager'.date('d.m.Y H:i:s', $item['updatedate']).'
'; $fragment = new rex_fragment(); @@ -145,9 +145,9 @@ // UPDATES $output = ''; - $output .= ''; - $output .= ''; - $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; $output .= '
Letzte ÄnderungDatum
Artikel'.$raw['article'][0]['updatedate'].'
Medienpool'.$raw['media'][0]['updatedate'].'
Synchronisierung mit Projekt Manager'.$item['updatedate'].'
Artikel'.rex_formatter::format($raw['article'][0]['updatedate'],'date','d.m.Y H:i:s').'
Medienpool'.rex_formatter::format($raw['media'][0]['updatedate'],'date','d.m.Y H:i:s').'
Synchronisierung mit Projekt Manager'.rex_formatter::format($item['updatedate'],'date','d.m.Y H:i:s').'
'; $fragment = new rex_fragment(); @@ -166,7 +166,7 @@ $output .= ''; $output .= ''.$login["name"].''; $output .= ''.$login["login"].''; - $output .= ''.$login["lastlogin"].''; + $output .= ''.rex_formatter::format($login["lastlogin"],'date','d.m.Y H:i:s').''; $output .= ''; } $output .= ''; @@ -192,7 +192,7 @@ $output .= ''; $output .= ''.$article["name"].''; $output .= ''.$article["updateuser"].''; - $output .= ''.$article["updatedate"].''; + $output .= ''.rex_formatter::format($article["updatedate"],'date','d.m.Y H:i:s').''; $output .= ''; } $output .= ''; @@ -213,7 +213,7 @@ $output .= ''; $output .= ''.$file["filename"].''; $output .= ''.$file["updateuser"].''; - $output .= ''.$file["updatedate"].''; + $output .= ''.rex_formatter::format($file["updatedate"],'date','d.m.Y H:i:s').''; $output .= ''; } $output .= ''; @@ -237,7 +237,7 @@ foreach ($modules as $file) { $output .= ''; $output .= ''.$file["name"].''; - $output .= ''.$file["updatedate"].''; + $output .= ''.rex_formatter::format($file["updatedate"],'date','d.m.Y H:i:s').''; $output .= ''; } $output .= '';