Remove references to the news journal type throughout the codebase.
Patch by denise.
diffs (298 lines):
diff -r 2053cd34e3c2 -r 5da5033952ee bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Wed Jul 08 16:20:16 2009 +0000
+++ b/bin/upgrading/en.dat Wed Jul 08 16:45:09 2009 +0000
@@ -551,8 +551,6 @@ crumb.moodeditor=Custom Mood Theme Edito
crumb.moodeditor=Custom Mood Theme Editor
crumb.moodlist=Mood Viewer
-
-crumb.news=News
crumb.phonepostsettings=Phone Post
@@ -3775,8 +3773,6 @@ web.controlstrip.status.mutualtrust_watc
web.controlstrip.status.mutualtrust_watchedby=[[user]] and you have mutual
access and they subscribe to you
-web.controlstrip.status.news=You are viewing the site news account [[user]]
-
web.controlstrip.status.other=You are viewing [[user]]
web.controlstrip.status.personal=You are viewing [[user]]'s journal
diff -r 2053cd34e3c2 -r 5da5033952ee bin/upgrading/s2layers/core1.s2
--- a/bin/upgrading/s2layers/core1.s2 Wed Jul 08 16:20:16 2009 +0000
+++ b/bin/upgrading/s2layers/core1.s2 Wed Jul 08 16:45:09 2009 +0000
@@ -1960,8 +1960,6 @@ function userinfoicon(UserLite user) : I
$uimage->set_url("$*IMGDIR/silk/identity/community.png");
} elseif ($user.journal_type == "Y") {
$uimage->set_url("$*IMGDIR/silk/identity/feed.png");
- } elseif ($user.journal_type == "N") {
- $uimage->set_url("$*IMGDIR/silk/identity/news.png");
} elseif ($user.journal_type == "I") {
$uimage->set_url("$*IMGDIR/silk/identity/openid.png");
} else {
diff -r 2053cd34e3c2 -r 5da5033952ee bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2 Wed Jul 08 16:20:16 2009 +0000
+++ b/bin/upgrading/s2layers/core2.s2 Wed Jul 08 16:45:09 2009 +0000
@@ -2613,8 +2613,6 @@ function userinfoicon(UserLite user) : I
$uimage->set_url("$*IMGDIR/silk/identity/community.png");
} elseif ($user.journal_type == "Y") {
$uimage->set_url("$*IMGDIR/silk/identity/feed.png");
- } elseif ($user.journal_type == "N") {
- $uimage->set_url("$*IMGDIR/silk/identity/news.png");
} elseif ($user.journal_type == "I") {
$uimage->set_url("$*IMGDIR/silk/identity/openid.png");
} else {
diff -r 2053cd34e3c2 -r 5da5033952ee
cgi-bin/Apache/LiveJournal/Interface/ElsewhereInfo.pm
--- a/cgi-bin/Apache/LiveJournal/Interface/ElsewhereInfo.pm Wed Jul 08
16:20:16 2009 +0000
+++ b/cgi-bin/Apache/LiveJournal/Interface/ElsewhereInfo.pm Wed Jul 08
16:45:09 2009 +0000
@@ -50,7 +50,7 @@ sub handle {
# find what node type we're dealing with
my $node_type;
my $node_ident = $u->user;
- if ($u->is_community || $u->is_shared || $u->is_news) {
+ if ($u->is_community || $u->is_shared ) {
$node_type = 'group';
} elsif ($u->is_person) {
$node_type = 'person';
diff -r 2053cd34e3c2 -r 5da5033952ee
cgi-bin/LJ/Console/Command/ChangeJournalType.pm
--- a/cgi-bin/LJ/Console/Command/ChangeJournalType.pm Wed Jul 08 16:20:16
2009 +0000
+++ b/cgi-bin/LJ/Console/Command/ChangeJournalType.pm Wed Jul 08 16:45:09
2009 +0000
@@ -10,8 +10,8 @@ sub desc { "Change a journal's type." }
sub args_desc { [
'journal' => "The username of the journal that type is
changing.",
- 'type' => "Either 'person', 'community', or 'news'.",
- 'owner' => "The person to become the maintainer of the
community/news journal. If changing to type 'person', the account will adopt
the email address and password of the owner.",
+ 'type' => "Either 'person' or 'community'.",
+ 'owner' => "The person to become the maintainer of the
community journal. If changing to type 'person', the account will adopt the
email address and password of the owner.",
'force' => "Specify this to create a community from a
non-empty journal. The maintainer of the community will be the owner of the
journal's entries."
] }
@@ -29,8 +29,8 @@ sub execute {
return $self->error("This command takes from three to four arguments.
Consult the reference.")
unless $user && $type && $owner && (@args==0 || @args==1 && $args[0]
eq 'force' && $type eq 'community');
- return $self->error("Type argument must be 'person', 'community', or
'news'.")
- unless $type =~ /^(?:person|community|news)$/;
+ return $self->error("Type argument must be 'person' or 'community'.")
+ unless $type =~ /^(?:person|community)$/;
my $u = LJ::load_user($user);
return $self->error("Invalid user: $user")
@@ -39,13 +39,13 @@ sub execute {
return $self->error("Account cannot be converted while not active.")
unless $u->is_visible;
- return $self->error("Account is not a personal, community, or news
journal.")
- unless $u->journaltype =~ /[PCN]/;
+ return $self->error("Account is not a personal or community journal.")
+ unless $u->journaltype =~ /[PC]/;
return $self->error("You cannot convert your own account.")
if LJ::u_equals($remote, $u);
- my $typemap = { 'community' => 'C', 'person' => 'P', 'news' => 'N' };
+ my $typemap = { 'community' => 'C', 'person' => 'P' };
return $self->error("This account is already a $type account")
if $u->journaltype eq $typemap->{$type};
@@ -71,7 +71,7 @@ sub execute {
return $self->error("Account contains $count entries posted by other
users and cannot be converted.")
if $count;
- # going to a community, shared, news. do they have any entries posted by
themselves?
+ # going to a community. do they have any entries posted by themselves?
# if so, make the new owner of the community to be the owner of these
entries
} else {
my $dbcr = LJ::get_cluster_def_reader($u);
diff -r 2053cd34e3c2 -r 5da5033952ee cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Wed Jul 08 16:20:16 2009 +0000
+++ b/cgi-bin/LJ/User.pm Wed Jul 08 16:45:09 2009 +0000
@@ -634,12 +634,6 @@ sub is_individual {
}
-sub is_news {
- my $u = shift;
- return $u->{journaltype} eq "N";
-}
-
-
sub is_official {
my $u = shift;
return $LJ::OFFICIAL_JOURNALS{$u->username} ? 1 : 0;
@@ -688,7 +682,6 @@ sub journaltype_readable {
P => 'personal',
S => 'shared',
Y => 'syndicated',
- N => 'news',
C => 'community',
}->{$u->{journaltype}};
}
@@ -1987,7 +1980,7 @@ sub large_journal_icon {
return $wrap_img->("openid.png");
}
- # personal, news, or unknown fallthrough
+ # personal or unknown fallthrough
return $wrap_img->("user.png");
}
@@ -6604,7 +6597,7 @@ sub get_timezone {
# a link to the mode=full userinfo. Key 'type' when 'C' makes
# a community link, when 'Y' makes a syndicated account link,
# when 'I' makes an identity account link (e.g. OpenID),
-# when 'N' makes a news account link, otherwise makes a user account
+# otherwise makes a user account
# link. If user parameter is a hashref, its 'journaltype' overrides
# this 'type'. Key 'del', when true, makes a tag for a deleted user.
# If user parameter is a hashref, its 'statusvis' overrides 'del'.
@@ -6681,9 +6674,6 @@ sub ljuser
} elsif ( $type eq 'Y' ) {
return $make_tag->( "syn_${head_size}.gif", $url, $head_size, '',
$type_readable ) if $head_size;
return $make_tag->( 'silk/identity/feed.png', $url, 16, ,
$type_readable );
- } elsif ( $type eq 'N' ) {
- return $make_tag->( "news_${head_size}.gif", $url, $head_size, '',
$type_readable ) if $head_size;
- return $make_tag->( 'silk/identity/news.png', $url, 16, '',
$type_readable );
} elsif ( $type eq 'I' ) {
return $u->ljuser_display($opts);
} else {
diff -r 2053cd34e3c2 -r 5da5033952ee cgi-bin/crumbs.pl
--- a/cgi-bin/crumbs.pl Wed Jul 08 16:20:16 2009 +0000
+++ b/cgi-bin/crumbs.pl Wed Jul 08 16:45:09 2009 +0000
@@ -60,7 +60,6 @@ use Errno qw(ENOENT);
'moderate' => ['Community Moderation', '/community/moderate.bml',
'community'],
'moodeditor' => ['Custom Mood Theme Editor', '/manage/moodthemes.bml',
'manage'],
'moodlist' => ['Mood Viewer', '/moodlist.bml', 'manage'],
- 'news' => ['News', '/news.bml', 'home'],
'popfaq' => ['Popular FAQs', '/support/popfaq.bml', 'faq'],
'postentry' => ['Post an Entry', '/update.bml', 'home'],
'register' => ['Validate Email', '/register.bml', 'home'],
diff -r 2053cd34e3c2 -r 5da5033952ee cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl Wed Jul 08 16:20:16 2009 +0000
+++ b/cgi-bin/ljprotocol.pl Wed Jul 08 16:45:09 2009 +0000
@@ -1018,13 +1018,12 @@ sub postevent
return fail($err,306) unless $dbh && $dbcm && $uowner->writer;
return fail($err,200) unless $req->{'event'} =~ /\S/;
- ### make sure community, shared, or news journals don't post
- ### note: shared and news journals are deprecated. every shared journal
+ ### make sure community or shared journals don't post
+ ### note: shared journals are deprecated. every shared journal
## should one day be a community journal, of some form.
return fail($err,150) if ($u->{'journaltype'} eq "C" ||
$u->{'journaltype'} eq "S" ||
- $u->{'journaltype'} eq "I" ||
- $u->{'journaltype'} eq "N");
+ $u->{'journaltype'} eq "I");
# suspended users can't post
return fail($err,305) if ($u->{'statusvis'} eq "S");
@@ -2364,7 +2363,6 @@ sub list_friends
$r->{"type"} = {
'C' => 'community',
'Y' => 'syndicated',
- 'N' => 'news',
'S' => 'shared',
'I' => 'identity',
}->{$u->{'journaltype'}} if $u->{'journaltype'} ne 'P';
diff -r 2053cd34e3c2 -r 5da5033952ee cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl Wed Jul 08 16:20:16 2009 +0000
+++ b/cgi-bin/weblib.pl Wed Jul 08 16:45:09 2009 +0000
@@ -2555,7 +2555,7 @@ sub control_strip
$links{'add_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}'>$BML::ML{'web.controlstrip.links.addtocircle'}</a>";
$links{'edit_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}'>$BML::ML{'web.controlstrip.links.modifycircle'}</a>";
$links{'track_user'} = "<a
href='$LJ::SITEROOT/manage/subscriptions/user.bml?journal=$journal->{user}'>$BML::ML{'web.controlstrip.links.trackuser'}</a>";
- if ($journal->is_syndicated || $journal->is_news) {
+ if ($journal->is_syndicated ) {
$links{'add_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}&action=subscribe'>$BML::ML{'web.controlstrip.links.addfeed'}</a>";
$links{'remove_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}&action=remove'>$BML::ML{'web.controlstrip.links.removefeed'}</a>";
}
@@ -2582,7 +2582,6 @@ sub control_strip
'personalfriendsfriendspage' =>
BML::ml('web.controlstrip.status.personalnetworkpage', {'user' =>
$journal_display}),
'community' =>
BML::ml('web.controlstrip.status.community', {'user' => $journal_display}),
'syn' =>
BML::ml('web.controlstrip.status.syn', {'user' => $journal_display}),
- 'news' =>
BML::ml('web.controlstrip.status.news', {'user' => $journal_display, 'sitename'
=> $LJ::SITENAMESHORT}),
'other' =>
BML::ml('web.controlstrip.status.other', {'user' => $journal_display}),
'mutualtrust_mutualwatch' =>
BML::ml('web.controlstrip.status.mutualtrust_mutualwatch', {'user' =>
$journal_display}),
'mutualtrust_watch' =>
BML::ml('web.controlstrip.status.mutualtrust_watch', {'user' =>
$journal_display}),
@@ -2815,15 +2814,6 @@ sub control_strip
$ret .= "$links{remove_friend} ";
}
$ret .= $links{syndicated_list};
- } elsif ($journal->is_news) {
- $ret .= "$statustext{news}<br />";
- if ( $remote && !$remote->watches( $journal ) ) {
- $ret .= $links{add_friend};
- $ret .= " $links{track_user}";
- } else {
- $ret .= $links{track_user};
- $ret .= " ";
- }
} else {
$ret .= "$statustext{other}<br />";
$ret .= " ";
@@ -2885,8 +2875,6 @@ LOGIN_BAR
$ret .= $statustext{'community'};
} elsif ($journal->is_syndicated) {
$ret .= $statustext{'syn'};
- } elsif ($journal->is_news) {
- $ret .= $statustext{'news'};
} else {
$ret .= $statustext{'other'};
}
diff -r 2053cd34e3c2 -r 5da5033952ee htdocs/community/members.bml
--- a/htdocs/community/members.bml Wed Jul 08 16:20:16 2009 +0000
+++ b/htdocs/community/members.bml Wed Jul 08 16:45:09 2009 +0000
@@ -39,7 +39,7 @@ body<=
}
# make sure it is a comm
- unless ($c->is_comm || $c->is_shared || $c->is_news) {
+ unless ($c->is_comm || $c->is_shared ) {
$ret .= "<?h1 $ML{'Error'} h1?><?p ";
$ret .= BML::ml( '.error.notcomm', { user => LJ::ljuser($c) } );
$ret .= " p?>";
diff -r 2053cd34e3c2 -r 5da5033952ee htdocs/tools/friendlist.bml
--- a/htdocs/tools/friendlist.bml Wed Jul 08 16:20:16 2009 +0000
+++ b/htdocs/tools/friendlist.bml Wed Jul 08 16:45:09 2009 +0000
@@ -44,7 +44,6 @@ body<=
p => 'personal',
s => 'shared',
y => 'syndicated',
- n => 'news',
c => 'community',
}->{lc $type};
};
diff -r 2053cd34e3c2 -r 5da5033952ee t/console-changejournaltype.t
--- a/t/console-changejournaltype.t Wed Jul 08 16:20:16 2009 +0000
+++ b/t/console-changejournaltype.t Wed Jul 08 16:45:09 2009 +0000
@@ -26,7 +26,7 @@ my $run = sub {
};
# all of these should fail.
-foreach my $to (qw(person news community)) {
+foreach my $to (qw(person community)) {
is($run->("change_journal_type $commname $to $owner"),
"error: You are not authorized to run this command.");
}
@@ -34,9 +34,9 @@ foreach my $to (qw(person news community
### NOW CHECK WITH PRIVS
$u->grant_priv("changejournaltype");
-my $types = { 'community' => 'C', 'person' => 'P', 'news' => 'N' };
+my $types = { 'community' => 'C', 'person' => 'P' };
-foreach my $to (qw(person news community)) {
+foreach my $to (qw(person community)) {
is($run->("change_journal_type $commname $to $owner"),
"success: User $commname converted to a $to account.");
$comm = LJ::load_user($comm->user);
@@ -45,5 +45,5 @@ foreach my $to (qw(person news community
### check that 'shared' is not a valid journaltype
is($run->("change_journal_type $commname shared $owner"),
- "error: Type argument must be 'person', 'community', or 'news'.");
+ "error: Type argument must be 'person' or 'community'.");
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog