Explorar el Código

try to sort template list

andre hace 4 años
padre
commit
0903b641a6
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      app/UI/VmCreate/Fields/OsTemplateSelect.php

+ 10 - 10
app/UI/VmCreate/Fields/OsTemplateSelect.php

@@ -70,17 +70,17 @@ class OsTemplateSelect extends Select implements ClientArea
         {
             $clusterResurces->findByNodes($defaultNode);
         }
-        foreach ($clusterResurces->fetchWithUniqueNames($defaultNode)->sort() as $entity)
-        {
 
-            logModuleCall(
-                'proxmoxCloud',
-                __FUNCTION__,
-                $entity,
-                'Debug',
-                $entity->getVm()->config()['description']
-            );
-            
+        logModuleCall(
+            'proxmoxCloud',
+            __FUNCTION__,
+            $$clusterResurces->fetchWithUniqueNames($defaultNode),
+            'Debug',
+            ksort($$clusterResurces->fetchWithUniqueNames($defaultNode))
+        );
+        
+    foreach ($clusterResurces->fetchWithUniqueNames($defaultNode) as $entity)
+        {
             if ($entity->isCustom() && !$entity->matchName($this->getWhmcsParamByKey("serviceid")))
             {
                 continue;