mirror of
https://github.com/standardebooks/web.git
synced 2025-07-23 07:44:49 -04:00
Add poll system for Patrons Circle
This commit is contained in:
parent
3555d53615
commit
2ef5ce6551
44 changed files with 717 additions and 98 deletions
|
@ -258,6 +258,16 @@ Define webroot /standardebooks.org/web
|
|||
# Newsletter
|
||||
RewriteRule ^/newsletter$ /newsletter/subscribers/new.php
|
||||
RewriteRule ^/newsletter/subscribers/([^\./]+?)/(delete|confirm)$ /newsletter/subscribers/$2.php?uuid=$1
|
||||
|
||||
# Polls
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)$ /patrons-circle/polls/get.php?pollurlname=$1
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes/(new|success)$ /patrons-circle/polls/votes/$2.php?pollurlname=$1
|
||||
|
||||
RewriteCond expr "tolower(%{REQUEST_METHOD}) =~ /^get$/"
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes$ /patrons-circle/polls/votes/index.php?pollurlname=$1
|
||||
|
||||
RewriteCond expr "tolower(%{REQUEST_METHOD}) =~ /^post$/"
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes$ /patrons-circle/polls/votes/post.php?pollurlname=$1
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:80>
|
||||
|
|
|
@ -257,4 +257,14 @@ Define webroot /standardebooks.org/web
|
|||
# Newsletter
|
||||
RewriteRule ^/newsletter$ /newsletter/subscribers/new.php
|
||||
RewriteRule ^/newsletter/subscribers/([^\./]+?)/(delete|confirm)$ /newsletter/subscribers/$2.php?uuid=$1
|
||||
|
||||
# Polls
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)$ /patrons-circle/polls/get.php?pollurlname=$1
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes/(new|success)$ /patrons-circle/polls/votes/$2.php?pollurlname=$1
|
||||
|
||||
RewriteCond expr "tolower(%{REQUEST_METHOD}) =~ /^get$/"
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes$ /patrons-circle/polls/votes/index.php?pollurlname=$1
|
||||
|
||||
RewriteCond expr "tolower(%{REQUEST_METHOD}) =~ /^post$/"
|
||||
RewriteRule ^/patrons-circle/polls/([^/]+)/votes$ /patrons-circle/polls/votes/post.php?pollurlname=$1
|
||||
</VirtualHost>
|
||||
|
|
|
@ -19,6 +19,12 @@ parameters:
|
|||
- '#Method Ebook::NullIfEmpty\(\) has parameter \$elements with no type specified.#'
|
||||
- '#Method HttpInput::GetHttpVar\(\) has no return type specified.#'
|
||||
- '#Method HttpInput::GetHttpVar\(\) has parameter \$default with no type specified.#'
|
||||
|
||||
# Ignore errors caused by access to our PropertiesBase pattern
|
||||
- '#Access to protected property .+#'
|
||||
|
||||
# Ignore symbols that PHPStan can't find
|
||||
- '#Constant EMAIL_SMTP_USERNAME not found.#'
|
||||
level:
|
||||
7
|
||||
paths:
|
||||
|
|
8
config/sql/se/PollItems.sql
Normal file
8
config/sql/se/PollItems.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE `PollItems` (
|
||||
`PollItemId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`PollId` int(10) unsigned NOT NULL,
|
||||
`Name` varchar(255) NOT NULL,
|
||||
`Description` text DEFAULT NULL,
|
||||
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`PollItemId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
11
config/sql/se/Polls.sql
Normal file
11
config/sql/se/Polls.sql
Normal file
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE `Polls` (
|
||||
`PollId` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Created` datetime NOT NULL,
|
||||
`Name` varchar(255) NOT NULL,
|
||||
`UrlName` varchar(255) NOT NULL,
|
||||
`Description` text DEFAULT NULL,
|
||||
`Start` datetime DEFAULT NULL,
|
||||
`End` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`PollId`),
|
||||
UNIQUE KEY `idxUnique` (`UrlName`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
6
config/sql/se/Votes.sql
Normal file
6
config/sql/se/Votes.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
CREATE TABLE `Votes` (
|
||||
`UserId` int(11) unsigned NOT NULL,
|
||||
`PollItemId` int(11) unsigned NOT NULL,
|
||||
`Created` datetime NOT NULL,
|
||||
UNIQUE KEY `idxUnique` (`PollItemId`,`UserId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
Loading…
Add table
Add a link
Reference in a new issue