Skip to content

Commit d4d8ed8

Browse files
committed
Merge remote-tracking branch 'origin/master' into release-3.6.4
2 parents 2ad13e5 + 6f05cac commit d4d8ed8

File tree

16 files changed

+788
-936
lines changed

16 files changed

+788
-936
lines changed

.github/workflows/build-release.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ jobs:
5454
php_extensions: xml
5555
version: 2
5656

57-
- name: Install Plugins
57+
- name: Install Plugins and Themes
5858
run: |
5959
cd $GITHUB_WORKSPACE
6060
./scripts/install-plugins.sh vendor public_html/lists/admin/plugins/
61+
./scripts/install-themes.sh vendor public_html/lists/admin/ui/
6162
6263
- name: Install the phpList4 based REST API
6364
run: |
@@ -80,7 +81,7 @@ jobs:
8081
- name: Start Test Server
8182
run: |
8283
cd $GITHUB_WORKSPACE
83-
cp -fv tests/default.behat.yml tests/behat.yml
84+
cp -fv tests/ci/behat.yml tests/behat.yml
8485
cp -fv tests/ci/config.php public_html/lists/config/config.php
8586
mkdir -p output/screenshots
8687
mkdir -p build/mails
@@ -89,7 +90,7 @@ jobs:
8990
sudo php -S 0.0.0.0:80 -t public_html > /dev/null 2>&1 &
9091
9192
- name: Check PHP syntax errors
92-
uses: overtrue/phplint@2.3.5
93+
uses: overtrue/phplint@2.4.1
9394
with:
9495
path: ./public_html
9596
options: --exclude=base/vendor
@@ -107,12 +108,20 @@ jobs:
107108
firefox -v
108109
vendor/bin/behat -V
109110
110-
- name: Run BDD Tests
111+
- name: Run Behat Tests
111112
run: |
112113
cd $GITHUB_WORKSPACE/tests
113114
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags=@initialise
114115
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags="~@initialise && ~@wip"
115116
117+
- name: Upload the screenshots
118+
if: always()
119+
uses: actions/upload-artifact@v2
120+
with:
121+
path: "output"
122+
name: "behat output"
123+
retention-days: 3
124+
116125
- name: Clean Up
117126
run: |
118127
cd $GITHUB_WORKSPACE

.github/workflows/main.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
name: CI
33

4-
on: [pull_request]
4+
on: [push, pull_request]
55

66
jobs:
77
test:
@@ -11,11 +11,8 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php-version: ['7.2', '7.2', '7.3', '7.4']
14+
php-version: ['7.2', '7.2', '7.3', '7.4', '8.0']
1515
experimental: [false]
16-
include:
17-
- php-version: '8.0'
18-
experimental: true
1916

