Skip to content

Commit 78bb076

Browse files
authored
Fix/1650 show clear cache button (hestiacp#1652)
* Fix 1650 Show button on page load for Nginx proxy users * Fix hestiacp#1649 Disable PMA SSO before migrating and then enable it again with new keys
1 parent 43915ed commit 78bb076

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

install/upgrade/manual/migrate_phpmyadmin.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ read -p 'Would you like to continue? [y/n]'
2222
echo # (optional) move to a new line
2323
if [[ $REPLY =~ ^[Yy]$ ]]
2424
then
25+
# Remove PMA SSO first
26+
sso="no"
27+
if [ "$PHPMYADMIN_KEY" != "" ]; then
28+
sso="yes"
29+
$HESTIA/bin/v-delete-sys-pma-sso
30+
fi
31+
2532
# Create an backup of current config
2633
echo "[ * ] Make backup old config files"
2734
mkdir -p /root/hst_backup_man/phmyadmin
@@ -154,4 +161,7 @@ MYSQL_PMA3
154161
#MYSQL DB and TABLES ADDITION
155162
mysql -uroot < $HESTIA_INSTALL_DIR/phpmyadmin/create_tables.sql
156163

164+
if [ "$sso" == "yes" ]; then
165+
$HESTIA/bin/v-add-sys-pma-sso
166+
fi
157167
fi

web/templates/admin/edit_web.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<a class="ui-button cancel" id="btn-back" href="/list/web/"><i class="fas fa-arrow-left status-icon blue"></i> <?=_('Back')?></a>
55
</div>
66
<div class="l-unit-toolbar__buttonstrip float-right">
7-
<a href="/delete/web/cache/?domain=<?=$_GET['domain'];?>&token=<?=$_SESSION['token'];?>" class="ui-button cancel <?php if ( $v_nginx_cache == 'yes' || ($v_proxy_template == 'caching' && $_SESSION['PROXY'] == 'nginx')) { echo "block"; } else{ echo "hidden"; }?>" id="v-clear-cache">
7+
<a href="/delete/web/cache/?domain=<?=$_GET['domain'];?>&token=<?=$_SESSION['token'];?>" class="ui-button cancel <?php if ( $v_nginx_cache == 'yes' || ($v_proxy_template == 'caching' && $_SESSION['PROXY_SYSTEM'] == 'nginx')) { echo "block"; } else{ echo "hidden"; }?>" id="v-clear-cache">
88
<i class="fas fa-trash status-icon red"></i><?=_('Purge Nginx Cache');?>
99
</a>
1010

@@ -15,7 +15,6 @@
1515
</div>
1616
</div>
1717
</div>
18-
1918
<div class="l-separator"></div>
2019

2120
<div class="l-center animated fadeIn">

0 commit comments

Comments
 (0)