Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Could I have touched anything else?

  • Loading branch information...
commit 369380cdd4d02abe7c9f44685da9421363b046cd 1 parent 21b10b7
@BrianAker BrianAker authored
View
7 Slash/DB/MySQL/MySQL.pm
@@ -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");
@@ -1823,6 +1824,7 @@ sub savePollQuestion {
voters => $poll->{voters},
topic => $poll->{topic},
section => $poll->{section},
+ autopoll => $poll->{autopoll},
uid => getCurrentUser('uid'),
-date =>'now()'
});
@@ -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(
View
2  plugins/Admin/templates/editStory;admin;default
@@ -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>"
View
0  themes/slashcode/templates/data;pollBooth;default → plugins/PollBooth/templates/data;pollBooth;default
File renamed without changes
View
0  ...es/slashcode/templates/editpoll;pollBooth;default → ...ns/PollBooth/templates/editpoll;pollBooth;default
File renamed without changes
View
0  ...s/slashcode/templates/listpolls;pollBooth;default → ...s/PollBooth/templates/listpolls;pollBooth;default
File renamed without changes
View
0  themes/slashcode/templates/pollbooth;misc;default → plugins/PollBooth/templates/pollbooth;misc;default
File renamed without changes
View
0  ...es/slashcode/templates/savepoll;pollBooth;default → ...ns/PollBooth/templates/savepoll;pollBooth;default
File renamed without changes
View
0  themes/slashcode/templates/vote;pollBooth;default → plugins/PollBooth/templates/vote;pollBooth;default
File renamed without changes
View
3  sql/mysql/slashschema_create.sql
@@ -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),
@@ -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)
View
3  sql/mysql/upgrades
@@ -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;
View
8 themes/slashcode/THEME
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -199,5 +192,6 @@ plugin=Submit
plugin=Stats
plugin=Journal
plugin=Hof
+plugin=PollBooth
plugin=PubKey
plugin=Zoo
View
10 themes/slashcode/sql/mysql/datadump.sql
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.