UpdateDatabase.php
authorAlan Knowles <alan@roojs.com>
Fri, 10 Apr 2015 07:59:58 +0000 (15:59 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 10 Apr 2015 07:59:58 +0000 (15:59 +0800)
UpdateDatabase.php

index a81d927..1b9a051 100644 (file)
@@ -156,6 +156,8 @@ class Pman_Core_UpdateDatabase extends Pman
             DB_DataObject::factory('companies')->initCompanies($this, $opts);
         }
          
+         
+         
     }
     function output() {
         return '';
@@ -831,4 +833,25 @@ class Pman_Core_UpdateDatabase extends Pman
        
     }
     
+    function fixLinks()
+    {
+        $cls = 'Pman_Core_UpdateDatabase_'. 
+        $ff = HTML_Flexyframework::get();
+        
+        $dburl = parse_url($ff->DB_DataObject['database']);
+        
+        $dbtype = $dburl['scheme'];
+       
+        $scls = ucfirst($dbtype). 'Links';
+        $cls = 'Pman_Core_UpdateDatabase_'. $scls;
+        $fn = implode('/',explode('_', $cls)).'.php';
+        if (!file_exists(__DIR__.'/UpdateDatabase/'. $scls .'.php')) {
+            return;
+        }
+        require_once $fn;
+        $c = new $cls();
+        
+        
+        
+    }
 }
\ No newline at end of file