[dreamwidth/dw-free] 9d6bba: new error templates for suspended and purged users
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 9d6bba0d784d2ee986a9c2099705c414140ce739
https://github.com/dreamwidth/dw-free/commit/9d6bba0d784d2ee986a9c2099705c414140ce739
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Template/Plugin.pm
A views/error/purged.tt
A views/error/suspended.tt
Log Message:
-----------
new error templates for suspended and purged users
To be used by journal-related pages when trying to display information for a user that has been deleted and purged or a user that has been suspended for misconduct.
This also adds a dw.request_status function for templates to use, so that the caller doesn't have to remember to set the correct status explicitly.
(I don't know if the long garbage comments are still best practice, but I saw they were present in views/error/404.tt, so I emulated that.)
Commit: 430c6a6d6304285d79ec0cbd483e6978b30e3dba
https://github.com/dreamwidth/dw-free/commit/430c6a6d6304285d79ec0cbd483e6978b30e3dba
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
helper function _profile_ml for DW/Logic/ProfilePage.pm
The profile.bml page uses BML::set_language_scope( '/profile.bml' ) to allow locally scoped strings in other modules to resolve correctly. This hack won't work when we transfer the page to templates, so this change makes the language scope explicit for each local string, with one line to change when switching over to the new context.
Commit: 8e6e26f6d18cb37d41d1f3a1bd505969265a5ef1
https://github.com/dreamwidth/dw-free/commit/8e6e26f6d18cb37d41d1f3a1bd505969265a5ef1
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M bin/upgrading/deadphrases.dat
M cgi-bin/DW/Logic/ProfilePage.pm
M htdocs/profile.bml.text
A views/profile/logic.tt.text
Log Message:
-----------
move Logic/ProfilePage strings from profile.bml.text to profile/logic.tt.text
Commit: 3500b221c0a33257efb9f25ec26ecf79de730bff
https://github.com/dreamwidth/dw-free/commit/3500b221c0a33257efb9f25ec26ecf79de730bff
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M bin/upgrading/deadphrases.dat
M htdocs/profile.bml.text
Log Message:
-----------
deadphrase unused profile.bml.text strings
Commit: d9f5a87aaf788a813e3cbc40b75bc947a364c0e1
https://github.com/dreamwidth/dw-free/commit/d9f5a87aaf788a813e3cbc40b75bc947a364c0e1
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
additional Logic/ProfilePage methods for templates
Many user methods return a list of userids that the template will try to interpret as a list reference, but not always successfully:
- List containing one element -> variable set to that element.
- List containing no elements -> variable set to the empty string.
Using the .list TT method fixes the first problem but not the second; a null result will still be the empty string and not an empty list.
The cleanest solution is to stub replacement methods in ProfilePage that return list references instead of lists. We were already using ProfilePage for the profile-specific userid lists such as not_mutually_watched_userids, which will also be updated to return list references in a later commit.
Commit: a418a4d4a216eddf384290c6f8dce60ba25cfa32
https://github.com/dreamwidth/dw-free/commit/a418a4d4a216eddf384290c6f8dce60ba25cfa32
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
add a few more Logic/ProfilePage userid convenience methods
Because no one wants to deal directly with load_rel_user_cache et al.
Commit: 86d1e8b89eec042b9e25088d9b8acb4d0e70fc34
https://github.com/dreamwidth/dw-free/commit/86d1e8b89eec042b9e25088d9b8acb4d0e70fc34
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
M htdocs/profile.bml
Log Message:
-----------
update the legacy ProfilePage methods to return listrefs instead of lists
Going to go ahead and include this as a separate commit to clarify the impact.
Also adds a preload_props to external_services because there are 26 now.
Commit: c037cae2810cdf27c2bb6c607a54a7c3afff8c93
https://github.com/dreamwidth/dw-free/commit/c037cae2810cdf27c2bb6c607a54a7c3afff8c93
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M views/error/404.tt
M views/error/purged.tt
M views/error/suspended.tt
Log Message:
-----------
remove garbage padding comments from templates in views/error
These are only needed if the total page source is less than 512 bytes, to prevent the content from being overridden by the browser. Since these are rendered with site scheme, they are well over the 512 byte threshold.
Compare: https://github.com/dreamwidth/dw-free/compare/7d7811c77155...c037cae2810c
Home: https://github.com/dreamwidth/dw-free
Commit: 9d6bba0d784d2ee986a9c2099705c414140ce739
https://github.com/dreamwidth/dw-free/commit/9d6bba0d784d2ee986a9c2099705c414140ce739
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Template/Plugin.pm
A views/error/purged.tt
A views/error/suspended.tt
Log Message:
-----------
new error templates for suspended and purged users
To be used by journal-related pages when trying to display information for a user that has been deleted and purged or a user that has been suspended for misconduct.
This also adds a dw.request_status function for templates to use, so that the caller doesn't have to remember to set the correct status explicitly.
(I don't know if the long garbage comments are still best practice, but I saw they were present in views/error/404.tt, so I emulated that.)
Commit: 430c6a6d6304285d79ec0cbd483e6978b30e3dba
https://github.com/dreamwidth/dw-free/commit/430c6a6d6304285d79ec0cbd483e6978b30e3dba
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
helper function _profile_ml for DW/Logic/ProfilePage.pm
The profile.bml page uses BML::set_language_scope( '/profile.bml' ) to allow locally scoped strings in other modules to resolve correctly. This hack won't work when we transfer the page to templates, so this change makes the language scope explicit for each local string, with one line to change when switching over to the new context.
Commit: 8e6e26f6d18cb37d41d1f3a1bd505969265a5ef1
https://github.com/dreamwidth/dw-free/commit/8e6e26f6d18cb37d41d1f3a1bd505969265a5ef1
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M bin/upgrading/deadphrases.dat
M cgi-bin/DW/Logic/ProfilePage.pm
M htdocs/profile.bml.text
A views/profile/logic.tt.text
Log Message:
-----------
move Logic/ProfilePage strings from profile.bml.text to profile/logic.tt.text
Commit: 3500b221c0a33257efb9f25ec26ecf79de730bff
https://github.com/dreamwidth/dw-free/commit/3500b221c0a33257efb9f25ec26ecf79de730bff
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M bin/upgrading/deadphrases.dat
M htdocs/profile.bml.text
Log Message:
-----------
deadphrase unused profile.bml.text strings
Commit: d9f5a87aaf788a813e3cbc40b75bc947a364c0e1
https://github.com/dreamwidth/dw-free/commit/d9f5a87aaf788a813e3cbc40b75bc947a364c0e1
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
additional Logic/ProfilePage methods for templates
Many user methods return a list of userids that the template will try to interpret as a list reference, but not always successfully:
- List containing one element -> variable set to that element.
- List containing no elements -> variable set to the empty string.
Using the .list TT method fixes the first problem but not the second; a null result will still be the empty string and not an empty list.
The cleanest solution is to stub replacement methods in ProfilePage that return list references instead of lists. We were already using ProfilePage for the profile-specific userid lists such as not_mutually_watched_userids, which will also be updated to return list references in a later commit.
Commit: a418a4d4a216eddf384290c6f8dce60ba25cfa32
https://github.com/dreamwidth/dw-free/commit/a418a4d4a216eddf384290c6f8dce60ba25cfa32
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
Log Message:
-----------
add a few more Logic/ProfilePage userid convenience methods
Because no one wants to deal directly with load_rel_user_cache et al.
Commit: 86d1e8b89eec042b9e25088d9b8acb4d0e70fc34
https://github.com/dreamwidth/dw-free/commit/86d1e8b89eec042b9e25088d9b8acb4d0e70fc34
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M cgi-bin/DW/Logic/ProfilePage.pm
M htdocs/profile.bml
Log Message:
-----------
update the legacy ProfilePage methods to return listrefs instead of lists
Going to go ahead and include this as a separate commit to clarify the impact.
Also adds a preload_props to external_services because there are 26 now.
Commit: c037cae2810cdf27c2bb6c607a54a7c3afff8c93
https://github.com/dreamwidth/dw-free/commit/c037cae2810cdf27c2bb6c607a54a7c3afff8c93
Author: Kareila <kareila@dreamwidth.org>
Date: 2020-07-25 (Sat, 25 Jul 2020)
Changed paths:
M views/error/404.tt
M views/error/purged.tt
M views/error/suspended.tt
Log Message:
-----------
remove garbage padding comments from templates in views/error
These are only needed if the total page source is less than 512 bytes, to prevent the content from being overridden by the browser. Since these are rendered with site scheme, they are well over the 512 byte threshold.
Compare: https://github.com/dreamwidth/dw-free/compare/7d7811c77155...c037cae2810c