Various UI improvements

This commit is contained in:
Rich Lott / Artful Robot 2025-02-28 12:37:58 +00:00
parent bcbf5de9c4
commit 8d0a9d0926
7 changed files with 253 additions and 123 deletions

View file

@ -7,6 +7,36 @@ use CRM_Contactcats_ExtensionUtil as E;
*/
class CRM_Contactcats_Upgrader extends CRM_Extension_Upgrader_Base {
/**
* Add presentation_order
*
* @return TRUE on success
* @throws CRM_Core_Exception
*/
public function upgrade_0001(): bool {
$this->ctx->log->info('Applying update 0001: add presentation_order');
CRM_Core_DAO::executeQuery(<<<SQL
ALTER TABLE civicrm_contact_category_definition
ADD `presentation_order` int(1) unsigned NOT NULL DEFAULT 10 COMMENT 'The order to present categories in, lowest number first.'
SQL);
return TRUE;
}
/**
* Add description field
*
* @return TRUE on success
* @throws CRM_Core_Exception
*/
public function upgrade_0002(): bool {
$this->ctx->log->info('Applying update 0001: add presentation_order');
CRM_Core_DAO::executeQuery(<<<SQL
ALTER TABLE civicrm_contact_category_definition
ADD `description` text DEFAULT NULL
SQL);
return TRUE;
}
// By convention, functions that look like "function upgrade_NNNN()" are
// upgrade tasks. They are executed in order (like Drupal's hook_update_N).