Procházet zdrojové kódy

Fix modification/deletion of packages

Kristan Kenney před 5 roky
rodič
revize
aed159a02c

+ 1 - 1
bin/v-delete-user-package

@@ -24,7 +24,7 @@ source $HESTIA/conf/hestia.conf
 
 
 # Functions
 # Functions
 is_package_in_use() {
 is_package_in_use() {
-    check_package=$(grep "PACKAGE='default" $HESTIA/data/users/*/user.conf | cut -d'/' -f7)
+    check_package=$(grep "PACKAGE='$package" $HESTIA/data/users/*/user.conf | cut -d'/' -f7)
     if [ ! -z "$check_package" ]; then
     if [ ! -z "$check_package" ]; then
         for user in $check_package; do
         for user in $check_package; do
             $BIN/v-change-user-package "$user" 'default'
             $BIN/v-change-user-package "$user" 'default'

+ 1 - 5
web/templates/admin/list_packages.html

@@ -68,11 +68,7 @@ sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DI
         <div class="clearfix l-unit__stat-col--left super-compact">
         <div class="clearfix l-unit__stat-col--left super-compact">
           <input id="check<?=$i?>" class="ch-toggle" type="checkbox" name="user[]" value="<?=$key?>">
           <input id="check<?=$i?>" class="ch-toggle" type="checkbox" name="user[]" value="<?=$key?>">
         </div>
         </div>
-            <? if ($key == 'default') { ?>
-              <div class="clearfix l-unit__stat-col--left wide-2 truncate"><b><?=$key?></b></div>
-            <? } else {?>
-              <div class="clearfix l-unit__stat-col--left wide-2 truncate"><b><a href="/edit/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Package')?>: <?=$key?>"><?=$key?></b></a></div>
-            <? } ?>
+            <div class="clearfix l-unit__stat-col--left wide-2 truncate"><b><a href="/edit/package/?package=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Package')?>: <?=$key?>"><?=$key?></b></a></div>
             <!-- START QUICK ACTION TOOLBAR AREA -->
             <!-- START QUICK ACTION TOOLBAR AREA -->
             <div class="clearfix l-unit__stat-col--left text-right compact-3">
             <div class="clearfix l-unit__stat-col--left text-right compact-3">
                   <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">