[dreamwidth/dw-free] f097f5: Remove dead code in quickreply
Branch: refs/heads/master Home: https://github.com/dreamwidth/dw-free Commit: f097f586fd285f45dcb4eb1d8068943c2df3d81c https://github.com/dreamwidth/dw-free/commit/f097f586fd285f45dcb4eb1d8068943c2df3d81c Author: Nick Fagerlund nick.fagerlund@gmail.com Date: 2021-01-31 (Sun, 31 Jan 2021)
Changed paths: M cgi-bin/LJ/Web.pm
Log Message:
Remove dead code in quickreply
The templates grab that icons list directly now, we no longer pass it.
Commit: bd762c1606d1f19fbd81d18336de3cde3a234537 https://github.com/dreamwidth/dw-free/commit/bd762c1606d1f19fbd81d18336de3cde3a234537 Author: Nick Fagerlund nick.fagerlund@gmail.com Date: 2021-01-31 (Sun, 31 Jan 2021)
Changed paths: M cgi-bin/LJ/User/Icons.pm M t/userpic-keyword-select.t M views/components/icon-select-icon.tt
Log Message:
Make $user->icon_keyword_menu return arrayref instead of list
This function is now mostly called from templates, and TT has an odd behavior
with functions that return lists: if it's a multi-item list, it converts it to
an arrayref, but empty or single-value lists seem to become scalars... which
means calling virtual methods like .size won't work as expected, and you get
errors like va-web03: Argument "" isn't numeric in numeric gt (>) at
/home/dw/production/views/components/icon-select-icon.tt line 25.
The answer is to stop relying on auto-referencing and just always return an arrayref.
Commit: a13d5d4eb04f7c1d548eca92a92699c8e877a528 https://github.com/dreamwidth/dw-free/commit/a13d5d4eb04f7c1d548eca92a92699c8e877a528 Author: Nick Fagerlund nick.fagerlund@gmail.com Date: 2021-01-31 (Sun, 31 Jan 2021)
Changed paths: M t/userpic-keyword-select.t
Log Message:
Remove incoherent+busted test
This just explodes instead of running the rest of the tests, because it's now a method on user objects instead of a standalone function that takes a user.
Compare: https://github.com/dreamwidth/dw-free/compare/a8f0f456f4de...a13d5d4eb04f