Skip to content

Commit

Permalink
Changes 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rkemmere committed Jan 11, 2021
1 parent 41a0649 commit a898498
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 11 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Version 1.3 // 11.01.2021

# Plugin: Server 1.3
* Bug: Abfrage auf Servern mit vorgeschalter index.html behoben
* PHP Anforderungen package.yml um Version 8 erweitert
* Listenansicht mit Redaxo Backend Link erweitert
* Detailansicht mit Redaxo Backend Link

# Plugin: Client 1.1
* Redaxo Backend Verzeichnis wird mit übertragen


## Version 1.2.16 // 08.01.2021

# Plugin: Server 1.2.10
Expand Down
4 changes: 2 additions & 2 deletions package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager
version: '1.2.16'
version: '1.3.0'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down Expand Up @@ -28,7 +28,7 @@ plugins:
requires:
redaxo: '^5.2' # benötigt mindestens REDAXO 5.2
php:
version: '^7.0' # benötigt mindestens PHP 7
version: '>=7.0' # benötigt mindestens PHP 7

# Plugins die automatisch installiert werden sollen
#system_plugins:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
$project_manager["client_version"] = "1.0.4-legacy";
$project_manager["status"] = 1;

error_reporting(E_ALL & ~E_NOTICE);

$rex_master_file = "redaxo/include/master.inc.php";
if(file_exists($rex_master_file)) {
include($rex_master_file);
Expand Down
1 change: 1 addition & 0 deletions plugins/client/lib/rex_api_project_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function execute()
$params['rex_version'] = rex::getVersion();
$params['cms'] = "REDAXO";
$params['cms_version'] = rex::getVersion();
$params['rex_url_backend'] = rex_url::backend();
$params['php_version'] = phpversion();
$params['mysql_version'] = rex_sql::getServerVersion();
$params['status'] = 1;
Expand Down
2 changes: 1 addition & 1 deletion plugins/client/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager/client
version: '1.0.8'
version: '1.1.0'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
5 changes: 5 additions & 0 deletions plugins/server/assets/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ a.loading .fa-refresh {

.btn-toolbar .btn.btn-project-manager-update {
margin-bottom: 20px;
}

.project-manager-server--redaxo-favicon {
height: 15px;
margin-top: -3px;
}
Binary file added plugins/server/assets/favicon/redaxo-favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions plugins/server/lib/project-manager.cronjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ public function execute()
CURLOPT_TIMEOUT => 3 // seconds
);
foreach($websites as $website) {

$domain = $website['domain'];
$cms = $website['cms'];
$ssl = $website['is_ssl'];
$protocol = ($ssl == 1) ? "https://" : "http://";

$timestamp = time();

$url = $protocol.urlencode($domain)."?rex-api-call=project_manager&api_key=".$website['api_key'].'&t='.$timestamp;
$url = $protocol.urlencode($domain)."/index.php?rex-api-call=project_manager&api_key=".$website['api_key'].'&t='.$timestamp;

if ($cms == 5)
$url = $protocol.urlencode($domain)."?rex-api-call=project_manager&api_key=".$website['api_key'].'&t='.$timestamp;
$url = $protocol.urlencode($domain)."/index.php?rex-api-call=project_manager&api_key=".$website['api_key'].'&t='.$timestamp;

if ($cms == 4)
$url = $protocol.urlencode($domain)."/project_manager_client.php?rex-api-call=project_manager&api_key=".$website['api_key'].'&t='.$timestamp;
Expand All @@ -54,8 +55,8 @@ public function execute()
$json = json_decode($resp, true);

$project_manager_domain = rex_sql::factory()->setDebug(0)->getArray('SELECT * FROM ' . rex::getTable('project_manager_domain') . ' WHERE domain = ? LIMIT 1', [$domain]);
if(json_last_error() === JSON_ERROR_NONE && $json !== null) {

if(json_last_error() === JSON_ERROR_NONE && $json !== null) {

if ($json['status'] == 1) {

Expand Down
4 changes: 2 additions & 2 deletions plugins/server/lib/rex_api_project_manager_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function execute()
if($func == "updateData") {

// reload data
$url = $protocol.urlencode($domain)."index.php?rex-api-call=project_manager&api_key=".$api_key.'&t='.$timestamp;
$url = $protocol.urlencode($domain)."/index.php?rex-api-call=project_manager&api_key=".$api_key.'&t='.$timestamp;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
Expand Down Expand Up @@ -142,4 +142,4 @@ public function execute()
}
}

?>
?>
2 changes: 1 addition & 1 deletion plugins/server/package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager/server
version: '1.2.10'
version: '1.3.0'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
18 changes: 17 additions & 1 deletion plugins/server/pages/project_manager.server.overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,23 @@
$list->addColumn($this->i18n('domain'), '###domain###', 3);
//$list->setColumnParams($this->i18n('domain'), ['page' => 'project_manager/server/projects', 'domain' => '###domain###']);
$list->setColumnFormat($this->i18n('domain'), 'custom', function ($params) {
return '<a href="http://'.$params['list']->getValue('domain').'/" target="_blank">'.$params['list']->getValue('domain').'</a>';

$ssl = $params['list']->getValue('is_ssl');
$protocol = ($ssl == 1) ? "https://" : "http://";


if($params['list']->getValue('raw')) {
$raw= json_decode($params['list']->getValue('raw'), true);
if ($raw['rex_url_backend']) {

$rex_url_backend = ' <a href="'.$protocol.$params['list']->getValue('domain').$raw['rex_url_backend'].'" title="Redaxo Backend" target="_blank">
<img src="'.rex_url::pluginAssets('project_manager','server','favicon/redaxo-favicon.png').'" class="project-manager-server--redaxo-favicon" title="" alt="" />
</a>';
}
}


return '<a href="'.$protocol.$params['list']->getValue('domain').'" target="_blank">'.$params['list']->getValue('domain').'</a>'. $rex_url_backend;
});

$list->setColumnLabel('is_ssl', $this->i18n('is_ssl'));
Expand Down
6 changes: 6 additions & 0 deletions plugins/server/pages/project_manager.server.projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@
if ($raw['debug'] == 0)
$output .= '<tr><td>Debug Modus</td><td><i title="" class="rex-icon fa-check text-success"></i> nicht aktiv</td></tr>';
}

if ($raw['client_version'] >= "1.1.0") {
if (!empty($raw['rex_url_backend']))
$output .= '<tr><td>REDAXO Backend</td><td><a href="'.$protocol.$item['domain'].$raw['rex_url_backend'].'" target="_blank" title=""> <i class="fa fa-external-link"></i> '.$raw['rex_url_backend'].'</a></td></tr>';
}

$output .= '</tbody></table>';

$fragment = new rex_fragment();
Expand Down

0 comments on commit a898498

Please sign in to comment.