Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
# START Basic Checks Job (EPV, code sniffer, images check, etc.)
basic-checks:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand All @@ -33,14 +33,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

# START MySQL and MariaDB Job
mysql-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -156,14 +156,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -172,7 +172,7 @@ jobs:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT

- name: Setup PHP
if: ${{ matrix.COVERAGE != 1 }}
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:

# START PostgreSQL Job
postgres-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -301,14 +301,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -317,7 +317,7 @@ jobs:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:

# START Other Tests Job (SQLite 3 and mssql)
other-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -396,14 +396,14 @@ jobs:

steps:
- name: Checkout phpBB
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: phpbb/phpbb
ref: ${{ env.PHPBB_BRANCH }}
path: phpBB3

- name: Checkout extension
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}

Expand All @@ -417,7 +417,7 @@ jobs:
else
db=$(echo "${MATRIX_DB%%:*}")
fi
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 0 additions & 8 deletions collection/sites/clyp.yml

This file was deleted.

8 changes: 0 additions & 8 deletions collection/sites/codepen.yml

This file was deleted.

4 changes: 2 additions & 2 deletions event/main_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function disable_media_embed($event)
}

/**
* setup a cache directory to improve scraping performance
* Set up a cache directory to improve scraping performance
*
* @param \phpbb\event\data $event The event object
* @return void
Expand Down Expand Up @@ -315,7 +315,7 @@ public function check_bbcode_enabled($event)
{
if (!$event['allow_bbcode'])
{
// Want to leave plugin enabled but it seems plugin won't work
// Want to leave plugin enabled, but it seems plugin won't work
// when tag is disabled, so we have to disable both it seems.
$this->disable_plugin = true;
$this->disable_tag = true;
Expand Down
10 changes: 8 additions & 2 deletions ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@

class ext extends \phpbb\extension\base
{
/** @var string Minimum requirements: phpBB 3.3.2 because using role_exists in migrations */
/**
* @var string Minimum requirements:
* phpBB 3.3.2 because using role_exists in migrations
* ph[BB 3.3.2 because TextFormatter 2.7.5 supports clyp.it and codepen.com
*/
public const PHPBB_MINIMUM = '3.3.2';

/** @var string YAML file extension */
/**
* @var string YAML file extension
*/
public const YML = '.yml';

/**
Expand Down
8 changes: 6 additions & 2 deletions tests/custom_sites_collection_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ public function test_get_collection()

$collection = $customsitescollection->get_collection();

$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/codepen.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/snotr.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/allocine.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/dotsub.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/ebaumsworld.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/moddb.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/ok.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/schooltube.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/snotr.yml', $collection);
$this->assertContains('phpBB/ext/phpbb/mediaembed/collection/sites/videopress.yml', $collection);
$this->assertNotContains('phpBB/ext/phpbb/mediaembed/collection/sites/youtube.yml', $collection);
}
Expand Down