Просмотр исходного кода

Fix/1650 show clear cache button (#1652)

* Fix 1650 Show button on page load for Nginx proxy users

* Fix #1649  Disable PMA SSO before migrating and then enable it again with new keys
Jaap Marcus 5 лет назад
Родитель
Сommit
78bb076d1a
2 измененных файлов с 11 добавлено и 2 удалено
  1. 10 0
      install/upgrade/manual/migrate_phpmyadmin.sh
  2. 1 2
      web/templates/admin/edit_web.html

+ 10 - 0
install/upgrade/manual/migrate_phpmyadmin.sh

@@ -22,6 +22,13 @@ read -p 'Would you like to continue? [y/n]'
 echo    # (optional) move to a new line
 if [[ $REPLY =~ ^[Yy]$ ]]
 then
+    # Remove PMA SSO first 
+    sso="no"
+    if [ "$PHPMYADMIN_KEY" != "" ]; then
+        sso="yes"
+        $HESTIA/bin/v-delete-sys-pma-sso
+    fi
+    
    # Create an backup of current config
    echo "[ * ] Make backup old config files"
    mkdir -p /root/hst_backup_man/phmyadmin
@@ -154,4 +161,7 @@ MYSQL_PMA3
    #MYSQL DB and TABLES ADDITION
    mysql -uroot < $HESTIA_INSTALL_DIR/phpmyadmin/create_tables.sql
       
+    if [ "$sso" == "yes" ]; then
+        $HESTIA/bin/v-add-sys-pma-sso
+    fi
 fi

+ 1 - 2
web/templates/admin/edit_web.html

@@ -4,7 +4,7 @@
             <a class="ui-button cancel" id="btn-back" href="/list/web/"><i class="fas fa-arrow-left status-icon blue"></i> <?=_('Back')?></a>
         </div>
         <div class="l-unit-toolbar__buttonstrip float-right">
-            <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">
+            <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">
                 <i class="fas fa-trash status-icon red"></i><?=_('Purge Nginx Cache');?>
             </a>
 
@@ -15,7 +15,6 @@
         </div>
     </div>
     </div>
-
     <div class="l-separator"></div>
 
     <div class="l-center animated fadeIn">