Skip to content

Commit

Permalink
Changes for 1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rkemmere committed Jan 4, 2022
1 parent 2eb6895 commit c160cf2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 1.3.7 // 04.01.2022

# Plugin: Server 1.3.7
* Favicon Cronjob an Google API angepasst


## Version 1.3.6 // 03.12.2021

# Plugin: Server 1.3.6
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: project_manager
version: '1.3.6'
version: '1.3.7'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
9 changes: 7 additions & 2 deletions plugins/server/lib/project-manager-favicon.cronjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ public function execute()
$ch = [];

foreach($domains as $domain) {

$ssl = $domain['is_ssl'];
$protocol = ($ssl == 1) ? "https://" : "http://";
$ch[$domain['domain']] = curl_init();
$fp[$domain['domain']] = fopen(rex_path::pluginAssets('project_manager', 'server', 'favicon/'.$domain['domain'].'.png'), 'w+');
curl_setopt($ch[$domain['domain']], CURLOPT_URL, "https://www.google.com/s2/favicons?domain=".$domain['domain']);
curl_setopt($ch[$domain['domain']], CURLOPT_URL, "https://www.google.com/s2/u/0/favicons?domain=".$domain['domain']."&sz=64");
curl_setopt($ch[$domain['domain']], CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch[$domain['domain']], CURLOPT_HEADER, 0);
curl_setopt($ch[$domain['domain']], CURLOPT_FILE, $fp[$domain['domain']]);
curl_multi_add_handle($multi_curl,$ch[$domain['domain']]);
curl_multi_add_handle($multi_curl,$ch[$domain['domain']]);

}
$active = null;
do {
Expand Down
6 changes: 4 additions & 2 deletions plugins/server/lib/project-manager.cronjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ public function execute()

foreach ($resps as $domain => $response) {



$resp = curl_multi_getcontent($response);
curl_multi_remove_handle($multi_curl, $response);

$json = json_decode($resp, true);

$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) {
Expand Down
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.3.6'
version: '1.3.7'
author: 'Friends Of REDAXO'
supportpage: https://github.com/FriendsOfREDAXO/project_manager

Expand Down
4 changes: 2 additions & 2 deletions plugins/server/pages/project_manager.server.overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
ON D.id = L.domain_id
ORDER BY '.$sort.' '.$sorttype.'';


$list = rex_list::factory($sql, 2000);
$list->setColumnFormat('id', 'Id');
$list->addParam('page', 'project_manager/server/overview');
Expand Down Expand Up @@ -184,7 +183,7 @@
if (file_exists($this->getAssetsPath('favicon/'.$params['list']->getValue('domain').'.png'))) {

$filename = $this->getAssetsUrl('favicon/'.$params['list']->getValue('domain').'.png');
return '<a href="http://'.$params['list']->getValue('domain').'/" target="_blank"><img src="'.$filename.'" /></a>';
return '<a href="http://'.$params['list']->getValue('domain').'/" target="_blank"><img src="'.$filename.'" width="16"/></a>';
} else {
return '<a href="http://'.$params['list']->getValue('domain').'/" target="_blank"><i class="fa fa-sitemap"></i></a>';
}
Expand Down Expand Up @@ -217,6 +216,7 @@

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

if (isset($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="" />
Expand Down

0 comments on commit c160cf2

Please sign in to comment.