Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove deprecated stuff; join _invalid regexes into one loop; misc. t…

…hingys
  • Loading branch information...
commit 43e9cecefea776164c480960955dc3f46fecec89 1 parent f62cadd
@pudge pudge authored
View
38 Slash/DB/MySQL/MySQL.pm
@@ -3186,28 +3186,6 @@ sub getPollAnswers {
return $answers;
}
-# Deprecated -Brian
-#########################################################
-#sub getPollQuestions {
-## This may go away. Haven't finished poll stuff yet
-##
-# my($self, $limit) = @_;
-#
-# $limit = 25 if (!defined($limit));
-#
-# my $poll_hash_ref = {};
-# my $sql = "SELECT qid,question FROM pollquestions ORDER BY date DESC ";
-# $sql .= " LIMIT $limit " if $limit;
-# my $sth = $self->{_dbh}->prepare_cached($sql);
-# $sth->execute;
-# while (my($id, $desc) = $sth->fetchrow) {
-# $poll_hash_ref->{$id} = $desc;
-# }
-# $sth->finish;
-#
-# return $poll_hash_ref;
-#}
-
########################################################
sub deleteStory {
my($self, $sid) = @_;
@@ -7046,16 +7024,12 @@ sub getSlashConf {
}
}
- if ($conf{email_domains_invalid}) {
- my $regex = sprintf('[^\w-](?:%s)$',
- join '|', map quotemeta, split ' ', $conf{email_domains_invalid});
- $conf{email_domains_invalid} = qr{$regex};
- }
-
- if ($conf{submit_domains_invalid}) {
- my $regex = sprintf('[^\w-](?:%s)$',
- join '|', map quotemeta, split ' ', $conf{submit_domains_invalid});
- $conf{submit_domains_invalid} = qr{$regex};
+ for my $var (qw(email_domains_invalid submit_domains_invalid)) {
+ if ($conf{$var}) {
+ my $regex = sprintf('[^\w-](?:%s)$',
+ join '|', map quotemeta, split ' ', $conf{$var});
+ $conf{$var} = qr{$regex};
+ }
}
if ($conf{comment_nonstartwordchars}) {
View
34 Slash/DB/Static/MySQL/MySQL.pm
@@ -111,22 +111,6 @@ sub getBackendStories {
}
########################################################
-# This is only called if ssi is set
-#
-# Deprecated code as this is now handled in the tasks!
-# - Cliff 10/11/01
-sub updateCommentTotals {
- my($self, $sid, $comments) = @_;
- my $hp = join ',', @{$comments->{0}{totals}};
- $self->sqlUpdate("stories", {
- hitparade => $hp,
- writestatus => 'ok',
- commentcount => $comments->{0}{totals}[0]
- }, 'sid=' . $self->{_dbh}->quote($sid)
- );
-}
-
-########################################################
# For slashd
sub insertErrnoteLog {
my($self, $taskname, $errnote, $moreinfo) = @_;
@@ -2242,22 +2226,6 @@ sub getHeadFootPages {
}
########################################################
-# Was once used in template-tool's check_site_templates()
-# but is now deprecated. Left here in case another
-# application has need of it, but can be removed if
-# necessary. - Cliff 2002-09-10
-sub getAllTemplateIds {
- my($self, $min, $max) = @_;
- my $where;
-
- return if $min =~ /\D/ or $max =~ /\D/;
-
- $where = "tpid BETWEEN $min AND $max" if $min || $max;
- $self->sqlSelectColArrayref(
- 'tpid', 'templates', $where, 'ORDER BY tpid'
- );
-}
-
sub getCidForDaysBack {
my($self, $days, $startat_cid) = @_;
$days ||= 0;
@@ -2268,6 +2236,7 @@ sub getCidForDaysBack {
"cid > $startat_cid AND date > DATE_SUB(NOW(), INTERVAL $days DAY)");
}
+########################################################
sub getModderModdeeSummary {
my ($self, $options) = @_;
my $ac_uid = getCurrentStatic('anonymous_coward_uid');
@@ -2291,6 +2260,7 @@ sub getModderModdeeSummary {
return $mods;
}
+########################################################
sub getModderCommenterIPIDSummary {
my ($self, $options) = @_;
my $ac_uid = getCurrentStatic('anonymous_coward_uid');
View
1  sql/mysql/defaults.sql
@@ -847,7 +847,6 @@ INSERT INTO vars (name, value, description) VALUES ('memcached','0','Use memcach
INSERT INTO vars (name, value, description) VALUES ('memcached_debug','0','Turn on debugging for memcached?');
INSERT INTO vars (name, value, description) VALUES ('memcached_keyprefix','x','Unique, short (1-2 chars probably) prefix to distinguish this site from the other sites sharing memcaches');
INSERT INTO vars (name, value, description) VALUES ('memcached_servers','127.0.0.1:11211','Space-sep list of servers for memcached in host:port format; to weight a server append =n');
-INSERT INTO vars (name, value, description) VALUES ('metamod_sum','3','sum of moderations 1 for release (deprecated)');
INSERT INTO vars (name, value, description) VALUES ('min_expiry_comm','10','Lowest value for comment expiry trigger.');
INSERT INTO vars (name, value, description) VALUES ('min_expiry_days','7','Lowest value for duration expiry trigger.');
INSERT INTO vars (name, value, description) VALUES ('minkarma','-25','Minimum karma a user can sink to');
Please sign in to comment.
Something went wrong with that request. Please try again.