github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2013-07-10 08:51 pm

[dreamwidth/dw-free] 39b7b6: (Bug 215) Strip trailing whitespace in separate co...

Branch: refs/heads/develop
Home: https://github.com/dreamwidth/dw-free
Commit: 39b7b60b7aed65c4d14ed6ccabc0f341816823c4
https://github.com/dreamwidth/dw-free/commit/39b7b60b7aed65c4d14ed6ccabc0f341816823c4
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M cgi-bin/DW/Shop/Item.pm
M cgi-bin/LJ/User.pm
M doc/config-local.pl.txt
M htdocs/js/contextualhover.js

Log Message:
-----------
(Bug 215) Strip trailing whitespace in separate commit, for clarity.


Commit: e579df5f97e54d9a18251437c7f5bcd153ce64e6
https://github.com/dreamwidth/dw-free/commit/e579df5f97e54d9a18251437c7f5bcd153ce64e6
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M cgi-bin/LJ/User.pm
M htdocs/js/contextualhover.js
M htdocs/js/jquery.contextualhover.js
M htdocs/tools/endpoints/ctxpopup.bml

Log Message:
-----------
(Bug 215) Fix up code for vgift purchase in contextual hover.

This provides a valid value in the ctxpopup endpoint for the existing
can_receive_vgifts check using our can_receive_vgifts_from user method
(which won't ever be true unless vgifts are enabled in the site config,
so it can safely be used in production ahead of deployment).

The sendvgift.href (and jQuery equivalent) are updated to use the proposed
new shop URL format of /shop/vgift?user=username, instead of vgift?to=username
that LJ apparently used. This logic is encapsulated in the new user method,
$u->virtual_gift_url, and encoded in the endpoint as url_vgift.

Small logic tweaks in the can_receive_vgifts_from user method ensure that
the logged in user is a personal account, and the proposed recepient is not
a syndicated account. Also added explicit check for journal bans. This was
already being done in the shop, but in testing I realized it would still show
the option in the contextual hover menu for a banned user.

I thought about also checking for the case where the logged-in user
has banned the other user, since seeing "Send a virtual gift" right
above "Unban user" in the menu seemed odd. On further reflection, I
realized moving "Send a virtual gift" up right below "Send message"
would look less weird. But once that was done, the link begged for
more consistent grammar so I changed the message to "Send virtual gift",
removing the indefinite article.


Commit: 3a46e1145f6a88cbef47030a6a016b4ebefe99e8
https://github.com/dreamwidth/dw-free/commit/3a46e1145f6a88cbef47030a6a016b4ebefe99e8
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M cgi-bin/LJ/Global/Defaults.pm
M doc/config-local.pl.txt

Log Message:
-----------
(Bug 215) Update sample config file with syntax for enabling vgifts.

Because the cost of each vgift is set individually and stored in the database,
no pricing information is used in the config file. Instead, the presence of
the vgifts key in the %SHOP hash is what activates the feature.

The bug spec says to expire vgifts after two weeks, but this seems like the
sort of decision that various sites might wish to treat differently. So
make a new config parameter: $LJ::VGIFT_EXPIRE_DAYS (defaults to 14).

The vgift shop is obviously not ready to be turned on in production.
This syntax is being made available now to assist other developers who
are interested in testing the system as it evolves.


Commit: 3fe9358aa695dc8dbcafd64aa68ba04c42215db2
https://github.com/dreamwidth/dw-free/commit/3fe9358aa695dc8dbcafd64aa68ba04c42215db2
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M cgi-bin/DW/Shop/Item.pm

Log Message:
-----------
(Bug 215) Add a new method and fix a bug in DW::Shop::Item.

Bug fix: the "new" method was checking for userid == 0. This generated
a warning in the undef case. Conditional changed to falsehood test.

New method: from_text, plaintext equivalent of existing method from_html.
Common code refactored into _from_other helper method.

Slight behavior change: moved anonymity check to the top of the block,
so it will always print "anonymous" whether or not from_name is set.
(Not sure whether that qualifies as bugfix or new feature...)

Slight behavior change: if $from_u doesn't load, display the error.nojournal
string instead of "anonymous".


Commit: 804bf2e677ba5831d8a03267e601c11637676f50
https://github.com/dreamwidth/dw-free/commit/804bf2e677ba5831d8a03267e601c11637676f50
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M cgi-bin/DW/Shop/Item.pm

Log Message:
-----------
(Bug 215) Less negativity, as requested.


Commit: 92e7c85cad602265e21b1130b56e59e3914d7da5
https://github.com/dreamwidth/dw-free/commit/92e7c85cad602265e21b1130b56e59e3914d7da5
Author: Kareila <kareila@dreamwidth.org>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M bin/upgrading/deadphrases.dat
M bin/upgrading/en.dat
M cgi-bin/LJ/Event/Birthday.pm

Log Message:
-----------
(Bug 215) Change actions for birthday event to include vgift purchase link.

This adds a link which only appears if vgifts are enabled in the config,
similar to the behavior of the contextual menu link. However, this
link doesn't have the additional premission-checking logic of the
contextual menu link - but then again, neither do any of the other
items listed here. In this context, where we are adding actions to
a message that the system sent, I think it's fine to just do the
config check. Presumably some other part of the code is making sure
any undesirables aren't receiving these messages in the first place.

A side effect of the work here is to English-strip some code that was
not in the translation system before. I also converted a couple of
unrelated BML::ml calls to LJ::Lang::ml, for the good of the order.


Commit: f27880511efcbc932b8fc0c934ceea7784fd430a
https://github.com/dreamwidth/dw-free/commit/f27880511efcbc932b8fc0c934ceea7784fd430a
Author: Afuna <afunamatata+github@gmail.com>
Date: 2013-07-10 (Wed, 10 Jul 2013)

Changed paths:
M bin/upgrading/deadphrases.dat
M bin/upgrading/en.dat
M cgi-bin/DW/Shop/Item.pm
M cgi-bin/LJ/Event/Birthday.pm
M cgi-bin/LJ/Global/Defaults.pm
M cgi-bin/LJ/User.pm
M doc/config-local.pl.txt
M htdocs/js/contextualhover.js
M htdocs/js/jquery.contextualhover.js
M htdocs/tools/endpoints/ctxpopup.bml

Log Message:
-----------
Merge pull request #481 from kareila/bug0215-submitted

Bug 215 - contextual menu bits


Compare: https://github.com/dreamwidth/dw-free/compare/664028f83cf3...f27880511efc