X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FDAO%2FEntityFile.php;h=26069113cbefad1604991e12fdf447bcfd8963eb;hb=1c46a84c89447841b61043486877a8013ea8ebf7;hp=6003d7bfa84824c9e4e06fcfee2acb9d180d900f;hpb=d96bf18d5b1849cc8f21c8845706eaccc78db5f3;p=civicrm-core.git diff --git a/CRM/Core/DAO/EntityFile.php b/CRM/Core/DAO/EntityFile.php index 6003d7bfa8..26069113cb 100644 --- a/CRM/Core/DAO/EntityFile.php +++ b/CRM/Core/DAO/EntityFile.php @@ -19,14 +19,14 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { * * @var string */ - static $_tableName = 'civicrm_entity_file'; + public static $_tableName = 'civicrm_entity_file'; /** * Should CiviCRM log any modifications to this table in the civicrm_log table. * * @var bool */ - static $_log = TRUE; + public static $_log = TRUE; /** * primary key @@ -72,7 +72,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { */ public static function getReferenceColumns() { if (!isset(Civi::$statics[__CLASS__]['links'])) { - Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); + Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'file_id', 'civicrm_file', 'id'); Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName(), 'entity_id', NULL, 'id', 'entity_table'); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); @@ -94,6 +94,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { 'title' => ts('Entity File ID'), 'description' => ts('primary key'), 'required' => TRUE, + 'where' => 'civicrm_entity_file.id', 'table_name' => 'civicrm_entity_file', 'entity' => 'EntityFile', 'bao' => 'CRM_Core_DAO_EntityFile', @@ -106,6 +107,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { 'description' => ts('physical tablename for entity being joined to file, e.g. civicrm_contact'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, + 'where' => 'civicrm_entity_file.entity_table', 'table_name' => 'civicrm_entity_file', 'entity' => 'EntityFile', 'bao' => 'CRM_Core_DAO_EntityFile', @@ -117,6 +119,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { 'title' => ts('Entity ID'), 'description' => ts('FK to entity table specified in entity_table column.'), 'required' => TRUE, + 'where' => 'civicrm_entity_file.entity_id', 'table_name' => 'civicrm_entity_file', 'entity' => 'EntityFile', 'bao' => 'CRM_Core_DAO_EntityFile', @@ -128,6 +131,7 @@ class CRM_Core_DAO_EntityFile extends CRM_Core_DAO { 'title' => ts('File'), 'description' => ts('FK to civicrm_file'), 'required' => TRUE, + 'where' => 'civicrm_entity_file.file_id', 'table_name' => 'civicrm_entity_file', 'entity' => 'EntityFile', 'bao' => 'CRM_Core_DAO_EntityFile',