Update of /cvs/scoop/scoop/lib/Scoop/Admin
In directory lithium.sabren.com:/tmp/cvs-serv16309/lib/Scoop/Admin
Modified Files:
EditBoxes.pm
Log Message:
Omnibus AZ patch:
* Adds new signup method where user chooses their own password. This has worked a lot better than the old way for us, and is much easier
for inexperienced users. For people upgrading, you'll need to edit a bunch of user-related blocks, most notably changing new_user_email
and adding a box call to new_user_html. Some instructions are with the control var "signup_with_password"
* Adds flexible date formatting with the vars date_format_default, date_format_short, and date_format_wmd
* Adds user signup IP tracking. Very handy for tracking down dupe accounts and persistent trolls.
Index: EditBoxes.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin/EditBoxes.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** EditBoxes.pm 30 Jul 2004 08:12:56 -0000 1.11
--- EditBoxes.pm 25 Jan 2005 17:15:24 -0000 1.12
***************
*** 93,110 ****
$formData->{admin_boxes_content} = $box_data->{content};
$formData->{admin_boxes_choose_checked} = $box_data->{user_choose} ? "CHECKED" : "";
! if ($write) {
! $formData->{admin_boxes_content} =~ s/\|/%%/g;
! $formData->{admin_boxes_content} =~ s/\\%%/\|/g;
! }
! # Why was this conditional?
! #if ($get) {
! $formData->{admin_boxes_content} =~ s/\|/\\|/g;
! $formData->{admin_boxes_content} =~ s/%%/|/g;
! $formData->{admin_boxes_content} =~ s/&/&/g;
! $formData->{admin_boxes_content} =~ s/</&lt;/g;
! $formData->{admin_boxes_content} =~ s/>/&gt;/g;
! $formData->{admin_boxes_content} =~ s/ /&nbsp;/g;
! $formData->{admin_boxes_title} =~ s/"/"/g;
! #}
$formData->{admin_boxes_content} =~ s/</</g;
$formData->{admin_boxes_content} =~ s/>/>/g;
--- 93,119 ----
$formData->{admin_boxes_content} = $box_data->{content};
$formData->{admin_boxes_choose_checked} = $box_data->{user_choose} ? "CHECKED" : "";
!
! # NOTE: This is the location of a bug in the box editor that has
! # been fixed and re-inserted more times than I can even count.
! # DO NOT TOUCH THIS CODE. Seriously. If we have to fix this one more time
! # there is going to be news of a massive cranial explosion
! # somewhere off the coast of Maine.
! #
! # The key fact is that in _write_box_page() below, the contents of the box
! # have already been munged for pipes and escaped pipes. So it's coming back
! # to us just like it is in the DB, regardless of whether this is a get or a save.
! #
! # If that didn't make sense, don't worry about it. Just know that it works, and if
! # you think it needs more fixing, you are wrong.
! #
! $formData->{admin_boxes_content} =~ s/\|/\\|/g;
! $formData->{admin_boxes_content} =~ s/%%/|/g;
! $formData->{admin_boxes_content} =~ s/&/&amp;/g;
! $formData->{admin_boxes_content} =~ s/</&lt;/g;
! $formData->{admin_boxes_content} =~ s/>/&gt;/g;
! $formData->{admin_boxes_content} =~ s/ /&nbsp;/g;
! $formData->{admin_boxes_title} =~ s/"/"/g;
! # Ok, that's all. You may now resume your regularly scheduled hacking.
!
$formData->{admin_boxes_content} =~ s/</</g;
$formData->{admin_boxes_content} =~ s/>/>/g;