summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-06-08LibertyXref: guard xorder against null when item not in liberty_xref_itemLester Caine1-1/+1
(int) cast on $next prevents NULL overwriting the default xorder=0 when fAddXref is used for an item type that has no liberty_xref_item row. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07LibertyXrefInfo/LibertyXrefGroup: optional package-level guid supportLester Caine7-14/+33
Adds optional $packageGuid parameter to both constructors. When set, the liberty_xref_group and liberty_xref_item queries use IN (type, pkg) instead of = type, allowing package-level rows to be shared across multiple content types (e.g. 'stock' shared by stockassembly and stockcomponent). Also removes duplicate ipackage attributes from templates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06liberty: fix null mUserId in LibertyXrefType JOIN conditionsLester Caine1-4/+4
Same pattern as contact: direct mUserId string interpolation produces 'purm.user_id=' with no value for anonymous users (null mUserId), causing Firebird -104 Token unknown. Four occurrences fixed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06LibertyBase: replace placeholder with architecture docblock; tighten factory ↵Lester Caine1-30/+43
method docs Class docblock explains the intermediate role between BitBase and LibertyContent, and documents getLibertyObject() as the canonical entry point for loading any content by content_id. Factory method docblocks updated: getLibertyObject() resolution order, getLibertyClass() use case, getNewObject/ById() override intent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06xref: migrate query methods to LibertyXrefType; docblocks throughoutLester Caine6-229/+682
LibertyXrefType gains five runtime statics (getDisplayGroups, getTypeMarkers, getAvailableItems, getTemplateFormats, getContentTypeMarkers) — role-filtered, content-type-scoped. LibertyContent xref query methods become one-line delegates. LibertyXrefInfo added as new class (was missing from repo). Docblocks added to LibertyContent class, LibertyXref, LibertyXrefGroup, LibertyXrefInfo, LibertyXrefType. list_xref.tpl: remove dead legacy $source path; new path only. loadXrefList() removed from LibertyContent (stock fully migrated). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06xref item templates: replace $source eq/ne 'history' with $isHistoryLester Caine9-101/+101
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06list_xref.tpl: remove fixed column widthsLester Caine1-6/+6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06list_xref.tpl: fix legacy path headers to Type/Value/NotesLester Caine1-2/+2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06list_xref.tpl: add class="table" for full-width tab renderingLester Caine1-4/+4
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06xref group templates: drop Link column; tighten text item edit gatingLester Caine3-31/+153
- list_xref.tpl: remove dead Link <th>; add 30/30/40% column widths; fix colspan to conditional 6/3; support both LibertyXrefGroup and legacy $source paths - view_xref_text_item.tpl: remove &nbsp; Link cell; wrap date/updated/ edit cells under single {if $xrefAllowEdit|default:false} - LibertyXrefGroup: new class — loads xref rows for one x_group, separates expired rows into history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06liberty_xref.xorder: add DEFAULT 0 NOTNULL constraintLester Caine1-1/+1
Prevents NULL xorder from import paths that omit the column, which causes the CASE expression building xref_title to return NULL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Switch icons: document-properties → edit, text-x-generic → view-list-textLester Caine13-22/+22
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05Switch delete icon from edit-delete to user-trash (dustbin)Lester Caine16-17/+17
user-trash updated to a proper dustbin SVG. All templates across all packages updated to use user-trash instead of edit-delete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04Switch attachment icon from mail-attachment to stock_attachLester Caine1-1/+1
stock_attach (paperclip) is available as PNG (16px) and SVG (scalable), making it a cleaner fit for attach/assign/crosspost contexts than the mail-specific mail-attachment icon. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04Convert {booticon} to {biticon} — freedesktop/tango icon names throughoutLester Caine33-63/+63
Replace all {booticon iname="icon-*"} and {booticon iname="fa-*"} calls with {biticon ipackage="icons" iname="<freedesktop-name>"} using the tango iconset. Mapping covers ~70 distinct old names to tango equivalents (edit-delete, document-properties, go-next, lock, internet-mail, etc.). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02add_xref.tpl: add Extended Value (xkey_ext) field between xkey and NoteLester Caine1-0/+7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02add_xref.tpl: use xkey for Value, add Note (edit), drop Linked Content IDLester Caine1-5/+4
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02mime_pdf_update: add reload_pdf branch for non-upload text re-extractionLester Caine1-2/+10
When source_file is already in pStoreRow (e.g. called from a non-fisheye context with reload_pdf set), re-extract the text layer without replacing the stored file. Fisheye handles this via edit_image.php directly; this branch covers other call sites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Tidy Imagick usage in processor and mime.pdf pluginsLester Caine2-3/+4
processor.imagick: ImagickPixel('none') explicit colour, add clear() to rotate mime.pdf: fix dest_branch absolute path in regenerate case — strip STORAGE_PKG_PATH and ensure trailing slash before passing to liberty_generate_thumbnails Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Fix deprecated Imagick calls in mime_pdf_thumbnailLester Caine1-2/+2
flattenImages() -> mergeImageLayers(LAYERMETHOD_FLATTEN) destroy() -> clear() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02Fix PDF plugin admin form — button name was settings_store, PHP checks ↵Lester Caine1-1/+1
plugin_settings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01Fix PDF thumbnail generation — fire on upload even when source_file not ↵Lester Caine1-2/+2
yet set mime_default_update/store don't set top-level source_file; mime_pdf_thumbnail already handles the upload hash directly, so the guard just needs to also trigger when upload is present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01Guard null pFileHash type in preg_match/preg_split calls — PHP 8.x deprecationLester Caine1-3/+3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01Remove pbase/pdfx plugin — facilities moved into mime.pdfLester Caine3-134/+0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31list_xref.tpl: gate date and edit column headers on xrefAllowEditLester Caine1-6/+8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30Fix xref role guard and add xorder to loadXrefList SELECTLester Caine1-6/+6
Guard mRoles against null in all xref query methods to prevent TypeError and Firebird empty IN() syntax error for unauthenticated users; fall back to [-1] so the IN() clause is valid but matches nothing. Also add x.xorder to the SELECT in loadXrefList() so xorder values are available in fetched row data for sorting and display. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29Fix cross-package _record.tpl references; remove key_seal templateLester Caine3-3/+2
- view_xref_image_item.tpl, view_xref_inc_report_item.tpl: update includes to use renamed contact _item.tpl templates - Remove view_xref_key_seal_item.tpl — key_seal code dropped Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29Add enrichXrefDisplay hook and xkey_ext to value edit templateLester Caine3-0/+11
- LibertyContent: add enrichXrefDisplay() no-op hook; call it in edit_xref.php so packages can inject display-only data (e.g. component title) into xrefInfo - edit_xref_value_item.tpl: add Notes (xkey_ext) field alongside Value (xkey) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29Standardise xref templates to _item naming; add value and group templatesLester Caine15-13/+97
- Rename all view_xref_*_record.tpl → view_xref_*_item.tpl throughout - LibertyContent: getXrefRecordTemplate/ListTemplate/EditTemplate use _item naming with three-level fallback (pkg/guid subdir → pkg root → liberty); getXrefRecordTemplate falls back to text_item if template file not found; getXrefEditTemplate checks liberty _item before generic edit_xref.tpl - list_xref.tpl: assign _rowTpl before method call to avoid Smarty section variable resolution issue inside PHP method call arguments - New templates: view_xref_value_item.tpl, edit_xref_value_item.tpl for simple numeric xref items (xkey field, not data) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29BOM parts list support: xref template dispatch and LibertyXref fixesLester Caine5-10/+50
- LibertyContent: add getXrefListTemplate(), getXrefRecordTemplate(), getXrefEditTemplate() for package-aware template dispatch with liberty fallback - LibertyXref: explicit xorder passthrough in verify(); fix start_date/end_date to use time() instead of mDb->NOW() so BitDate::date() receives a timestamp - add_xref.php, edit_xref.php: redirect to getEditUrl() after save/cancel - list_xref.tpl: use getXrefRecordTemplate() instead of hardcoded liberty path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27Allow xref tabs to suppress edit/delete buttons via allow_edit=falseLester Caine9-17/+18
list_xref.tpl: accept allow_edit param; assign $xrefAllowEdit for record templates; hide Edit column header when allow_edit is false. view_xref_*_record.tpl (8 files): gate hasUpdatePermission and hasExpungePermission checks on $xrefAllowEdit|default:true so callers can render xref data read-only without altering user permissions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27Fix LibertyXref: public mContentTypeGuid, format dates for FirebirdLester Caine1-5/+5
- Make mContentTypeGuid public so LibertyContent::storeXref() can set it on a fresh LibertyXref instance - Format start_date/end_date Unix timestamps as Y-m-d H:i:s UTC strings before INSERT; Firebird rejects raw integers for TIMESTAMP columns - Use null instead of empty string for ignored date fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add liberty_xref cleanup to LibertyContent::expunge()Lester Caine1-0/+4
liberty_xref rows are owned by content_id but were never deleted during expunge, leaving orphaned xref records whenever any content type was deleted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Fix stale column name source → item in getXrefTypeList num_entries queryLester Caine1-2/+2
liberty_xref.source was renamed to item; the count query in getXrefTypeList still referenced the old name causing a fatal error on the admin xref sources page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add liberty_xref subsystem: package-agnostic typed cross-referencesLester Caine14-118/+124
Replaces per-package xref tables with three shared liberty tables: liberty_xref_group (tab groups), liberty_xref_item (source definitions), liberty_xref (records). Column names: group→x_group (Firebird reserved word), source→item, multi→multiple throughout PHP classes and templates. - 5.0.1 upgrade creates the three tables + sequence + indexes for existing installs - schema_inc.php updated so fresh installs also get the tables - Admin UI: admin_xref_groups and admin_xref_sources pages with package filter - LibertyContent::loadXrefList / getXrefGroupList / getXrefTypeList updated - LibertyMime: skip attachment rendering during BIT_INSTALL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25Add bridge templates for contact-specific xref record typesLester Caine3-0/+3
Thin bridge templates that delegate to the contact package for key_seal, inc_report and image record types — allows liberty's generic list_xref.tpl to render these without duplicating logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25Add generic xref record templates and sub-template rendering to libertyLester Caine10-24/+251
list_xref.tpl now uses 7-column layout (Type/Link/Key/Value/Date/Updated/ Edit) and delegates row rendering to view_xref_{template}_record.tpl, matching the template name stored in liberty_xref_source. Eight generic record templates added (text, contact, phone, address, date, bank, sig, locate) using hasUpdatePermission()/hasExpungePermission() throughout. edit_xref.php gains expunge/stepXref handling for Delete and Restore actions, with permission checks scoped per action branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25list_xref: fix icon, add allow_add guard, remove debug commentLester Caine1-2/+2
Use icon-note-add to match contact package. Add button now requires allow_add=true (passed by edit templates only), isValid(), and hasUpdatePermission() — so it never appears on view pages or new content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25Add generic xref controllers and templates to libertyLester Caine5-0/+239
Moves add/edit xref pages out of stock into liberty so any content type can use them. list_xref.tpl uses hasUpdatePermission() instead of a stock-specific permission check. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25mime.video: fix update returning false when no new uploadlive-2026-05-25Lester Caine1-1/+1
mime_video_update defaulted $ret=false and only set it true when a new file was uploaded or aspect meta was present. Saving an image edit page with an existing video attachment and no new upload always triggered "There was a problem updating the file settings". Changed default to true to match mime_image_update which does the same. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25mime.video: drop hardcoded 60s offset, use default throughoutLester Caine1-2/+2
Store and update paths were explicitly passing 60s offset to mime_video_create_thumbnail — clips shorter than that would cause the ffmpeg fallback to seek past end-of-file and produce nothing. Now all call sites use the 5s default set in the previous commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25mime.video: add timeout guards and fix short-video offsetLester Caine1-6/+5
- Wrap ffmpegthumbnailer and ffmpeg shell_exec calls with timeout 60 so a hung process doesn't stall gallery-level thumbnail regeneration - Drop $pOffset default from 60s to 5s so the ffmpeg fallback works for clips shorter than one minute Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Add generic xref group/source admin pages to libertyLester Caine6-0/+397
LibertyXrefType: add getContentTypeGuids() and getGroupList() static methods. New admin pages with package filter (session-persisted content_type_guid dropdown): admin_xref_groups.php manages liberty_xref_type rows; admin_xref_sources.php manages liberty_xref_source rows. Both support add and delete (delete guarded by entry/source count). Wired into menu_liberty_admin.tpl as Xref Groups / Xref Sources links. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Add generic xref methods to LibertyContentLester Caine1-0/+217
Moves xref handling up from Contact so any LibertyContent subclass can use liberty_xref_type/source/xref tables scoped to its own content_type_guid. Added: getXrefGroupList, getXrefSourceList, getXrefTypeList, getXrefFormatList, loadXrefTypeList (uses protected $mXrefTypeKey, default 'xref_types'), loadXrefList, loadXref, storeXref, stepXref. loadXref/storeXref/stepXref use LibertyXref directly with mContentTypeGuid set before load. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Add mContentTypeGuid scoping to LibertyXref for multi-package isolationLester Caine2-7/+12
LibertyXref gains a $mContentTypeGuid property (default empty) used to filter the liberty_xref_source JOIN in load() and the multi-check in verify(). Subclasses set it to scope queries to their content type without duplicating any logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Add liberty_xref package-agnostic cross-reference mechanismLester Caine4-0/+333
New tables: liberty_xref_type (text PK, package, sort_order), liberty_xref_source (package column for direct equality filtering), liberty_xref (data rows keyed by content_id, works for any package). Sequence liberty_xref_seq and indices on content_id and package columns. LibertyXref and LibertyXrefType classes provide the full store/load/step mechanism. Contact and stock register their own source types against the shared tables. Upgrade script 5.0.1.php creates the tables on existing installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21Replace broken video.js player with native HTML5 video elementLester Caine1-9/+3
video.js was loading from the unbuilt source directory and required Flash-era IE workarounds no longer needed. Native <video> with controls handles playback in all modern browsers. MIME type now taken from attachment data rather than hardcoded as video/mp4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21Clean up temp pdftotext .txt file after text extractionLester Caine1-0/+1
The extracted .txt file was left in the upload directory after file_get_contents(). Added unlink() to remove it immediately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21Replace dead magick CLI call in mime_pdf_thumbnail with PHP imagickLester Caine1-34/+35
shell_exec('which magick') was dead since magick CLI was removed in favour of the PHP imagick extension. Rewritten to use \Imagick directly to rasterise the first page of a PDF to JPEG before passing to liberty_generate_thumbnails. Thumbnail sizes now inherited from global $gThumbSizes via liberty_generate_thumbnails rather than hardcoded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21Fix addHit() race condition and stuck Firebird transactionLester Caine1-10/+8
Replaced SELECT-then-INSERT/UPDATE with UPDATE-first pattern: attempt UPDATE and only INSERT if zero rows were affected. Eliminates the race window where two concurrent requests both see no row and both try to INSERT, which left an uncommitted Firebird transaction blocking reads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>