Skip to content

Commit

Permalink
Misc. updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed Oct 23, 2000
1 parent 9f8eca0 commit 3504e3f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Slash/Apache/User/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ sub getUser {
$user->{points} = 0 unless $user->{willing}; # No points if you dont want 'em

if ($form->{op} eq 'adminlogin') {
if(my $sid = $slashdb->getAuthorAuthenticate($form->{aaid}, $form->{apasswd}, $user)) {
setCookie('session', $sid);
}
my $sid = $slashdb->getAuthorAuthenticate($form->{aaid},
$form->{apasswd}, $user);
setCookie('session', $sid) if $sid;
} elsif ($cookies->{session} && length($cookies->{session}->value) > 3) {
my $value = $slashdb->getAuthorInfo(
$cookies->{session}->value,
$constants->{admin_timeout},
$user
$cookies->{session}->value,
$constants->{admin_timeout},
$user
);
print STDERR "VALUE $value \n";
}
Expand Down
15 changes: 7 additions & 8 deletions Slash/DB/MySQL/MySQL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ sub getAuthorInfo {
);

unless ($aid) {
return(0);
return;
} else {
$self->sqlDo("DELETE from sessions WHERE aid = '$aid' AND session != " .
$self->{_dbh}->quote($session)
Expand All @@ -462,7 +462,7 @@ sub getAuthorInfo {
$user->{url} = $url;
$user->{is_admin} = 1;

return($seclev);
return $seclev;
}
}

Expand Down Expand Up @@ -522,9 +522,9 @@ sub getAuthorAuthenticate {
lasttitle => $title }
);

return($sid);
return $sid;
} else {
return(0);
return;
}
}

Expand Down Expand Up @@ -1935,10 +1935,10 @@ sub saveVars {
#this is almost copied verbatium. Needs to be cleaned up
my($self) = @_;
my $form = getCurrentForm();
my $name = $form->{thisname};
my $name = $self->{_dbh}->quote($form->{thisname});
if ($form->{desc}) {
my($exists) = $self->sqlSelect('count(*)', 'vars',
"name='$name'"
"name=$name"
);
if ($exists == 0) {
$self->sqlInsert('vars', { name => $form->{thisname} });
Expand All @@ -1948,7 +1948,7 @@ sub saveVars {
description => $form->{desc},
datatype => $form->{datatype},
dataop => $form->{dataop}
}, "name='$name'"
}, "name=$name"
);
} else {
$self->sqlDo("DELETE from vars WHERE name=$name");
Expand Down Expand Up @@ -2738,7 +2738,6 @@ sub getPollQuestion {
return $answer;
}


########################################################
sub getBlock {
my($self) = @_;
Expand Down
1 change: 1 addition & 0 deletions Slash/Utility/Utility.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ Return value
=cut

sub writeLog {
return unless $ENV{GATEWAY_INTERFACE};
my $op = shift;
my $dat = join("\t", @_);

Expand Down
1 change: 0 additions & 1 deletion public_html/authors.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
###############################################################################
use strict;
use Slash;
use Slash::DB;
use Slash::Display;
use Slash::Utility;

Expand Down
1 change: 0 additions & 1 deletion themes/slashcode/htdocs/authors.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
###############################################################################
use strict;
use Slash;
use Slash::DB;
use Slash::Display;
use Slash::Utility;

Expand Down

0 comments on commit 3504e3f

Please sign in to comment.