Skip to content

Commit 0d1da2b

Browse files
Fixes
1 parent ba8313a commit 0d1da2b

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
uses: actions/checkout@v1
1616
- name: Build Joomla Package
1717
id: jxbuild
18-
uses: mavrosxristoforos/jxb@1.0.1
18+
uses: mavrosxristoforos/jxb@master
1919
with:
2020
build-file: 'build_ns.jxb'
2121
- name: Get XML
2222
id: getxml
23-
uses: mavrosxristoforos/get-xml-info@1.1.1
23+
uses: mavrosxristoforos/get-xml-info@master
2424
with:
2525
xml-file: 'pkg_ns.xml'
2626
xpath: '//version'
@@ -40,7 +40,7 @@ jobs:
4040
prerelease: false
4141
- name: Upload Release Asset
4242
id: upload-release-asset
43-
uses: actions/upload-release-asset@v1.0.1
43+
uses: actions/upload-release-asset@master
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4646
with:

mod_newsletter_subscriber/mod_newsletter_subscriber.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use \Joomla\CMS\Factory;
1616
use \Joomla\CMS\Language\Text;
1717
use \Joomla\CMS\Helper\ModuleHelper;
18+
use \Joomla\CMS\Captcha\Captcha;
1819
//use \Joomla\CMS\Plugin\PluginHelper;
1920

2021
// Notification Options
@@ -76,7 +77,7 @@
7677
// check captcha plugin.
7778
$isCaptchaValidated = true;
7879
if (Factory::getConfig()->get('captcha') != '0') {
79-
$captcha = JCaptcha::getInstance(Factory::getConfig()->get('captcha'));
80+
$captcha = Captcha::getInstance(Factory::getConfig()->get('captcha'));
8081
try {
8182
$isCaptchaValidated = $captcha->checkAnswer(Factory::getApplication()->input->get('ns_recaptcha', null, 'string'));
8283
}
@@ -163,7 +164,7 @@
163164
// Prepare for Template
164165
$anti_spam_field = '';
165166
if ($enable_anti_spam == '2') {
166-
$anti_spam_field = (Factory::getConfig()->get('captcha') != '0') ? JCaptcha::getInstance(Factory::getConfig()->get('captcha'))->display('ns_recaptcha', 'ns_recaptcha', 'g-recaptcha') : '';
167+
$anti_spam_field = (Factory::getConfig()->get('captcha') != '0') ? Captcha::getInstance(Factory::getConfig()->get('captcha'))->display('ns_recaptcha', 'ns_recaptcha', 'g-recaptcha') : '';
167168
}
168169
else if ($enable_anti_spam == '1') {
169170
// Label as Placeholder option is intentionally overlooked.

plg_newsletter_subscriber/newsletter_subscriber.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use \Joomla\CMS\Language\Text;
1717
use \Joomla\CMS\Plugin\CMSPlugin;
1818
use \Joomla\CMS\Plugin\PluginHelper;
19+
use \Joomla\CMS\Captcha\Captcha;
1920

2021
class plgContentNewsletter_subscriber extends CMSPlugin {
2122

@@ -92,7 +93,7 @@ public function onContentPrepare($context, &$row, &$params, $page = 0) {
9293
// check captcha plugin.
9394
$isCaptchaValidated = true;
9495
if (Factory::getConfig()->get('captcha') != '0') {
95-
$captcha = JCaptcha::getInstance(Factory::getConfig()->get('captcha'));
96+
$captcha = Captcha::getInstance(Factory::getConfig()->get('captcha'));
9697
try {
9798
$isCaptchaValidated = $captcha->checkAnswer(Factory::getApplication()->input->get('ns_recaptcha', null, 'string'));
9899
}
@@ -179,7 +180,7 @@ public function onContentPrepare($context, &$row, &$params, $page = 0) {
179180
// Prepare for Template
180181
$anti_spam_field = '';
181182
if ($enable_anti_spam == '2') {
182-
$anti_spam_field = (Factory::getConfig()->get('captcha') != '0') ? JCaptcha::getInstance(Factory::getConfig()->get('captcha'))->display('ns_recaptcha', 'ns_recaptcha', 'g-recaptcha') : '';
183+
$anti_spam_field = (Factory::getConfig()->get('captcha') != '0') ? Captcha::getInstance(Factory::getConfig()->get('captcha'))->display('ns_recaptcha', 'ns_recaptcha', 'g-recaptcha') : '';
183184
}
184185
else if ($enable_anti_spam == '1') {
185186
// Label as Placeholder option is intentionally overlooked.

0 commit comments

Comments
 (0)