Skip to content

Fix value type check for select page value fields - #1355

Closed
Shocker wants to merge 1 commit into
vrana:mainfrom
Shocker:value-check
Closed

Shocker wants to merge 1 commit into
vrana:mainfrom
Shocker:value-check

Conversation

@Shocker

@Shocker Shocker commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Not sure what's the actual intention in the current code logic regarding values updates through select_value() plugins: to check if the modified value is numeric (current), or if the original value is numeric (proposed)? Plugins may transform 123 to <font ...>123</font> which works with current code but it may also transform it to 123 (some additional info) which doesn't work with current code. Or maybe check both modified and original values and allow any to be numeric??

@vrana

vrana commented Oct 6, 2026

Copy link
Copy Markdown
Owner

123 (some additional info) shouldn't be aligned right, only actual numbers should.

What exactly is your use case?

@vrana vrana closed this Oct 6, 2026
@Shocker

Shocker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Mostly for https://github.com/dungsaga/adminer-plugins/blob/main/color-for-column-type.php, wanted to highlight actual numbers fields regardless of their final, modified values. Useful when modifying values on the fly (ctrl+click) without double-checking the table structure

@vrana

vrana commented Oct 6, 2026

Copy link
Copy Markdown
Owner

class='number' means the cell is displayed as a number and should be aligned right. A description (Editor foreign keys, plugin select-foreign), Editor's yes/no for tinyint(1) or 123 (some additional info) is in a numeric column but isn't displayed as a number, and this change would align it right. color-for-column-type uses the class as a type marker instead. It could add its own class by the column type, like it already does for enum and datetime. Then the color doesn't depend on how another plugin formats the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants