Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CiviCRM no longer has $_tableName property #608

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CRM/Volunteer/Angular/Tab/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected static function initializeProject($eventId) {
$project = new CRM_Volunteer_BAO_Project();
$project->id = 0;
$project->entity_id = $eventId;
$project->entity_table = CRM_Event_DAO_Event::$_tableName;
$project->entity_table = CRM_Event_DAO_Event::getTableName();

return $project;
}
Expand All @@ -33,7 +33,7 @@ public static function prepareTab($eventId) {

$project = current(CRM_Volunteer_BAO_Project::retrieve(array(
'entity_id' => $eventId,
'entity_table' => CRM_Event_DAO_Event::$_tableName,
'entity_table' => CRM_Event_DAO_Event::getTableName(),
)));
if (!$project) {
$project = self::initializeProject($eventId);
Expand Down
6 changes: 3 additions & 3 deletions CRM/Volunteer/BAO/Assignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ public static function retrieve(array $params) {
if (CRM_Utils_Array::value($key, $activity_fields)) {
$dataType = CRM_Utils_Type::typeToString($activity_fields[$key]['type']);
$fieldName = $activity_fields[$key]['name'];
$tableName = CRM_Activity_DAO_Activity::$_tableName;
$tableName = CRM_Activity_DAO_Activity::getTableName();
} elseif (CRM_Utils_Array::value($key, $contact_fields)) {
$dataType = CRM_Utils_Type::typeToString($contact_fields[$key]['type']);
$fieldName = $contact_fields[$key]['name'];
$tableName = CRM_Contact_DAO_Contact::$_tableName;
$tableName = CRM_Contact_DAO_Contact::getTableName();
} elseif (CRM_Utils_Array::value($key, $custom_fields)) {
$dataType = $custom_fields[$key]['data_type'];
$fieldName = $custom_fields[$key]['column_name'];
$tableName = $customTableName;
} elseif($key == 'project_id') {
$dataType = 'Int';
$fieldName = 'id';
$tableName = CRM_Volunteer_DAO_Project::$_tableName;
$tableName = CRM_Volunteer_DAO_Project::getTableName();
} elseif ($key == 'target_contact_id') {
$dataType = 'Int';
$fieldName = 'contact_id';
Expand Down
6 changes: 3 additions & 3 deletions CRM/Volunteer/BAO/Commendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ public static function retrieve(array $params) {
if (CRM_Utils_Array::value($key, $activity_fields)) {
$dataType = CRM_Utils_Type::typeToString($activity_fields[$key]['type']);
$fieldName = $activity_fields[$key]['name'];
$tableName = CRM_Activity_DAO_Activity::$_tableName;
$tableName = CRM_Activity_DAO_Activity::getTableName();
} elseif (CRM_Utils_Array::value($key, $contact_fields)) {
$dataType = CRM_Utils_Type::typeToString($contact_fields[$key]['type']);
$fieldName = $contact_fields[$key]['name'];
$tableName = CRM_Contact_DAO_Contact::$_tableName;
$tableName = CRM_Contact_DAO_Contact::getTableName();
} elseif (CRM_Utils_Array::value($key, $custom_fields)) {
$dataType = $custom_fields[$key]['data_type'];
$fieldName = $custom_fields[$key]['column_name'];
Expand Down Expand Up @@ -183,4 +183,4 @@ public static function retrieve(array $params) {

return $rows;
}
}
}
4 changes: 2 additions & 2 deletions volunteer.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function volunteer_civicrm_tabset($tabsetName, &$tabs, $context) {
'current' => false,
);

if (!CRM_Volunteer_BAO_Project::isActive($eventId, CRM_Event_DAO_Event::$_tableName)) {
if (!CRM_Volunteer_BAO_Project::isActive($eventId, CRM_Event_DAO_Event::getTableName())) {
$tab['volunteer']['valid'] = FALSE;
}
}
Expand All @@ -175,7 +175,7 @@ function volunteer_civicrm_tabset($tabsetName, &$tabs, $context) {

// on manage events listing screen, this section sets volunteer tab in configuration popup as enabled/disabled.
if ($tabsetName == 'civicrm/event/manage/rows' && $eventId) {
$tabs[$eventId]['is_volunteer'] = CRM_Volunteer_BAO_Project::isActive($eventId, CRM_Event_DAO_Event::$_tableName);
$tabs[$eventId]['is_volunteer'] = CRM_Volunteer_BAO_Project::isActive($eventId, CRM_Event_DAO_Event::getTableName());
}
}

Expand Down