mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-26 22:28:39 -05:00
fix subscriptions feature for php8 and add mailhog
This commit is contained in:
parent
788ca4ccd0
commit
ee37419582
13
Dockerfile
13
Dockerfile
@ -18,4 +18,15 @@ RUN apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev li
|
|||||||
RUN apt-get install -y locales
|
RUN apt-get install -y locales
|
||||||
RUN locale-gen en_GB.UTF-8
|
RUN locale-gen en_GB.UTF-8
|
||||||
RUN sed -i '/en_GB.UTF-8/s/^# //g' /etc/locale.gen && \
|
RUN sed -i '/en_GB.UTF-8/s/^# //g' /etc/locale.gen && \
|
||||||
locale-gen
|
locale-gen
|
||||||
|
RUN apt-get install -y curl
|
||||||
|
# And clean up the image
|
||||||
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN curl -Lsf 'https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz' | tar -C '/usr/local' -xvzf -
|
||||||
|
ENV PATH /usr/local/go/bin:$PATH
|
||||||
|
RUN go get github.com/mailhog/mhsendmail
|
||||||
|
RUN cp /root/go/bin/mhsendmail /usr/bin/mhsendmail
|
||||||
|
RUN echo 'sendmail_path = /usr/bin/mhsendmail --smtp-addr mailhog:1025' > /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ Class Subscriber
|
|||||||
{
|
{
|
||||||
global $mysqli;
|
global $mysqli;
|
||||||
|
|
||||||
|
// error_log(print_r($token, TRUE));
|
||||||
$stmt = $mysqli->prepare("SELECT subscriberID, token, userID, active, expires FROM subscribers WHERE token LIKE ? LIMIT 1");
|
$stmt = $mysqli->prepare("SELECT subscriberID, token, userID, active, expires FROM subscribers WHERE token LIKE ? LIMIT 1");
|
||||||
$stmt->bind_param("s", $token );
|
$stmt->bind_param("s", $token );
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
@ -202,7 +202,7 @@ Class Subscriber
|
|||||||
// No data found, fail gently...
|
// No data found, fail gently...
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// error_log(print_r($row, TRUE));
|
||||||
// If account is not already active, check if we are within timeframe of exipre +2h
|
// If account is not already active, check if we are within timeframe of exipre +2h
|
||||||
// and active if so, otherwise,delete account and return falsev
|
// and active if so, otherwise,delete account and return falsev
|
||||||
if ( $row['active'] <> 1 ) {
|
if ( $row['active'] <> 1 ) {
|
||||||
|
@ -20,5 +20,12 @@ services:
|
|||||||
MYSQL_DATABASE: server_status
|
MYSQL_DATABASE: server_status
|
||||||
volumes:
|
volumes:
|
||||||
- ./database:/var/lib/mysql
|
- ./database:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- status-db
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog
|
||||||
|
ports:
|
||||||
|
- "1025:1025"
|
||||||
|
- "8025:8025"
|
||||||
networks:
|
networks:
|
||||||
- status-db
|
- status-db
|
@ -52,5 +52,5 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p style="text-align: center;"><a href="%url%/?do=unsubscribe&token=%token%"><sub><sup>%unsubscribe%</sup></sub></a></p>
|
<p style="text-align: center;"><a href="%url%/?do=unsubscribe&type=2&token=%token%"><sub><sup>%unsubscribe%</sup></sub></a></p>
|
||||||
<p style="text-align: center;"><a href="%url%"><img src="%url%/favicon/apple-icon-57x57.png" alt="" /> %powered_by% Server-Status</a></p>
|
<p style="text-align: center;"><a href="%url%"><img src="%url%/favicon/apple-icon-57x57.png" alt="" /> %powered_by% Server-Status</a></p>
|
Loading…
Reference in New Issue
Block a user