Skip to content

Commit

Permalink
Could I have touched anything else?
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAker committed Apr 8, 2002
1 parent 21b10b7 commit 369380c
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
7 changes: 5 additions & 2 deletions Slash/DB/MySQL/MySQL.pm
Expand Up @@ -1811,6 +1811,7 @@ sub savePollQuestion {
question => $poll->{question},
voters => $poll->{voters},
topic => $poll->{topic},
autopoll => $poll->{autopoll},
section => $poll->{section},
-date =>'now()'
}, "qid = $qid_quoted");
Expand All @@ -1823,6 +1824,7 @@ sub savePollQuestion {
voters => $poll->{voters},
topic => $poll->{topic},
section => $poll->{section},
autopoll => $poll->{autopoll},
uid => getCurrentUser('uid'),
-date =>'now()'
});
Expand Down Expand Up @@ -1900,9 +1902,10 @@ sub getPollQuestionList {
}
}

$where = sprintf 'section IN (%s)', join(',', @{$other->{section}})
$where .= "autopoll = 'no'";
$where = sprintf ' AND section IN (%s)', join(',', @{$other->{section}})
if $other->{section};
$where = sprintf 'section NOT IN (%s)', join(',', @{$other->{exclude_section}})
$where = sprintf ' AND section NOT IN (%s)', join(',', @{$other->{exclude_section}})
if $other->{exclude_section} && @{$other->{section}};

my $questions = $self->sqlSelectAll(
Expand Down
2 changes: 1 addition & 1 deletion plugins/Admin/templates/editStory;admin;default
Expand Up @@ -62,7 +62,7 @@ __template__
</TD>
<TD WIDTH="220">

[% IF Slash.getObject('Slash::Events'); %]
[% IF constants.plugin.Events && Slash.getObject('Slash::Events'); %]
[% PROCESS fancybox
title = "Set an Event for this Story"
contents = "<A HREF=\"$constants.rootdir/eventsadmin.pl?op=edit&amp;sid=$sid\">Make Event</A>"
Expand Down
3 changes: 2 additions & 1 deletion sql/mysql/slashschema_create.sql
Expand Up @@ -389,6 +389,8 @@ CREATE TABLE pollquestions (
date datetime,
uid mediumint UNSIGNED NOT NULL,
section varchar(30) NOT NULL,
autopoll enum("no","yes") DEFAULT 'no' NOT NULL,
flags enum("ok","delete","dirty") DEFAULT 'ok' NOT NULL,
FOREIGN KEY (section) REFERENCES sections(section),
FOREIGN KEY (discussion) REFERENCES discussions(id),
FOREIGN KEY (uid) REFERENCES users(uid),
Expand Down Expand Up @@ -459,7 +461,6 @@ CREATE TABLE section_extras (
name varchar(100) NOT NULL,
value varchar(100) NOT NULL,
type enum("text","list") DEFAULT 'text' NOT NULL,
list varchar(255) DEFAULT '' NOT NULL,
FOREIGN KEY (section) REFERENCES sections(section),
UNIQUE extra (section,name),
PRIMARY KEY (param_id)
Expand Down
3 changes: 3 additions & 0 deletions sql/mysql/upgrades
Expand Up @@ -163,3 +163,6 @@ CREATE TABLE submission_param (
INSERT INTO code_param (type, code, name) VALUES ('section_topic_types',1,'default');
ALTER TABLE section_topics ADD COLUMN type smallint UNSIGNED NOT NULL;
UPDATE section_topics SET type=1;

# Autopoll update
ALTER TABLE pollquestions ADD COLUMN autopoll enum("no","yes") DEFAULT 'no' NOT NULL;
8 changes: 1 addition & 7 deletions themes/slashcode/THEME
Expand Up @@ -48,7 +48,6 @@ htdoc=htdocs/slashguide.shtml
htdoc=htdocs/index.pl
htdoc=htdocs/metamod.pl
htdoc=htdocs/moderation.shtml
htdoc=htdocs/pollBooth.pl
htdoc=htdocs/topics.pl
htdoc=htdocs/users.pl
mysql_dump=sql/mysql/datadump.sql
Expand Down Expand Up @@ -79,7 +78,6 @@ template=templates/data;comments;default
template=templates/data;index;default
template=templates/data;metamod;default
template=templates/data;misc;default
template=templates/data;pollBooth;default
template=templates/data;topics;default
template=templates/data;users;default
template=templates/default;portald;default
Expand All @@ -103,7 +101,6 @@ template=templates/editKey;users;default
template=templates/editMiscOpts;users;default
template=templates/editUser;users;default
template=templates/edit_comment;comments;default
template=templates/editpoll;pollBooth;default
template=templates/errors;comments;default
template=templates/errors;users;default
template=templates/fancybox;misc;default
Expand All @@ -128,7 +125,6 @@ template=templates/linkComment;misc;default
template=templates/linkCommentPages;misc;default
template=templates/linkStory;misc;default
template=templates/listTopics;topics;default
template=templates/listpolls;pollBooth;default
template=templates/lockTest;misc;default
template=templates/loginForm;users;default
template=templates/main;404;default
Expand All @@ -147,7 +143,6 @@ template=templates/newUserForm;users;default
template=templates/newdiscussion;comments;default
template=templates/organisation;misc;default
template=templates/pagination;comments;default
template=templates/pollbooth;misc;default
template=templates/portalboxtitle;misc;default
template=templates/portalmap;misc;default
template=templates/previewSlashbox;users;default
Expand All @@ -159,7 +154,6 @@ template=templates/reRegisterMail;messages;default
template=templates/recentTopics;misc;default
template=templates/regResult;users;default
template=templates/rereg_mail;messages;default
template=templates/savepoll;pollBooth;default
template=templates/sectionisolate;misc;default
template=templates/sectionindexd;misc;default
template=templates/select;misc;default
Expand All @@ -181,7 +175,6 @@ template=templates/userInfo;users;default
template=templates/showInfoConflict;users;default
template=templates/userlogin;misc;default
template=templates/users;menu;default
template=templates/vote;pollBooth;default
template=templates/listAbuses;admin;default
template=templates/topAbusers;users;default
template=templates/listReadOnly;users;default
Expand All @@ -199,5 +192,6 @@ plugin=Submit
plugin=Stats
plugin=Journal
plugin=Hof
plugin=PollBooth
plugin=PubKey
plugin=Zoo
10 changes: 5 additions & 5 deletions themes/slashcode/sql/mysql/datadump.sql
Expand Up @@ -195,11 +195,11 @@ INSERT INTO sections (section, artcount, title, qid, isolate, issue, extras, fea
# Dumping data for table 'section_topics'
#

INSERT INTO section_topics (section, tid) VALUES ('articles', 1);
INSERT INTO section_topics (section, tid) VALUES ('articles', 2);
INSERT INTO section_topics (section, tid) VALUES ('articles', 3);
INSERT INTO section_topics (section, tid) VALUES ('articles', 4);
INSERT INTO section_topics (section, tid) VALUES ('features', 1);
INSERT INTO section_topics (section, tid, type) VALUES ('articles', 1, 1);
INSERT INTO section_topics (section, tid, type) VALUES ('articles', 2, 1);
INSERT INTO section_topics (section, tid, type) VALUES ('articles', 3, 1);
INSERT INTO section_topics (section, tid, type) VALUES ('articles', 4, 1);
INSERT INTO section_topics (section, tid, type) VALUES ('features', 1, 1);

#
# Dumping data for table 'sessions'
Expand Down

0 comments on commit 369380c

Please sign in to comment.