2017
steps:
2118
- uses: actions/checkout@v2
@@ -39,11 +36,8 @@ jobs:
3936
path: /tmp/composer-cache
4037
key: ${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
4138

42-
- name: Add HTTP basic auth credentials
43-
run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json
44-
4539
- name: Install dependencies
46-
uses: php-actions/composer@v5
40+
uses: php-actions/composer@v6
4741
with:
4842
dev: yes
4943
args: --prefer-dist --no-interaction
@@ -69,7 +63,7 @@ jobs:
6963
- name: Start Test Server
7064
run: |
7165
cd $GITHUB_WORKSPACE
72-
cp -fv tests/default.behat.yml tests/behat.yml
66+
cp -fv tests/ci/behat.yml tests/behat.yml
7367
cp -fv tests/ci/config.php public_html/lists/config/config.php
7468
mkdir -p output/screenshots
7569
touch output/screenshots/README.md

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ public_html/lists/admin/info/
1212
.vagrant
1313
public_html/lists/updater
1414
public_html/lists/texts
15+
public_html/lists/admin/plugins/
16+
/parked/
17+
public_html/lists/admin/ui/dressprow
18+
public_html/lists/admin/ui/dressprow-ph
19+
public_html/lists/admin/ui/phplist-ui-*
1520

Vagrantfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@
88
## below
99

1010
Vagrant.configure("2") do |config|
11-
config.vagrant.plugins = [
12-
"vagrant-docker-compose",
13-
]
1411
config.vm.box = "ubuntu/bionic64"
15-
config.vm.provision :docker
16-
config.vm.provision :docker_compose,
17-
compose_version: "1.22.0"
12+
config.vm.network "public_network"
1813

1914
config.vm.provider "virtualbox" do |v|
2015
v.memory = 10640
@@ -31,9 +26,7 @@ Vagrant.configure("2") do |config|
3126
apt install software-properties-common
3227
add-apt-repository ppa:ondrej/php
3328
DEBIAN_FRONTEND=noninteractive apt update
34-
DEBIAN_FRONTEND=noninteractive apt install -y composer mariadb-client mariadb-server postfix chromium-chromedriver firefox openjdk-8-jre-headless fonts-liberation
35-
DEBIAN_FRONTEND=noninteractive apt install -y php7.0 php7.0-mbstring php7.0-curl php7.0-mysql php7.0-xml php7.0-zip
36-
DEBIAN_FRONTEND=noninteractive apt install -y php7.1 php7.1-mbstring php7.1-curl php7.1-mysql php7.1-xml php7.1-zip
29+
DEBIAN_FRONTEND=noninteractive apt install -y make mariadb-client mariadb-server postfix chromium-chromedriver firefox openjdk-8-jre-headless fonts-liberation xdg-utils
3730
DEBIAN_FRONTEND=noninteractive apt install -y php7.2 php7.2-mbstring php7.2-curl php7.2-mysql php7.2-xml php7.2-zip
3831
DEBIAN_FRONTEND=noninteractive apt install -y php7.3 php7.3-mbstring php7.3-curl php7.3-mysql php7.3-xml php7.3-zip
3932
DEBIAN_FRONTEND=noninteractive apt install -y php7.4 php7.4-mbstring php7.4-curl php7.4-mysql php7.4-xml php7.4-zip
@@ -49,17 +42,20 @@ Vagrant.configure("2") do |config|
4942
update-alternatives --set phpize /usr/bin/phpize$PHPVERSION
5043
update-alternatives --set php-config /usr/bin/php-config$PHPVERSION
5144
[[ ! -z $(which google-chrome) ]] || {
52-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
45+
[[ ! -f google-chrome-stable_current_amd64.deb ]] && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
5346
dpkg -i google-chrome-stable_current_amd64.deb
5447
}
5548
google-chrome --version
5649
rm -rf vendor
57-
composer install
50+
bin/update-composer.sh
51+
sudo -u vagrant php composer.phar update
52+
ln -s /vagrant/vendor/bin/chromedriver /usr/local/bin/chromedriver
53+
ln -s /vagrant/vendor/bin/geckodriver /usr/local/bin/geckodriver
5854
service postfix stop
5955
service apache2 stop
6056
service mysqld start
6157
cp -fv tests/ci/config.php public_html/lists/config/config.php
62-
cp -fv tests/default.behat.yml tests/behat.yml
58+
cp -fv tests/ci/behat.yml tests/behat.yml
6359
[[ ! -d public_html/lists/admin/ui/phplist-ui-bootlist ]] && {
6460
cd public_html/lists/admin/ui/
6561
wget https://github.com/phpList/phplist-ui-bootlist/archive/master.tar.gz

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public_html/lists/admin/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

public_html/lists/admin/class.phplistmailer.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ public function __construct($messageid, $email, $inBlast = true, $exceptions = f
8080

8181
if ($GLOBALS['emailsenderplugin']) {
8282
$this->Mailer = 'plugin';
83+
} elseif (!$this->inBlast && empty($_SESSION['adminloggedin']) &&
84+
defined('PHPMAILERSUBSCRIBEHOST') &&
85+
defined('PHPMAILERSUBSCRIBEPORT') && PHPMAILERSUBSCRIBEHOST != '') {
86+
# logEvent('Sending email via PHPMAILERSUBSCRIBEHOST '.PHPMAILERSUBSCRIBEHOST);
87+
$this->Host = PHPMAILERSUBSCRIBEHOST;
88+
$this->Port = PHPMAILERSUBSCRIBEPORT;
89+
$this->Mailer = 'smtp';
8390
} elseif ($this->inBlast && defined('PHPMAILERBLASTHOST') && defined('PHPMAILERBLASTPORT') && PHPMAILERBLASTHOST != '') {
8491
$this->Host = PHPMAILERBLASTHOST;
8592
$this->Port = PHPMAILERBLASTPORT;
@@ -95,7 +102,7 @@ public function __construct($messageid, $email, $inBlast = true, $exceptions = f
95102
if (defined('PHPMAILERPORT')) {
96103
$this->Port = PHPMAILERPORT;
97104
}
98-
//logEvent('Sending email via '.PHPMAILERHOST);
105+
# logEvent('Sending email via PHPMAILERTESTHOST '.PHPMAILERTESTHOST);
99106
$this->Host = PHPMAILERTESTHOST;
100107
if (isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != ''
101108
&& isset($GLOBALS['phpmailer_smtppassword']) && $GLOBALS['phpmailer_smtppassword']
@@ -111,6 +118,7 @@ public function __construct($messageid, $email, $inBlast = true, $exceptions = f
111118
}
112119
//logEvent('Sending email via '.PHPMAILERHOST);
113120
$this->Host = PHPMAILERHOST;
121+
# logEvent('Sending email via PHPMAILERHOST '.PHPMAILERHOST);
114122
if (POP_BEFORE_SMTP) {
115123
// authenticate using the smtp user and password
116124
$pop = new POP3();

public_html/lists/admin/init.php

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,27 @@
343343
if (!defined('PHPMAILERHOST')) {
344344
define('PHPMAILERHOST', '');
345345
}
346+
if (!defined('PHPMAILERSUBSCRIBEHOST') && defined('PHPMAILERHOST')) {
347+
define('PHPMAILERSUBSCRIBEHOST', PHPMAILERHOST);
348+
}
349+
if (!defined('PHPMAILERBLASTHOST') && defined('PHPMAILERHOST')) {
350+
define('PHPMAILERBLASTHOST', PHPMAILERHOST);
351+
}
352+
if (!defined('PHPMAILERBLASTPORT') && defined('PHPMAILERPORT')) {
353+
define('PHPMAILERBLASTPORT', PHPMAILERPORT);
354+
}
355+
if (!defined('PHPMAILERSUBSCRIBEPORT') && defined('PHPMAILERPORT')) {
356+
define('PHPMAILERSUBSCRIBEPORT', PHPMAILERPORT);
357+
}
358+
if (!defined('PHPMAILERTESTHOST') && defined('PHPMAILERHOST')) {
359+
define('PHPMAILERTESTHOST', PHPMAILERHOST);
360+
}
361+
if (!defined('PHPMAILER_SECURE')) {
362+
define('PHPMAILER_SECURE', 'auto');
363+
}
364+
if (!defined('PHPMAILER_SMTP_DEBUG')) {
365+
define('PHPMAILER_SMTP_DEBUG', 0);
366+
}
346367
if (!defined('MANUALLY_PROCESS_QUEUE')) {
347368
define('MANUALLY_PROCESS_QUEUE', 1);
348369
}
@@ -599,21 +620,6 @@
599620
if (!defined('INTERFACELIB')) {
600621
define('INTERFACELIB', 1);
601622
}
602-
if (!defined('PHPMAILERBLASTHOST') && defined('PHPMAILERHOST')) {
603-
define('PHPMAILERBLASTHOST', PHPMAILERHOST);
604-
}
605-
if (!defined('PHPMAILERBLASTPORT') && defined('PHPMAILERPORT')) {
606-
define('PHPMAILERBLASTPORT', PHPMAILERPORT);
607-
}
608-
if (!defined('PHPMAILERTESTHOST') && defined('PHPMAILERHOST')) {
609-
define('PHPMAILERTESTHOST', PHPMAILERHOST);
610-
}
611-
if (!defined('PHPMAILER_SECURE')) {
612-
define('PHPMAILER_SECURE', 'auto');
613-
}
614-
if (!defined('PHPMAILER_SMTP_DEBUG')) {
615-
define('PHPMAILER_SMTP_DEBUG', 0);
616-
}
617623
if (!defined('POP_BEFORE_SMTP')) {
618624
define('POP_BEFORE_SMTP', '');
619625
}

0 commit comments

Comments
 (0)