Skip to content

Commit

Permalink
absolutedir doesn't have a trailing slash either; plus whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Apr 8, 2003
1 parent 8ccec98 commit 4808c50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions plugins/Journal/journal.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
sub main {
my $journal = getObject('Slash::Journal');
my $constants = getCurrentStatic();
my $reader = getObject('Slash::DB', { db_type => 'reader' });
my $reader = getObject('Slash::DB', { db_type => 'reader' });
my $user = getCurrentUser();
my $form = getCurrentForm();

Expand Down Expand Up @@ -375,7 +375,7 @@ sub displayArticle {
unless ($articles && @$articles) {
print getData('noentries_found');
if ($user_change && %$user_change) {
my $slashdb = getCurrentDB();
my $slashdb = getCurrentDB();
$slashdb->setUser($user->{uid}, $user_change);
}
return;
Expand Down Expand Up @@ -454,7 +454,7 @@ sub displayArticle {
}

if ($user_change && %$user_change) {
my $slashdb = getCurrentDB();
my $slashdb = getCurrentDB();
$slashdb->setUser($user->{uid}, $user_change);
}
}
Expand Down Expand Up @@ -486,7 +486,7 @@ sub setPrefs {
_checkTheme($form->{journal_theme})
if defined $form->{journal_theme};

my $slashdb = getCurrentDB();
my $slashdb = getCurrentDB();
$slashdb->setUser($user->{uid}, \%prefs);

editPrefs(@_);
Expand Down Expand Up @@ -542,7 +542,7 @@ sub saveArticle {

return 0 unless _validFormkey($ws ? qw(max_post_check interval_check) : ());

my $slashdb = getCurrentDB();
my $slashdb = getCurrentDB();
if ($form->{id}) {

my %update;
Expand Down Expand Up @@ -674,7 +674,7 @@ sub editArticle {
} else {
$article = $journal->get($form->{id}) if $form->{id};
$posttype = $article->{posttype};
my $slashdb = getCurrentDB();
my $slashdb = getCurrentDB();
$slashdb->createFormkey('journal');
}

Expand Down
6 changes: 3 additions & 3 deletions plugins/Search/search.pl
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ sub pollSearch {
slashDisplay('searchform', {
op => $form->{op},
topics => _topics(),
sections => _sections(),
sections => _sections(),
tref => $slashdb->getTopic($form->{tid}),
'sort' => _sort(),
});
Expand Down Expand Up @@ -491,10 +491,10 @@ sub pollSearchRSS {
for my $entry (@$stories) {
my $time = timeCalc($entry->{date});
my $url = $slashdb->getSection($entry->{section}, 'url');
my $link = $url ? $url . '/' : $constants->{absolutedir};
my $link = $url || $constants->{absolutedir};
push @items, {
title => "$entry->{question} ($time)",
'link' => ($url . 'pollBooth.pl?qid=' . $entry->{qid}),
'link' => ($link . '/pollBooth.pl?qid=' . $entry->{qid}),
};
}

Expand Down

0 comments on commit 4808c50

Please sign in to comment.