summaryrefslogtreecommitdiff
path: root/admin
AgeCommit message (Collapse)AuthorFilesLines
2026-06-11Introduce ContactPerson and ContactBusiness subclassesLester Caine3-18/+138
Splits the Contact class into ContactPerson (content_type_guid='contactperson') and ContactBusiness (content_type_guid='contactbusiness'), each using 'contact' as the shared package-level xref schema. Replaces the $isPerson/$00 xref hack with proper class identity via instanceof. - ContactPerson.php, ContactBusiness.php: new subclasses - Contact.php: loadXrefTypeList() reads type tags directly from liberty_xref; getAvailableTypeItems() for edit form (schema-driven with pre-upgrade fallback); getDisplayUrl() now points to display_contact.php - Type item codes: P01/P02 (person), B01-B04 (business, B01=Service new) - list_people.php, list_businesses.php: separate list pages per type - list_contacts.php: combined display-layer merge of both types - 5.0.3.php: upgrade script migrating existing data to new content types and codes - Templates: isPerson flag from instanceof; horizontal type checkboxes; list.tpl accepts $listTitle; menu adds People/Businesses entries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06schema: tighten account group role_id to 3; add SAGEID; add export_contacts.phpLester Caine1-4/+4
account xref_group and items: role_id 4 → 3 (Registered, not Editors). ACC_TO, VAT_NO: same role_id correction. ACCNO replaced with SAGEID (SAGE Account Reference). export_contacts.php: new CSV export (one row per contact, phones/emails/address). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Rationalise contact permissionsLester Caine1-4/+4
p_contact_view: registered; p_contact_create/update: editors; p_contact_expunge/admin: admin — expunge gates all delete buttons. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Tidy contact type xref_item defaults: $05 = MERG Kit Elf, drop $06-$10Lester Caine1-6/+1
$06 through $10 (Record Artist, Cartographer, PHX Client etc.) removed from schema defaults — already removed from live database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Use DEFTIMESTAMP for contact_address.last_update_dateLester Caine1-1/+1
DEFTIMESTAMP uses sysTimeStamp (now LOCALTIMESTAMP for Firebird 4+) rather than DEFAULT LOCALTIMESTAMP which adodb-datadict was mangling into a literal time value via DBTimeStamp(), causing Firebird SQLSTATE 22009 on INSERT. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27Fix Firebird/PDO compatibility and strip Cotswold Security remnantsLester Caine1-13/+4
- Fix LOCALTIMESTAMP default in contact_address (CURRENT_TIMESTAMP caused timezone error with Firebird 4+ / PDO session having no timezone set) - Add xref_id sequence call to all liberty_xref INSERTs in Contact::store() - Add CONTACT_PKG_CLASS_PATH so getLibertyObject resolves Contact class - Fix LibertyXref date fields: format Unix timestamps as Y-m-d H:i:s before INSERT; use null instead of empty string for nullable TIMESTAMP columns - Remove Contract/Key Number column from list and edit templates - Remove find_key search box and getContractList() method - Remove alarm and council xref groups and items from schema seed - Add SCREF (Stock Source Reference) to links xref group seed - Archive and git-remove Cotswold-specific templates and list_contracts.php - Clean up contact_header: remove xkey prefix, restore plain title display - Browser title now shows contact name instead of generic "Contact Information" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Migrate contact xref to liberty_xref tables; add address_postcode to schemaLester Caine2-72/+97
5.0.1 upgrade migrates contact_xref_type/source/xref data into liberty_xref_group/item/xref with content_type_guid='contact'. 5.0.2 upgrade drops the old contact_xref* tables. schema_inc.php updated for fresh installs: - Removes contact_xref, contact_xref_source, contact_xref_type tables - Adds address_postcode table (UK postcode lookup, LEFT JOIN'd in queries) - Defaults now INSERT into liberty_xref_group and liberty_xref_item directly - dependencies => 'liberty' ensures correct install ordering PHP and templates: source→item, xref_type→group rename throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Redirect contact xref admin pages to liberty equivalentsLester Caine2-57/+2
admin_contact_type.php and admin_xref_types.php now redirect to liberty/admin/admin_xref_groups.php and admin_xref_sources.php respectively, with content_type_guid=contact pre-set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Fix 5.0.2 DROPTABLE/DROPSEQUENCE array nestingLester Caine1-2/+2
Extra level of nesting caused PHP to pass an array as the table name, producing 'DROP TABLE ARRAY'. applyUpgrade iterates two levels itself. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Drop old contact_xref tables; seed liberty_xref_type/source on fresh installLester Caine2-75/+66
5.0.2 upgrade drops contact_xref, contact_xref_source, contact_xref_type and contact_xref_seq now that data lives in liberty_xref tables. schema_inc.php updated: old xref table registrations removed, registerSchemaDefault rewritten to INSERT into liberty_xref_type/source with content_type_guid='contact' and text xref_type keys ('type','contact','links','alarm','council','account'). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Migrate contact xref to liberty_xref tables; add package-owned gallery viewLester Caine1-0/+41
ContactXref and ContactXrefType become thin subclasses of their liberty counterparts, scoped to content_type_guid='contact'. load_emails.php updated to query liberty_xref. Gallery view template moved into contact package as fisheye_fixed_grid_contact.tpl (keeps fisheye clean; same pattern for future assembly/component packages). contact/admin/upgrades/5.0.1.php migrates existing contact_xref_* data into liberty_xref_* tables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18Tidy mistakes in schema, but contact_xref_seq needs checking after a new installLester Caine1-3/+2
2026-05-14php-cs-fixer tidies to php8.5 standardsLester Caine4-16/+14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2025-08-24Just a crude merging of the PHP7 code base with the PHP8.4 versionlsces5-102/+106
2016-02-07Adjust xref categorieslsces1-2/+4
This needs to be transfered to an aplication specific format on top of the basic generic set
2016-02-07Move from Smarty2 to Smarty3 function stylelsces2-2/+2
2014-05-31Additional includes for sub elements to contact recordlsces1-1/+3
2013-08-22Switch to getContactXrefTypeListlsces1-4/+3
2013-08-22Expand admin functionalitylsces1-0/+30
2012-08-06Bring in line with getDisplayUrl changeslsces1-1/+3
2012-08-06xref_source defaults expanded to include multi tag and displey style templatelsces1-31/+31
2011-03-10Add field for template type to CONTACT_XREF_SOURCE tableLester Caine1-0/+1
When loading view_xref and edit_xref are called the alternate *_xref_(template).tpl will be used
2010-12-08Add switch for single/multiple xref source selectionLester Caine1-0/+1
When xorder = 0 only one record of that type is allowed, '1' can then have additional records numbered up from that.
2010-11-03Import package again after stripping private data which should not have been ↵"Lester Caine ext:(%22)4-0/+255
commited