RomanL 6 лет назад
Родитель
Сommit
277e4faa98
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      inc/classes/BxDolStorageQuery.php

+ 13 - 0
inc/classes/BxDolStorageQuery.php

@@ -36,6 +36,19 @@ class BxDolStorageQuery extends BxDolDb
         $sQuery = "SELECT * FROM `sys_objects_storage`";
         return $oDb->getAll($sQuery);
     }
+    
+    static public function getAllGhosts ($aParams)
+    {
+        $oDb = BxDolDb::getInstance();
+        $sQuery = "SELECT * FROM `sys_storage_ghosts` WHERE 2>1 ";
+        if (isset($aParams['profile_id']))
+            $sQuery .= " AND profile_id = :profile_id";
+        if (isset($aParams['object']))
+            $sQuery .= " AND object = :object";
+        if (isset($aParams['content_id']))
+            $sQuery .= " AND content_id = :content_id";
+        return $oDb->getAll($sQuery, $aParams);
+    }
 
     public function changeStorageEngine ($sEngine)
     {