afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-08-03 03:14 pm

[dw-free] remove "lj-replace first post"

[commit: http://hg.dwscoalition.org/dw-free/rev/db8ab31f7439]

http://bugs.dwscoalition.org/show_bug.cgi?id=1536

Cleanup.

Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/cleanhtml.pl
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r d6311b1a1156 -r db8ab31f7439 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Mon Aug 03 15:10:09 2009 +0000
+++ b/bin/upgrading/en.dat	Mon Aug 03 15:13:59 2009 +0000
@@ -3859,10 +3859,6 @@ web.controlstrip.userpic.alt=Userpic
 
 web.controlstrip.userpic.title=Edit Userpics
 
-web.lj-replace.first_post=Your journal currently has no entries. Start by <a [[update_link]]>Posting an Entry</a>.
-
-web.lj-replace.first_post.subject=Welcome to [[sitename]]
-
 web.postto.btn=Switch
 
 web.postto.label=Post to:
diff -r d6311b1a1156 -r db8ab31f7439 cgi-bin/cleanhtml.pl
--- a/cgi-bin/cleanhtml.pl	Mon Aug 03 15:10:09 2009 +0000
+++ b/cgi-bin/cleanhtml.pl	Mon Aug 03 15:13:59 2009 +0000
@@ -308,14 +308,6 @@ sub clean
                     # capture and send content to hook
                     $start_capture->("lj-template", $token, $run_template_hook);
                 }
-                next TOKEN;
-            }
-
-            if ($tag eq "lj-replace") {
-                my $name = $attr->{name} || "";
-                my $replace = ($name =~ /^\w+$/) ? LJ::lj_replace($name, $attr) : undef;
-                $newdata .= defined $replace ? $replace : "<b>[Error: unknown lj-replace key '" . LJ::ehtml($name) . "']</b>";
-
                 next TOKEN;
             }
 
diff -r d6311b1a1156 -r db8ab31f7439 cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Mon Aug 03 15:10:09 2009 +0000
+++ b/cgi-bin/weblib.pl	Mon Aug 03 15:13:59 2009 +0000
@@ -3476,36 +3476,6 @@ sub placeholder_link {
         };
 }
 
-# Returns replacement for lj-replace tags
-sub lj_replace {
-    my $key = shift;
-    my $attr = shift;
-
-    # Return hook if hook output not undef
-    if (LJ::are_hooks("lj-replace_$key")) {
-        my $replace = LJ::run_hook("lj-replace_$key");
-        return $replace if defined $replace;
-    }
-
-    # Return value of coderef if key defined
-    my %valid_keys = ( 'first_post' => \&lj_replace_first_post );
-
-    if (my $cb = $valid_keys{$key}) {
-        die "$cb is not a valid coderef" unless ref $cb eq 'CODE';
-        return $cb->($attr);
-    }
-
-    return undef;
-}
-
-# Replace for lj-replace name="first_post"
-sub lj_replace_first_post {
-    return unless LJ::is_web_context();
-    return BML::ml('web.lj-replace.first_post', {
-                   'update_link' => "href='$LJ::SITEROOT/update.bml'",
-                   });
-}
-
 # this returns the right max length for a VARCHAR(255) database
 # column.  but in HTML, the maxlength is characters, not bytes, so we
 # have to assume 3-byte chars and return 80 instead of 255.  (80*3 ==
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org