DataObjects/Core_company.php
[Pman.Core] / DataObjects / Core_company.php
index 5717770..50cebc2 100644 (file)
@@ -50,8 +50,6 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject
         $x->comptype= 'OWNER';
         $x->find(true);
         
-        var_dump('fetch here??');exit;
-        
         if (!empty($q['query']['company_project_id'])) {
             $add = '';
             if (!empty($q['query']['company_include_self'])) {
@@ -124,7 +122,9 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject
     }
     
     // ---------- AUTHENTICATION
-     function isAuth()
+    // not sure where authetnication via company is used?? posibly media-outreach
+    
+    function isAuth()
     {
         $db = $this->getDatabaseConnection();
         $sesPrefix = $db->dsn['database'];
@@ -285,6 +285,9 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject
         ){
             $roo->jerr('This company is not allow to delete');
         }
+    }
+    function onDelete($req, $roo)
+    {
         $img = DB_DataObject::factory('Images');
         $img->ontable = $this->tableName();
         $img->onid = $this->id;
@@ -449,7 +452,7 @@ class Pman_Core_DataObjects_Core_Company extends DB_DataObject
     {
         $affects  = array();
         
-        $all_links = $x->databaseLinks();
+        $all_links = $this->databaseLinks();
         
         foreach($all_links as $tbl => $links) {
             foreach($links as $col => $totbl_col) {