Skip to content

Commit

Permalink
Update for the new base class for captcha plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfredoRamos committed Jan 12, 2025
1 parent 03e215e commit 2ca22ea
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 163 deletions.
33 changes: 6 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ env:
IMAGE_ICC: 1
EPV: 1
EXECUTABLE_FILES: 1
PHPBB_BRANCH: 3.3.x
PHPBB_BRANCH: master

jobs:
basic-tests:
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
name: php ${{ matrix.php-version }}, none none
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
PHP_VERSION: ${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
php-version: ['7.2']
php-version: ['8.1']
steps:
- name: Checkout phpBB
uses: actions/checkout@v4
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Setup EPV
if: ${{ env.EPV == 1 }}
working-directory: phpBB3/phpBB
run: composer require -n --prefer-dist --no-progress phpbb/epv:dev-master
run: composer require -n --prefer-dist --no-progress --with-all-dependencies phpbb/epv:dev-master

- name: Run code sniffer
if: ${{ env.SNIFF == 1 }}
Expand All @@ -107,7 +107,7 @@ jobs:
mysql-tests:
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
name: php ${{ matrix.php-version }}, ${{ matrix.db-type }} ${{ matrix.db-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
services:
mysql:
image: ${{ (matrix.db-type == 'mysql' || matrix.db-type == 'mariadb') && matrix.db-type || 'mariadb' }}:${{ (matrix.db-type == 'mysql' || matrix.db-type == 'mariadb' && matrix.db-version != 'none') && matrix.db-version || 'latest' }}
Expand All @@ -129,24 +129,6 @@ jobs:
fail-fast: false
matrix:
include:
- php-version: '7.2'
db-type: 'mysql'
db-version: '5.7'
- php-version: '7.2'
db-type: 'mariadb'
db-version: '10.5'
- php-version: '7.3'
db-type: 'mariadb'
db-version: '10.5'
- php-version: '7.4'
db-type: 'mysql'
db-version: '8.0'
- php-version: '7.4'
db-type: 'mariadb'
db-version: '10.5'
- php-version: '8.0'
db-type: 'mariadb'
db-version: '10.5'
- php-version: '8.1'
db-type: 'mariadb'
db-version: '10.6'
Expand Down Expand Up @@ -231,7 +213,7 @@ jobs:
postgresql-tests:
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
name: php ${{ matrix.php-version }}, ${{ matrix.db-type }} ${{ matrix.db-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
services:
postgres:
image: ${{ (matrix.db-type == 'postgres') && matrix.db-type || 'postgres' }}:${{ (matrix.db-type == 'postgres' && matrix.db-version != 'none') && matrix.db-version || 'alpine' }}
Expand All @@ -254,9 +236,6 @@ jobs:
fail-fast: false
matrix:
include:
- php-version: '7.2'
db-type: 'postgres'
db-version: '16-alpine'
- php-version: '8.4'
db-type: 'postgres'
db-version: '17-alpine'
Expand Down
8 changes: 4 additions & 4 deletions adm/style/acp_captcha_hcaptcha.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% include 'overall_header.html' %}
{% include('overall_header.html') %}

<a id="maincontent"></a>

Expand Down Expand Up @@ -34,7 +34,7 @@ <h1>{{ lang('ACP_VC_SETTINGS') }}</h1>
<dd>
<input type="password" id="hcaptcha-secret" name="hcaptcha_secret" value="{{ HCAPTCHA_SECRET }}" required="required" autocomplete="off" class="medium">
<span id="toggle-hcaptcha-secret" title="{{ lang('ACP_HCAPTCHA_TOGGLE_SECRET', lang('HCAPTCHA_SECRET'))|striptags|escape('html_attr') }}">
<i class="icon acp-icon acp-icon-resync fa-eye fa-fw" aria-hidden="true"></i>
<i class="icon o-icon o-icon-font acp-icon acp-icon-resync fa-eye fa-fw" aria-hidden="true"></i>
</span>
</dd>
</dl>
Expand Down Expand Up @@ -76,7 +76,7 @@ <h1>{{ lang('ACP_VC_SETTINGS') }}</h1>
<div class="warningbox hidden"><strong>{{ lang('WARNING') }}</strong> {{ lang('CAPTCHA_PREVIEW_MSG') }}</div>
{% endif %}

{% include CAPTCHA_PREVIEW %}
{% include(CAPTCHA_PREVIEW) %}
</fieldset>

<fieldset>
Expand All @@ -91,4 +91,4 @@ <h1>{{ lang('ACP_VC_SETTINGS') }}</h1>
</fieldset>
</form>

{% include 'overall_footer.html' %}
{% include('overall_footer.html') %}
4 changes: 2 additions & 2 deletions adm/style/event/acp_overall_footer_after.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if S_HCAPTCHA_SETTINGS and not INCLUDED_HCAPTCHA_ACP_JS %}
{% INCLUDEJS '@alfredoramos_hcaptcha/js/settings.js' %}
{% INCLUDEJS('@alfredoramos_hcaptcha/js/settings.js') %}
{%- set INCLUDED_HCAPTCHA_ACP_JS = true -%}
{% endif %}

{% if S_HCAPTCHA_AVAILABLE and U_HCAPTCHA_SCRIPT and not INCLUDED_HCAPTCHA_JS %}
{% INCLUDEJS U_HCAPTCHA_SCRIPT %}
{% INCLUDEJS(U_HCAPTCHA_SCRIPT) %}
{%- set INCLUDED_HCAPTCHA_JS = true -%}
{% endif %}
2 changes: 1 addition & 1 deletion adm/style/event/acp_overall_header_head_append.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if S_HCAPTCHA_SETTINGS and not INCLUDED_HCAPTCHA_ACP_CSS %}
{% INCLUDECSS '@alfredoramos_hcaptcha/css/style.css' %}
{% INCLUDECSS('@alfredoramos_hcaptcha/css/style.css') %}
{%- set INCLUDED_HCAPTCHA_ACP_CSS = true -%}
{% endif %}
Loading

0 comments on commit 2ca22ea

Please sign in to comment.