Skip to content
Browse files

OES-64

  • Loading branch information...
1 parent 517167a commit 2d8840f9dc3a619b716b780c60d5ff945929357c Denis committed Oct 14, 2012
View
3 data/Act.php
@@ -74,8 +74,7 @@ class Act extends DomainEntity{
'entered_by' , 'project_title', 'comments', 'record_grouping',
'date_updated' , 'updated_by' , 'monitoring_status');
- protected $mt = array('national_legislation' , 'method_of_violence' , 'attribution' ,
- 'victim_characteristics','international_instruments');
+ //protected $mt = array('national_legislation' , 'method_of_violence' , 'attribution' , 'victim_characteristics','international_instruments');
protected $supporting_doc = true;
View
2 data/Address.php
@@ -47,7 +47,7 @@ class Address extends DomainEntity{
public $start_date;
public $end_date;
- protected $mt = array( );
+ //protected $mt = array( );
protected $managementFields = array( );
View
2 data/Arrest.php
@@ -49,7 +49,7 @@ class Arrest extends DomainEntity{
- protected $mt = array( 'whereabouts','legal_counsel','type_of_court' );
+ // protected $mt = array( 'whereabouts','legal_counsel','type_of_court' );
protected $managementFields = array( );
View
2 data/BiographicDetail.php
@@ -63,7 +63,7 @@ class BiographicDetail extends DomainEntity{
public $updated_by ;
public $monitoring_status;
- protected $mt = array( );
+ //protected $mt = array( );
protected $managementFields = array( 'date_received', 'project_title', 'comments', 'record_grouping',
'monitoring_status' , 'date_of_entry', 'entered_by' , 'date_updated' , 'updated_by' );
View
2 data/Browse.php
@@ -570,7 +570,7 @@ public static function getEntityFields($entity)
IFNULL(l.msgstr , d.field_label) AS 'field_label_l10n'
FROM data_dict d
LEFT JOIN data_dict_l10n l ON ( l.msgid = d.field_number AND l.locale = '{$conf['locale']}' )
- WHERE entity = '$entity' ORDER BY CAST(label_number as UNSIGNED)";
+ WHERE entity = '$entity' ORDER BY field_number";
$res = $browse->ExecuteQuery($sql);
return $res;
}
View
2 data/ChainOfEvents.php
@@ -53,7 +53,7 @@ class ChainOfEvents extends DomainEntity{
public $updated_by ;
public $monitoring_status;
- protected $mt = array( );
+ //protected $mt = array( );
protected $managementFields = array( 'date_received', 'date_of_entry',
'entered_by' , 'project_title', 'comments', 'record_grouping',
View
1 data/Destruction.php
@@ -39,7 +39,6 @@ class Destruction extends DomainEntity{
- protected $mt = array( );
protected $managementFields = array( );
View
17 data/DomainEntity.php
@@ -50,7 +50,8 @@ class DomainEntity extends ADODB_Active_Record{
'monitoring_status' ,'entered_by' , 'date_of_entry','updated_by' , 'date_updated' );
-
+ protected $mt = array( );
+
private $entity;
private $keyName;
@@ -60,9 +61,23 @@ public function __construct($table = false, $pkeyarr=false, $db=false, $options=
parent::__construct($table, $pkey ,$db , $options);
$this->entity = $table;
$this->keyName = $this->entity . '_record_number';
+ $this->loadMTNames();
+
+
}
+ private function loadMTNames(){
+ $entityFields = Browse::getEntityFields($this->getEntityType());
+ foreach ( $entityFields as $entityField ){
+ $mlt = ( (trim($entityField['is_repeat']) == 'Y' || trim($entityField['is_repeat']) == 'y' )?true :false);
+ if($mlt){
+ $this->mt[]=$entityField['field_name'];
+ }
+ }
+ $this->mt=array_unique($this->mt);
+ }
+
public function getEntityType()
{
return $this->entity;
View
5 data/Event.php
@@ -71,8 +71,7 @@ class Event extends DomainEntity{
public $supporting_documents;
- protected $mt = array('geographical_term' , 'local_geographical_area' ,
- 'violation_index','rights_affected','huridocs_index_terms' , 'local_index' , 'other_thesaurus' );
+ //protected $mt = array('geographical_term' , 'local_geographical_area' , 'violation_index','rights_affected','huridocs_index_terms' , 'local_index' , 'other_thesaurus' );
protected $managementFields = array( 'date_received', 'project_title', 'comments', 'record_grouping',
'monitoring_status' ,'entered_by' , 'date_of_entry','updated_by' , 'date_updated' );
@@ -85,8 +84,8 @@ class Event extends DomainEntity{
public function __construct($table = false, $pkeyarr=false, $db=false, $options=array()){
parent::__construct('event', $pkey ,$db , $options);
$table = 'event';
-
+
//$this->belongsTo( 'user_profile' , 'username' , 'username' ) ;
//$this->hasMany( 'mlt_event_geographical_term' , 'record_number' ) ;
View
4 data/Information.php
@@ -59,8 +59,8 @@ class Information extends DomainEntity{
public $updated_by ;
public $monitoring_status;
- protected $mt = array('language_of_source_material' , 'local_language_of_source_material' ,
- 'type_of_source_material' );
+
+ //protected $mt = array('language_of_source_material' , 'local_language_of_source_material' , 'type_of_source_material' );
protected $managementFields = array( 'date_received', 'date_of_entry',
View
2 data/Intervention.php
@@ -60,7 +60,7 @@ class Intervention extends DomainEntity{
public $updated_by ;
public $monitoring_status;
- protected $mt = array('type_of_intervention' );
+ //protected $mt = array('type_of_intervention' );
protected $managementFields = array( 'date_received', 'date_of_entry',
View
2 data/Involvement.php
@@ -56,7 +56,7 @@ class Involvement extends DomainEntity{
public $updated_by ;
public $monitoring_status;
- protected $mt = array('type_of_perpetrator' );
+ //protected $mt = array('type_of_perpetrator' );
protected $managementFields = array( 'date_received', 'date_of_entry',
View
2 data/Killing.php
@@ -36,7 +36,7 @@ class Killing extends DomainEntity{
- protected $mt = array( );
+ //protected $mt = array( );
protected $managementFields = array( );
View
3 data/Person.php
@@ -93,10 +93,13 @@ class Person extends DomainEntity{
'date_updated' , 'updated_by' , 'monitoring_status');
+/*
protected $mt = array('occupation' , 'local_term_for_occupation' ,
'physical_description','citizenship','ethnic_background' , 'other_background' , 'general_characteristics',
'language' , 'local_language','national_origin'
);
+ */
+
protected $supporting_doc = true;
protected $isAddress = true;
View
2 data/Torture.php
@@ -39,7 +39,7 @@ class Torture extends DomainEntity{
- protected $mt = array( 'intent' , 'medical_attention' , 'statements_signed' );
+ //protected $mt = array( 'intent' , 'medical_attention' , 'statements_signed' );
protected $managementFields = array( );

0 comments on commit 2d8840f

Please sign in to comment.
Something went wrong with that request. Please try again.