2 Commits
Author SHA1 Message Date
TheWitness 7b551eea72 chore: normalize CRLF line endings to LF across Cacti-owned files (#8156)
Excludes vendored packages, third-party JS, patches, and the Win32 probe fixture. Pure EOL change; guards pass and php -l is clean.
2026-10-02 17:22:42 -04:00
TheWitness 462a637367 fix: accept scalar or array primary in api_plugin_db_table_create() (#8124)
* fix: accept scalar or array primary in api_plugin_db_table_create()

api_plugin_db_table_create() inline-interpolated $data['primary'] as a string,
so a plugin passing an array primary produced PRIMARY KEY (`Array`) and table
creation failed on a fresh install. Route the primary through
db_format_index_create() (already used for the keys just below), which accepts
either a scalar column name (the legacy string form, required for backward
compatibility) or an array of columns -- matching db_table_create() and
db_update_table().

* tests: cover scalar and array/composite primary DDL in api_plugin_db_table_create()
2026-10-01 00:02:25 -05:00