github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2022-10-22 10:37 am

[dreamwidth/dreamwidth] 9ce23e: fix up /tools/tellafriend (#2993)

Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: 9ce23e63d40bd7008e98b83baef5a13f44e52c47 https://github.com/dreamwidth/dreamwidth/commit/9ce23e63d40bd7008e98b83baef5a13f44e52c47 Author: Jen kareila@dreamwidth.org Date: 2022-10-22 (Sat, 22 Oct 2022)

Changed paths: M bin/upgrading/deadphrases.dat M cgi-bin/DW/Controller/Tools.pm M cgi-bin/DW/Widget/LatestNews.pm M htdocs/robots.txt R htdocs/tools/tellafriend.bml R htdocs/tools/tellafriend.bml.text M views/tools/tellafriend.tt M views/tools/tellafriend.tt.text

Log Message:


fix up /tools/tellafriend (#2993)

  • tellafriend fixup pt 1

  • The "forbiddenimages" string in the regex looked like a copy-paste error. This is the regex in the original BML.

  • Assign an empty string to $msg so we don't get warnings about concatenating to an undefined variable.

  • tellafriend fixup pt 2

  • The main problem here is that the template was trying to call "form" methods as "dw" methods that didn't exist.

  • Removed HTML table elements.

  • Turned off Foundation styling because it made the page look weird. More work for another day.

  • A few other typo fixes and regressions to the original BML.

  • remove BML

  • [#1866] site text improvements

It was bugging the stew out of me that this hadn't been updated to use $LJ::NEWS_JOURNAL so I did that. I also changed the bits of boilerplate text that I complained about in #1866, and made the textarea a bit wider.

  • bug in LatestNews widget on logged-in homepage

Obscure, but I just ran into this in testing: if you set $LJ::NEWS_JOURNAL to a valid community but it doesn't have any entries yet, the widget will bomb out with a missing anum error.

This adds a validity check to the entry object before attempting to do anything with it.

  • [#1866] disallow /tools/tellafriend in robots.txt

As I mentioned in #1866, this page gets a lot of crawler traffic because it's linked on every journal and entry. Adding it here should tell well-behaved bots to ignore it.