diff options
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index 0093bf2d..c335041a 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -156,7 +156,7 @@ sub authInfo { # returns whether the currently loggedin or anonymous user can perform -# a certain action. Argument is the action name as defined in global.pl +# a certain action. sub authCan { my($self, $act) = @_; return $self->{_auth} ? $self->{_auth}{perm} & $self->{permissions}{$act} : 0; diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 5cb266f4..c04fa7dd 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -14,7 +14,7 @@ our @EXPORT = qw|htmlHeader htmlFooter|; sub htmlHeader { # %options->{ title, noindex, search, feeds, svg, metadata } my($self, %o) = @_; my $skin = $self->reqGet('skin') || $self->authPref('skin') || $self->{skin_default}; - $skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$VNDB::ROOT/static/s/$skin"; + $skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$self->{root}/static/s/$skin"; # heading lit '<!DOCTYPE HTML>'; @@ -28,8 +28,11 @@ sub htmlHeader { # %options->{ title, noindex, search, feeds, svg, metadata } (my $css = $self->authPref('customcss')) =~ s/\n/ /g; style type => 'text/css', $css; } - Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/$_.atom", title => $self->{atom_feeds}{$_}[1] - for ($o{feeds} ? @{$o{feeds}} : ()); + if($o{feeds}) { + Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/announcements.atom", title => 'Site Announcements'; + Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/changes.atom", title => 'Recent Changes'; + Link rel => 'alternate', type => 'application/atom+xml', href => "/feeds/posts.atom", title => 'Recent Posts'; + } if(exists $o{metadata}) { # Required fields as per http://op.me/#metadata: og:title, og:type, og:image, og:url |