Remove module inherited from LJ, which makes links to Vox users display
specially.
Patch by denise.
diffs (75 lines):
diff -r 3433520d1576 -r b590dd2b0348 cgi-bin/LJ/ExternalSite/Vox.pm
--- a/cgi-bin/LJ/ExternalSite/Vox.pm Sun Nov 08 15:58:26 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-package LJ::ExternalSite::Vox;
-use strict;
-use warnings;
-use base 'LJ::ExternalSite';
-
-sub new {
- my ($class, $hostport) = @_;
- $hostport ||= "vox.com"; # by default, the main vox site
- my $self = bless {
- host => lc($hostport),
- }, $class;
- return $self;
-}
-
-sub matches_url {
- my ($self, $url) = @_;
- return 0 unless $url =~
m!^(?:http://)?([a-z][a-z0-9\-]{0,63})\.\Q$self->{host}\E/?$!i;
- return "http://" . lc($1) . "." . $self->{host} . "/";
-}
-
-sub icon_url {
- return "$LJ::IMGPREFIX/vox.gif";
-}
-
-1;
diff -r 3433520d1576 -r b590dd2b0348 cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl Sun Nov 08 15:58:26 2009 +0000
+++ b/cgi-bin/ljlib.pl Sun Nov 08 16:09:20 2009 +0000
@@ -38,7 +38,6 @@ use LJ::Comment;
use LJ::Comment;
use LJ::Config;
use LJ::ExternalSite;
-use LJ::ExternalSite::Vox;
use LJ::Message;
use LJ::PageStats;
use LJ::AccessLogSink;
diff -r 3433520d1576 -r b590dd2b0348 htdocs/img/vox.gif
Binary file htdocs/img/vox.gif has changed
diff -r 3433520d1576 -r b590dd2b0348 t/external-site.t
--- a/t/external-site.t Sun Nov 08 15:58:26 2009 +0000
+++ b/t/external-site.t Sun Nov 08 16:09:20 2009 +0000
@@ -4,29 +4,6 @@ use Test::More 'no_plan';
use Test::More 'no_plan';
use lib "$ENV{LJHOME}/cgi-bin";
require 'ljlib.pl';
-use LJ::ExternalSite::Vox;
-
-my $vox = LJ::ExternalSite::Vox->new;
-ok($vox);
-
-ok(! $vox->matches_url("http://bradfitz.com"), "not non-vox");
-ok(! $vox->matches_url("http://-blah.vox.com"), "not -blah");
-ok(! $vox->matches_url("http://8user.vox.com"), "not start numeric");
-ok($vox->matches_url("http://a-b.vox.com"), "a-b");
-ok(! $vox->matches_url("http://a_b.vox.com"), "not underscores");
-is($vox->matches_url("A-B.VOX.COM"), "http://a-b.vox.com/");
-is($vox->matches_url("http://A-B.VOX.COM"), "http://a-b.vox.com/");
-is($vox->matches_url("http://A-B.VOX.COM/"), "http://a-b.vox.com/");
-
-{
- local @LJ::EXTERNAL_SITES = (
- ["Vox", "vox.com"],
- );
- LJ::ExternalSite->forget_site_objs;
- my @sites = LJ::ExternalSite->sites;
- is(scalar @sites, 1, "got 1 object");
- is(ref $sites[0], "LJ::ExternalSite::Vox", "is vox");
-}
1;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog