UpdateDatabase.php
authorEdward <edward@roojs.com>
Mon, 22 Oct 2018 08:59:12 +0000 (16:59 +0800)
committerEdward <edward@roojs.com>
Mon, 22 Oct 2018 08:59:12 +0000 (16:59 +0800)
UpdateDatabase.php

index 5b9b6e6..4fda8da 100644 (file)
@@ -847,15 +847,17 @@ class Pman_Core_UpdateDatabase extends Pman
         $c = DB_DataObject::Factory('core_company');
         $c->selectAdd();
         $c->selectAdd('distinct(comptype) as comptype');
-        $c->whereAdd("comptype != ''");
+        $c->whereAdd("
+                comptype != '' 
+            AND 
+                comptype != 'undefined' 
+            AND 
+                comptype != 'undefine'
+        ");
         
         $ctb = array();
         foreach($c->fetchAll('comptype') as $cts) {
             
-            if($cts == 'undefined' || $cts == 'undefine'){
-                continue;
-            }
-            
             $ctb[]= array( 'etype'=>'COMPTYPE', 'name' => $cts, 'display_name' => ucfirst(strtolower($cts)));
         
         }