feat(episodes): add create form and view pages for episode

- add james-heinrich/getid3 library as a dependency to composer.json
- update DEPENDENCIES.md file
- fix episodes table migration script
- add js devDependencies: prettier, @prettier/plugin-php and lint-staged to automatically format staged files before commit
- reformat all files to the prettier format
- refactor code by separating some logic as helper functions
- overwrite existing files when uploading new files with the same name

fixes #1
This commit is contained in:
Yassine Doghri 2020-06-10 15:00:12 +00:00
parent 044482174e
commit f3b2c8b84f
84 changed files with 4744 additions and 2236 deletions

View File

@ -12,7 +12,8 @@
"streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker",
"naumovs.color-highlight", "naumovs.color-highlight",
"heybourn.headwind", "heybourn.headwind",
"anish-m.ci-snippets2", "wayou.vscode-todo-highlight",
"wayou.vscode-todo-highlight" "esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
] ]
} }

11
.gitignore vendored
View File

@ -125,15 +125,16 @@ nb-configuration.xml
/phpunit*.xml /phpunit*.xml
/.phpunit.*.cache /.phpunit.*.cache
# Media files
public/media/*
# npm # npm
yarn.lock yarn.lock
node_modules node_modules
# potcss generated file # public folder
public/index.css public/*
!public/.htaccess
!public/favicon.ico
!public/index.php
!public/robots.txt
#------------------------- #-------------------------
# Docker volumes # Docker volumes

13
.prettierrc.json Normal file
View File

@ -0,0 +1,13 @@
{
"trailingComma": "es5",
"overrides": [
{
"files": "*.php",
"options": {
"phpVersion": "7.2",
"singleQuote": true,
"trailingCommaPHP": true
}
}
]
}

View File

@ -11,3 +11,4 @@ Castopod uses the following components:
- [User agent list](https://github.com/opawg/user-agents) ([by Open Podcast Analytics Working Group](https://github.com/opawg)) ([MIT license](https://github.com/opawg/user-agents/blob/master/LICENSE)) - [User agent list](https://github.com/opawg/user-agents) ([by Open Podcast Analytics Working Group](https://github.com/opawg)) ([MIT license](https://github.com/opawg/user-agents/blob/master/LICENSE))
- [WhichBrowser/Parser-PHP](https://github.com/WhichBrowser/Parser-PHP) ([MIT License](https://github.com/WhichBrowser/Parser-PHP/blob/master/LICENSE)) - [WhichBrowser/Parser-PHP](https://github.com/WhichBrowser/Parser-PHP) ([MIT License](https://github.com/WhichBrowser/Parser-PHP/blob/master/LICENSE))
- [Quill Rich Text Editor](https://github.com/quilljs/quill) ([BSD 3-Clause "New" or "Revised" License](https://github.com/quilljs/quill/blob/develop/LICENSE)) - [Quill Rich Text Editor](https://github.com/quilljs/quill) ([BSD 3-Clause "New" or "Revised" License](https://github.com/quilljs/quill/blob/develop/LICENSE))
- [getID3](https://github.com/JamesHeinrich/getID3) ([GNU General Public License v3](https://github.com/JamesHeinrich/getID3/blob/2.0/licenses/license.gpl-30.txt))

View File

@ -12,3 +12,8 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install intl && docker-php-ext-install intl
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN echo "file_uploads = On\n" \
"memory_limit = 100M\n" \
"upload_max_filesize = 100M\n" \
> /usr/local/etc/php/conf.d/uploads.ini

View File

@ -23,7 +23,6 @@ Moreover Podcasters can choose to publish on Castopod while keeping their existi
You can check castopod's documentation for [setting up a development environment](./docs/setup-development.md). You can check castopod's documentation for [setting up a development environment](./docs/setup-development.md).
## Support ## Support
[Castopod](https://nlnet.nl/project/Castopod/) was funded through the [NGI0 Discovery](https://nlnet.nl/discovery/) Fund, a fund established by NLnet with financial support from the European Commission's [Next Generation Internet](https://www.ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322. [Castopod](https://nlnet.nl/project/Castopod/) was funded through the [NGI0 Discovery](https://nlnet.nl/discovery/) Fund, a fund established by NLnet with financial support from the European Commission's [Next Generation Internet](https://www.ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.

View File

@ -6,7 +6,6 @@ use CodeIgniter\Config\BaseConfig;
class App extends BaseConfig class App extends BaseConfig
{ {
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Base Site URL | Base Site URL

View File

@ -88,5 +88,4 @@ class Autoload extends \CodeIgniter\Config\AutoloadConfig
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
} }

View File

@ -8,7 +8,14 @@
| it and display a generic error message. | it and display a generic error message.
*/ */
ini_set('display_errors', '0'); ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); error_reporting(
E_ALL &
~E_NOTICE &
~E_DEPRECATED &
~E_STRICT &
~E_USER_NOTICE &
~E_USER_DEPRECATED
);
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -21,7 +21,8 @@ defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
| The path that Composer's autoload file is expected to live. By default, | The path that Composer's autoload file is expected to live. By default,
| the vendor folder is in the Root directory, but you can customize that here. | the vendor folder is in the Root directory, but you can customize that here.
*/ */
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php'); defined('COMPOSER_PATH') ||
define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -44,5 +44,4 @@ class ContentSecurityPolicy extends BaseConfig
// list of actions allowed; string or array of strings // list of actions allowed; string or array of strings
public $sandbox = null; public $sandbox = null;
} }

View File

@ -38,7 +38,7 @@ class Database extends \CodeIgniter\Database\Config
'DBDriver' => 'MySQLi', 'DBDriver' => 'MySQLi',
'DBPrefix' => '', 'DBPrefix' => '',
'pConnect' => false, 'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'), 'DBDebug' => ENVIRONMENT !== 'production',
'cacheOn' => false, 'cacheOn' => false,
'cacheDir' => '', 'cacheDir' => '',
'charset' => 'utf8', 'charset' => 'utf8',
@ -66,7 +66,7 @@ class Database extends \CodeIgniter\Database\Config
'DBDriver' => 'SQLite3', 'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS 'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false, 'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'), 'DBDebug' => ENVIRONMENT !== 'production',
'cacheOn' => false, 'cacheOn' => false,
'cacheDir' => '', 'cacheDir' => '',
'charset' => 'utf8', 'charset' => 'utf8',
@ -88,20 +88,19 @@ class Database extends \CodeIgniter\Database\Config
// Ensure that we always set the database group to 'tests' if // Ensure that we always set the database group to 'tests' if
// we are currently running an automated test suite, so that // we are currently running an automated test suite, so that
// we don't overwrite live data on accident. // we don't overwrite live data on accident.
if (ENVIRONMENT === 'testing') if (ENVIRONMENT === 'testing') {
{
$this->defaultGroup = 'tests'; $this->defaultGroup = 'tests';
// Under Travis-CI, we can set an ENV var named 'DB_GROUP' // Under Travis-CI, we can set an ENV var named 'DB_GROUP'
// so that we can test against multiple databases. // so that we can test against multiple databases.
if ($group = getenv('DB')) if ($group = getenv('DB')) {
{ if (is_file(TESTPATH . 'travis/Database.php')) {
if (is_file(TESTPATH . 'travis/Database.php'))
{
require TESTPATH . 'travis/Database.php'; require TESTPATH . 'travis/Database.php';
if (! empty($dbconfig) && array_key_exists($group, $dbconfig)) if (
{ !empty($dbconfig) &&
array_key_exists($group, $dbconfig)
) {
$this->tests = $dbconfig[$group]; $this->tests = $dbconfig[$group];
} }
} }
@ -110,5 +109,4 @@ class Database extends \CodeIgniter\Database\Config
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
} }

View File

@ -8,26 +8,43 @@
class DocTypes class DocTypes
{ {
public $list = public $list = [
[ 'xhtml11' =>
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'xhtml1-strict' =>
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'xhtml1-trans' =>
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>', 'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'html4-strict' =>
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', 'html4-trans' =>
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">', 'html4-frame' =>
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', 'mathml1' =>
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">', '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">', 'mathml2' =>
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">', '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">', 'svg10' =>
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">', '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">', 'svg11' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' =>
'<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
]; ];
} }

View File

@ -5,7 +5,6 @@ use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig class Email extends BaseConfig
{ {
/** /**
* @var string * @var string
*/ */
@ -167,5 +166,4 @@ class Email extends BaseConfig
* @var boolean * @var boolean
*/ */
public $DSN = false; public $DSN = false;
} }

View File

@ -32,5 +32,4 @@ class Encryption extends BaseConfig
| The default driver, if you don't specify one, is 'OpenSSL'. | The default driver, if you don't specify one, is 'OpenSSL'.
*/ */
public $driver = 'OpenSSL'; public $driver = 'OpenSSL';
} }

View File

@ -20,10 +20,8 @@ use CodeIgniter\Events\Events;
*/ */
Events::on('pre_system', function () { Events::on('pre_system', function () {
if (ENVIRONMENT !== 'testing') if (ENVIRONMENT !== 'testing') {
{ while (\ob_get_level() > 0) {
while (\ob_get_level() > 0)
{
\ob_end_flush(); \ob_end_flush();
} }
@ -38,9 +36,11 @@ Events::on('pre_system', function () {
* -------------------------------------------------------------------- * --------------------------------------------------------------------
* If you delete, they will no longer be collected. * If you delete, they will no longer be collected.
*/ */
if (ENVIRONMENT !== 'production') if (ENVIRONMENT !== 'production') {
{ Events::on(
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect'); 'DBQuery',
'CodeIgniter\Debug\Toolbar\Collectors\Database::collect'
);
Services::toolbar()->respond(); Services::toolbar()->respond();
} }
}); });

View File

@ -2,5 +2,4 @@
class ForeignCharacters extends \CodeIgniter\Config\ForeignCharacters class ForeignCharacters extends \CodeIgniter\Config\ForeignCharacters
{ {
} }

View File

@ -51,21 +51,22 @@ class Format extends BaseConfig
*/ */
public function getFormatter(string $mime) public function getFormatter(string $mime)
{ {
if (! array_key_exists($mime, $this->formatters)) if (!array_key_exists($mime, $this->formatters)) {
{ throw new \InvalidArgumentException(
throw new \InvalidArgumentException('No Formatter defined for mime type: ' . $mime); 'No Formatter defined for mime type: ' . $mime
);
} }
$class = $this->formatters[$mime]; $class = $this->formatters[$mime];
if (! class_exists($class)) if (!class_exists($class)) {
{ throw new \BadMethodCallException(
throw new \BadMethodCallException($class . ' is not a valid Formatter.'); $class . ' is not a valid Formatter.'
);
} }
return new $class(); return new $class();
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
} }

View File

@ -4,7 +4,6 @@ use CodeIgniter\Config\BaseConfig;
class Honeypot extends BaseConfig class Honeypot extends BaseConfig
{ {
/** /**
* Makes Honeypot visible or not to human * Makes Honeypot visible or not to human
* *

View File

@ -70,13 +70,11 @@ class Logger extends BaseConfig
| |
*/ */
public $handlers = [ public $handlers = [
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// File Handler // File Handler
//-------------------------------------------------------------------- //--------------------------------------------------------------------
'CodeIgniter\Log\Handlers\FileHandler' => [ 'CodeIgniter\Log\Handlers\FileHandler' => [
/* /*
* The log levels that this handler will handle. * The log levels that this handler will handle.
*/ */

View File

@ -46,5 +46,4 @@ class Migrations extends BaseConfig
| |
*/ */
public $timestampFormat = 'Y-m-d-His_'; public $timestampFormat = 'Y-m-d-His_';
} }

View File

@ -51,15 +51,9 @@ class Mimes
'dms' => 'application/octet-stream', 'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream', 'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream', 'lzh' => 'application/octet-stream',
'exe' => [ 'exe' => ['application/octet-stream', 'application/x-msdownload'],
'application/octet-stream',
'application/x-msdownload',
],
'class' => 'application/octet-stream', 'class' => 'application/octet-stream',
'psd' => [ 'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
'application/x-photoshop',
'image/vnd.adobe.photoshop',
],
'so' => 'application/octet-stream', 'so' => 'application/octet-stream',
'sea' => 'application/octet-stream', 'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream', 'dll' => 'application/octet-stream',
@ -70,10 +64,7 @@ class Mimes
'application/x-download', 'application/x-download',
'binary/octet-stream', 'binary/octet-stream',
], ],
'ai' => [ 'ai' => ['application/pdf', 'application/postscript'],
'application/pdf',
'application/postscript',
],
'eps' => 'application/postscript', 'eps' => 'application/postscript',
'ps' => 'application/postscript', 'ps' => 'application/postscript',
'smi' => 'application/smil', 'smi' => 'application/smil',
@ -125,17 +116,11 @@ class Mimes
'php3' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source', 'phps' => 'application/x-httpd-php-source',
'js' => [ 'js' => ['application/x-javascript', 'text/plain'],
'application/x-javascript',
'text/plain',
],
'swf' => 'application/x-shockwave-flash', 'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit', 'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar', 'tar' => 'application/x-tar',
'tgz' => [ 'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
'application/x-tar',
'application/x-gzip-compressed',
],
'z' => 'application/x-compress', 'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml', 'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml',
@ -155,31 +140,16 @@ class Mimes
'midi' => 'audio/midi', 'midi' => 'audio/midi',
'mpga' => 'audio/mpeg', 'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg', 'mp2' => 'audio/mpeg',
'mp3' => [ 'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'],
'audio/mpeg', 'aif' => ['audio/x-aiff', 'audio/aiff'],
'audio/mpg', 'aiff' => ['audio/x-aiff', 'audio/aiff'],
'audio/mpeg3',
'audio/mp3',
],
'aif' => [
'audio/x-aiff',
'audio/aiff',
],
'aiff' => [
'audio/x-aiff',
'audio/aiff',
],
'aifc' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio', 'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin', 'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio', 'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo', 'rv' => 'video/vnd.rn-realvideo',
'wav' => [ 'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
'audio/x-wav',
'audio/wave',
'audio/wav',
],
'bmp' => [ 'bmp' => [
'image/bmp', 'image/bmp',
'image/x-bmp', 'image/x-bmp',
@ -194,106 +164,31 @@ class Mimes
'application/x-win-bitmap', 'application/x-win-bitmap',
], ],
'gif' => 'image/gif', 'gif' => 'image/gif',
'jpg' => [ 'jpg' => ['image/jpeg', 'image/pjpeg'],
'image/jpeg', 'jpeg' => ['image/jpeg', 'image/pjpeg'],
'image/pjpeg', 'jpe' => ['image/jpeg', 'image/pjpeg'],
], 'jp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpeg' => [ 'j2k' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'image/jpeg', 'jpf' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'image/pjpeg', 'jpg2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
], 'jpx' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpe' => [ 'jpm' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'image/jpeg', 'mj2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'image/pjpeg', 'mjp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
], 'png' => ['image/png', 'image/x-png'],
'jp2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'j2k' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpf' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpg2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpx' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpm' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'mj2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'mjp2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'png' => [
'image/png',
'image/x-png',
],
'tif' => 'image/tiff', 'tif' => 'image/tiff',
'tiff' => 'image/tiff', 'tiff' => 'image/tiff',
'css' => [ 'css' => ['text/css', 'text/plain'],
'text/css', 'html' => ['text/html', 'text/plain'],
'text/plain', 'htm' => ['text/html', 'text/plain'],
], 'shtml' => ['text/html', 'text/plain'],
'html' => [
'text/html',
'text/plain',
],
'htm' => [
'text/html',
'text/plain',
],
'shtml' => [
'text/html',
'text/plain',
],
'txt' => 'text/plain', 'txt' => 'text/plain',
'text' => 'text/plain', 'text' => 'text/plain',
'log' => [ 'log' => ['text/plain', 'text/x-log'],
'text/plain',
'text/x-log',
],
'rtx' => 'text/richtext', 'rtx' => 'text/richtext',
'rtf' => 'text/rtf', 'rtf' => 'text/rtf',
'xml' => [ 'xml' => ['application/xml', 'text/xml', 'text/plain'],
'application/xml', 'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
'text/xml',
'text/plain',
],
'xsl' => [
'application/xml',
'text/xsl',
'text/xml',
],
'mpeg' => 'video/mpeg', 'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg', 'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg', 'mpe' => 'video/mpeg',
@ -306,20 +201,14 @@ class Mimes
'application/x-troff-msvideo', 'application/x-troff-msvideo',
], ],
'movie' => 'video/x-sgi-movie', 'movie' => 'video/x-sgi-movie',
'doc' => [ 'doc' => ['application/msword', 'application/vnd.ms-office'],
'application/msword',
'application/vnd.ms-office',
],
'docx' => [ 'docx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip', 'application/zip',
'application/msword', 'application/msword',
'application/x-zip', 'application/x-zip',
], ],
'dot' => [ 'dot' => ['application/msword', 'application/vnd.ms-office'],
'application/msword',
'application/vnd.ms-office',
],
'dotx' => [ 'dotx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip', 'application/zip',
@ -332,35 +221,20 @@ class Mimes
'application/msword', 'application/msword',
'application/x-zip', 'application/x-zip',
], ],
'word' => [ 'word' => ['application/msword', 'application/octet-stream'],
'application/msword',
'application/octet-stream',
],
'xl' => 'application/excel', 'xl' => 'application/excel',
'eml' => 'message/rfc822', 'eml' => 'message/rfc822',
'json' => [ 'json' => ['application/json', 'text/json'],
'application/json',
'text/json',
],
'pem' => [ 'pem' => [
'application/x-x509-user-cert', 'application/x-x509-user-cert',
'application/x-pem-file', 'application/x-pem-file',
'application/octet-stream', 'application/octet-stream',
], ],
'p10' => [ 'p10' => ['application/x-pkcs10', 'application/pkcs10'],
'application/x-pkcs10',
'application/pkcs10',
],
'p12' => 'application/x-pkcs12', 'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature', 'p7a' => 'application/x-pkcs7-signature',
'p7c' => [ 'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'application/pkcs7-mime', 'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'application/x-pkcs7-mime',
],
'p7m' => [
'application/pkcs7-mime',
'application/x-pkcs7-mime',
],
'p7r' => 'application/x-pkcs7-certreqresp', 'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature', 'p7s' => 'application/pkcs7-signature',
'crt' => [ 'crt' => [
@ -368,10 +242,7 @@ class Mimes
'application/x-x509-user-cert', 'application/x-x509-user-cert',
'application/pkix-cert', 'application/pkix-cert',
], ],
'crl' => [ 'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
'application/pkix-crl',
'application/pkcs-crl',
],
'der' => 'application/x-x509-ca-cert', 'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream', 'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp', 'pgp' => 'application/pgp',
@ -379,21 +250,12 @@ class Mimes
'sst' => 'application/octet-stream', 'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream', 'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7', 'rsa' => 'application/x-pkcs7',
'cer' => [ 'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
'application/pkix-cert',
'application/x-x509-ca-cert',
],
'3g2' => 'video/3gpp2', '3g2' => 'video/3gpp2',
'3gp' => [ '3gp' => ['video/3gp', 'video/3gpp'],
'video/3gp',
'video/3gpp',
],
'mp4' => 'video/mp4', 'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a', 'm4a' => 'audio/x-m4a',
'f4v' => [ 'f4v' => ['video/mp4', 'video/x-f4v'],
'video/mp4',
'video/x-f4v',
],
'flv' => 'video/x-flv', 'flv' => 'video/x-flv',
'webm' => 'video/webm', 'webm' => 'video/webm',
'aac' => 'audio/x-acc', 'aac' => 'audio/x-acc',
@ -401,18 +263,11 @@ class Mimes
'm3u' => 'text/plain', 'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml', 'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan', 'vlc' => 'application/videolan',
'wmv' => [ 'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
'video/x-ms-wmv',
'video/x-ms-asf',
],
'au' => 'audio/x-au', 'au' => 'audio/x-au',
'ac3' => 'audio/ac3', 'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac', 'flac' => 'audio/x-flac',
'ogg' => [ 'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
'audio/ogg',
'video/ogg',
'application/ogg',
],
'kmz' => [ 'kmz' => [
'application/vnd.google-earth.kmz', 'application/vnd.google-earth.kmz',
'application/zip', 'application/zip',
@ -441,35 +296,18 @@ class Mimes
'image/x-cdr', 'image/x-cdr',
'zz-application/zz-winassoc-cdr', 'zz-application/zz-winassoc-cdr',
], ],
'wma' => [ 'wma' => ['audio/x-ms-wma', 'video/x-ms-asf'],
'audio/x-ms-wma',
'video/x-ms-asf',
],
'jar' => [ 'jar' => [
'application/java-archive', 'application/java-archive',
'application/x-java-application', 'application/x-java-application',
'application/x-jar', 'application/x-jar',
'application/x-compressed', 'application/x-compressed',
], ],
'svg' => [ 'svg' => ['image/svg+xml', 'application/xml', 'text/xml'],
'image/svg+xml',
'application/xml',
'text/xml',
],
'vcf' => 'text/x-vcard', 'vcf' => 'text/x-vcard',
'srt' => [ 'srt' => ['text/srt', 'text/plain'],
'text/srt', 'vtt' => ['text/vtt', 'text/plain'],
'text/plain', 'ico' => ['image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'],
],
'vtt' => [
'text/vtt',
'text/plain',
],
'ico' => [
'image/x-icon',
'image/x-ico',
'image/vnd.microsoft.icon',
],
]; ];
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@ -485,12 +323,13 @@ class Mimes
{ {
$extension = trim(strtolower($extension), '. '); $extension = trim(strtolower($extension), '. ');
if (! array_key_exists($extension, static::$mimes)) if (!array_key_exists($extension, static::$mimes)) {
{
return null; return null;
} }
return is_array(static::$mimes[$extension]) ? static::$mimes[$extension][0] : static::$mimes[$extension]; return is_array(static::$mimes[$extension])
? static::$mimes[$extension][0]
: static::$mimes[$extension];
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@ -503,21 +342,32 @@ class Mimes
* *
* @return string|null The extension determined, or null if unable to match. * @return string|null The extension determined, or null if unable to match.
*/ */
public static function guessExtensionFromType(string $type, ?string $proposed_extension = null) public static function guessExtensionFromType(
{ string $type,
?string $proposed_extension = null
) {
$type = trim(strtolower($type), '. '); $type = trim(strtolower($type), '. ');
$proposed_extension = trim(strtolower($proposed_extension)); $proposed_extension = trim(strtolower($proposed_extension));
if (! is_null($proposed_extension) && array_key_exists($proposed_extension, static::$mimes) && in_array($type, is_string(static::$mimes[$proposed_extension]) ? [static::$mimes[$proposed_extension]] : static::$mimes[$proposed_extension])) if (
{ !is_null($proposed_extension) &&
array_key_exists($proposed_extension, static::$mimes) &&
in_array(
$type,
is_string(static::$mimes[$proposed_extension])
? [static::$mimes[$proposed_extension]]
: static::$mimes[$proposed_extension]
)
) {
return $proposed_extension; return $proposed_extension;
} }
foreach (static::$mimes as $ext => $types) foreach (static::$mimes as $ext => $types) {
{ if (
if ((is_string($types) && $types === $type) || (is_array($types) && in_array($type, $types))) (is_string($types) && $types === $type) ||
{ (is_array($types) && in_array($type, $types))
) {
return $ext; return $ext;
} }
} }
@ -526,5 +376,4 @@ class Mimes
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
} }

View File

@ -33,12 +33,7 @@ class Modules
| and used during the current application request. If it is not | and used during the current application request. If it is not
| listed here, only the base application elements will be used. | listed here, only the base application elements will be used.
*/ */
public $activeExplorers = [ public $activeExplorers = ['events', 'registrars', 'routes', 'services'];
'events',
'registrars',
'routes',
'services',
];
/** /**
* Should the application auto-discover the requested resources. * Should the application auto-discover the requested resources.
@ -55,8 +50,7 @@ class Modules
*/ */
public function shouldDiscover(string $alias) public function shouldDiscover(string $alias)
{ {
if (! $this->enabled) if (!$this->enabled) {
{
return false; return false;
} }

View File

@ -20,7 +20,8 @@ class Paths
* Include the path if the folder is not in the same directory * Include the path if the folder is not in the same directory
* as this file. * as this file.
*/ */
public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system'; public $systemDirectory =
__DIR__ . '/../../vendor/codeigniter4/framework/system';
/* /*
*--------------------------------------------------------------- *---------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php namespace Config; <?php
namespace Config;
// Create a new instance of our RouteCollection class. // Create a new instance of our RouteCollection class.
$routes = Services::routes(); $routes = Services::routes();
@ -20,7 +22,8 @@ $routes->setDefaultMethod('index');
$routes->setTranslateURIDashes(false); $routes->setTranslateURIDashes(false);
$routes->set404Override(); $routes->set404Override();
$routes->setAutoRoute(false); $routes->setAutoRoute(false);
$routes->addPlaceholder('podcastName', '^@[a-z0-9\_]{1,191}$'); $routes->addPlaceholder('podcastSlug', '@[a-z0-9\_]{1,191}');
$routes->addPlaceholder('episodeSlug', '[a-z0-9\-]{1,191}');
/** /**
* -------------------------------------------------------------------- * --------------------------------------------------------------------
@ -30,9 +33,18 @@ $routes->addPlaceholder('podcastName', '^@[a-z0-9\_]{1,191}$');
// We get a performance increase by specifying the default // We get a performance increase by specifying the default
// route since we don't have to scan directories. // route since we don't have to scan directories.
$routes->get('/', 'Home::index'); $routes->get('/', 'Home::index', ['as' => 'home']);
$routes->add('/podcasts/create', 'Podcasts::create'); $routes->add('new-podcast', 'Podcasts::create', ['as' => 'podcasts_create']);
$routes->add('/(:podcastName)', 'Podcasts::podcastByHandle/$1');
$routes->group('(:podcastSlug)', function ($routes) {
$routes->add('/', 'Podcasts::view/$1', ['as' => 'podcasts_view']);
$routes->add('new-episode', 'Episodes::create/$1', [
'as' => 'episodes_create',
]);
$routes->add('(:episodeSlug)', 'Episodes::view/$1/$2', [
'as' => 'episodes_view',
]);
});
/** /**
* -------------------------------------------------------------------- * --------------------------------------------------------------------

View File

@ -19,14 +19,11 @@ require_once SYSTEMPATH . 'Config/Services.php';
*/ */
class Services extends CoreServices class Services extends CoreServices
{ {
// public static function example($getShared = true) // public static function example($getShared = true)
// { // {
// if ($getShared) // if ($getShared) {
// {
// return static::getSharedInstance('example'); // return static::getSharedInstance('example');
// } // }
//
// return new \CodeIgniter\Example(); // return new \CodeIgniter\Example();
// } // }
} }

View File

@ -1,4 +1,5 @@
<?php <?php
namespace App\Controllers; namespace App\Controllers;
/** /**
@ -18,7 +19,6 @@ use CodeIgniter\Controller;
class BaseController extends Controller class BaseController extends Controller
{ {
/** /**
* An array of helpers to be loaded automatically upon * An array of helpers to be loaded automatically upon
* class instantiation. These helpers will be available * class instantiation. These helpers will be available
@ -31,8 +31,11 @@ class BaseController extends Controller
/** /**
* Constructor. * Constructor.
*/ */
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) public function initController(
{ \CodeIgniter\HTTP\RequestInterface $request,
\CodeIgniter\HTTP\ResponseInterface $response,
\Psr\Log\LoggerInterface $logger
) {
// Do Not Edit This Line // Do Not Edit This Line
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
@ -42,5 +45,4 @@ class BaseController extends Controller
// E.g.: // E.g.:
// $this->session = \Config\Services::session(); // $this->session = \Config\Services::session();
} }
} }

View File

@ -0,0 +1,113 @@
<?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Controllers;
use App\Models\EpisodeModel;
use App\Models\PodcastModel;
class Episodes extends BaseController
{
public function create($podcast_slug)
{
helper(['form', 'database', 'file']);
$episode_model = new EpisodeModel();
$podcast_model = new PodcastModel();
$podcast_name = substr($podcast_slug, 1);
$podcast = $podcast_model->where('name', $podcast_name)->first();
if (
!$this->validate([
'episode_file' =>
'uploaded[episode_file]|ext_in[episode_file,mp3,m4a]',
'title' => 'required',
'slug' => 'required',
'description' => 'required',
])
) {
$data = [
'podcast' => $podcast,
'episode_types' => field_enums(
$episode_model->prefixTable('episodes'),
'type'
),
];
echo view('episodes/create', $data);
} else {
$episode_slug = $this->request->getVar('slug');
$episode_file = $this->request->getFile('episode_file');
$episode_file_metadata = get_file_metadata($episode_file);
$episode_file_name =
$episode_slug . '.' . $episode_file->getExtension();
$episode_path = save_podcast_media(
$episode_file,
$podcast_name,
$episode_file_name
);
$image = $this->request->getFile('image');
$image_path = '';
if ($image->isValid()) {
$image_name = $episode_slug . '.' . $image->getExtension();
$image_path = save_podcast_media(
$image,
$podcast_name,
$image_name
);
}
$episode_model->save([
'podcast_id' => $podcast->id,
'title' => $this->request->getVar('title'),
'slug' => $episode_slug,
'enclosure_url' => $episode_path,
'enclosure_length' => $episode_file->getSize(),
'enclosure_type' => $episode_file_metadata['mime_type'],
'guid' => $podcast_slug . '/' . $episode_slug,
'pub_date' => $this->request->getVar('pub_date'),
'description' => $this->request->getVar('description'),
'duration' => $episode_file_metadata['playtime_seconds'],
'image' => $image_path,
'explicit' => $this->request->getVar('explicit') or false,
'episode_number' =>
$this->request->getVar('episode_number') or null,
'season_number' =>
$this->request->getVar('season_number') or null,
'type' => $this->request->getVar('type'),
'block' => $this->request->getVar('block') or false,
]);
return redirect()->to(
base_url(
route_to(
'episodes_view',
'/@' . $podcast_name,
$episode_slug
)
)
);
}
}
public function view($podcast_slug, $episode_slug)
{
$podcast_model = new PodcastModel();
$episode_model = new EpisodeModel();
$data = [
'podcast' => $podcast_model
->where('name', substr($podcast_slug, 1))
->first(),
'episode' => $episode_model->where('slug', $episode_slug)->first(),
];
return view('episodes/view.php', $data);
}
}

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Controllers; namespace App\Controllers;
@ -9,11 +14,8 @@ class Home extends BaseController
public function index() public function index()
{ {
$model = new PodcastModel(); $model = new PodcastModel();
$data = ["podcasts" => $model->findAll()]; $data = ['podcasts' => $model->findAll()];
return view('home', $data); return view('home', $data);
} }
//--------------------------------------------------------------------
} }

View File

@ -1,12 +1,16 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Controllers; namespace App\Controllers;
use \CodeIgniter\Controller; use CodeIgniter\Controller;
class Migrate extends Controller class Migrate extends Controller
{ {
public function index() public function index()
{ {
$migrate = \Config\Services::migrations(); $migrate = \Config\Services::migrations();

View File

@ -1,61 +1,68 @@
<?php namespace App\Controllers; <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Controllers;
use App\Models\CategoryModel; use App\Models\CategoryModel;
use App\Models\EpisodeModel;
use App\Models\LanguageModel; use App\Models\LanguageModel;
use App\Models\PodcastModel; use App\Models\PodcastModel;
use RuntimeException;
class Podcasts extends BaseController class Podcasts extends BaseController
{ {
public function index()
{
return view('podcast/index.php');
}
public function create() public function create()
{ {
$model = new PodcastModel(); helper(['form', 'database', 'file', 'misc']);
helper(['form', 'url']); $podcast_model = new PodcastModel();
if (!$this->validate([ if (
!$this->validate([
'title' => 'required', 'title' => 'required',
'name' => 'required|regex_match[^[a-z0-9\_]{1,191}$]', 'name' => 'required|regex_match[^[a-z0-9\_]{1,191}$]',
'description' => 'required|max_length[4000]', 'description' => 'required|max_length[4000]',
'image' => 'uploaded[image]|is_image[image]|ext_in[image,jpg,png]|max_dims[image,3000,3000]', 'image' =>
'uploaded[image]|is_image[image]|ext_in[image,jpg,png]|max_dims[image,3000,3000]',
'owner_email' => 'required|valid_email|permit_empty', 'owner_email' => 'required|valid_email|permit_empty',
'type' => 'required', 'type' => 'required',
])) { ])
$langs = explode(',', $this->request->getServer('HTTP_ACCEPT_LANGUAGE')); ) {
$browser_lang = '';
if (!empty($langs)) {
$browser_lang = substr($langs[0], 0, 2);
}
$languageModel = new LanguageModel(); $languageModel = new LanguageModel();
$categoryModel = new CategoryModel(); $categoryModel = new CategoryModel();
$data = [ $data = [
'languages' => $languageModel->findAll(), 'languages' => $languageModel->findAll(),
'categories' => $categoryModel->findAll(), 'categories' => $categoryModel->findAll(),
'browser_lang' => $browser_lang, 'browser_lang' => get_browser_language(
$this->request->getServer('HTTP_ACCEPT_LANGUAGE')
),
'podcast_types' => field_enums(
$podcast_model->prefixTable('podcasts'),
'type'
),
]; ];
echo view('podcasts/create', $data); echo view('podcasts/create', $data);
} else { } else {
$image = $this->request->getFile('image'); $image = $this->request->getFile('image');
if (!$image->isValid()) {
throw new RuntimeException($image->getErrorString() . '(' . $image->getError() . ')');
}
$podcast_name = $this->request->getVar('name'); $podcast_name = $this->request->getVar('name');
$image_name = 'cover.' . $image->getExtension(); $image_name = 'cover.' . $image->getExtension();
$image_storage_folder = 'media/' . $podcast_name . '/'; $image_path = save_podcast_media(
$image->move($image_storage_folder, $image_name); $image,
$podcast_name,
$image_name
);
$model->save([ $podcast_model->save([
'title' => $this->request->getVar('title'), 'title' => $this->request->getVar('title'),
'name' => $podcast_name, 'name' => $podcast_name,
'description' => $this->request->getVar('description'), 'description' => $this->request->getVar('description'),
'episode_description_footer' => $this->request->getVar('episode_description_footer'), 'episode_description_footer' => $this->request->getVar(
'image' => $image_storage_folder . $image_name, 'episode_description_footer'
),
'image' => $image_path,
'language' => $this->request->getVar('language'), 'language' => $this->request->getVar('language'),
'category' => $this->request->getVar('category'), 'category' => $this->request->getVar('category'),
'explicit' => $this->request->getVar('explicit') or false, 'explicit' => $this->request->getVar('explicit') or false,
@ -66,21 +73,32 @@ class Podcasts extends BaseController
'copyright' => $this->request->getVar('copyright'), 'copyright' => $this->request->getVar('copyright'),
'block' => $this->request->getVar('block') or false, 'block' => $this->request->getVar('block') or false,
'complete' => $this->request->getVar('complete') or false, 'complete' => $this->request->getVar('complete') or false,
'custom_html_head' => $this->request->getVar('custom_html_head'), 'custom_html_head' => $this->request->getVar(
'custom_html_head'
),
]); ]);
return redirect()->to(base_url('/@' . $podcast_name)); return redirect()->to(
base_url(route_to('podcasts_view', '@' . $podcast_name))
);
} }
} }
public function podcastByHandle($handle) public function view($slug)
{ {
$model = new PodcastModel(); $podcast_model = new PodcastModel();
$episode_model = new EpisodeModel();
$podcast_name = substr($handle, 1); $podcast_name = substr($slug, 1);
$data['podcast'] = $model->where('name', $podcast_name)->first(); $podcast = $podcast_model->where('name', $podcast_name)->first();
$data = [
'podcast' => $podcast,
'episodes' => $episode_model
->where('podcast_id', $podcast->id)
->findAll(),
];
return view('podcasts/view.php', $data); return view('podcasts/view', $data);
} }
} }

View File

@ -1,12 +1,19 @@
<?php <?php
/**
* Class AddCategories
* Creates categories table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Database\Migrations; namespace App\Database\Migrations;
use \CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;
class AddCategories extends Migration class AddCategories extends Migration
{ {
public function up() public function up()
{ {
$this->forge->addField([ $this->forge->addField([

View File

@ -1,12 +1,19 @@
<?php <?php
/**
* Class AddLanguages
* Creates languages table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Database\Migrations; namespace App\Database\Migrations;
use \CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;
class AddLanguages extends Migration class AddLanguages extends Migration
{ {
public function up() public function up()
{ {
$this->forge->addField([ $this->forge->addField([

View File

@ -1,12 +1,19 @@
<?php <?php
/**
* Class AddPodcasts
* Creates podcasts table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Database\Migrations; namespace App\Database\Migrations;
use \CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;
class AddPodcasts extends Migration class AddPodcasts extends Migration
{ {
public function up() public function up()
{ {
$this->forge->addField([ $this->forge->addField([
@ -20,7 +27,8 @@ class AddPodcasts extends Migration
'title' => [ 'title' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'comment' => 'The show title. Its important to have a clear, concise name for your podcast. Make your title specific. A show titled Our Community Bulletin is too vague to attract many subscribers, no matter how compelling the content. Pay close attention to the title as Apple Podcasts uses this field for search. If you include a long list of keywords in an attempt to game podcast search, your show may be removed from the Apple directory.', 'comment' =>
'The show title. Its important to have a clear, concise name for your podcast. Make your title specific. A show titled Our Community Bulletin is too vague to attract many subscribers, no matter how compelling the content. Pay close attention to the title as Apple Podcasts uses this field for search. If you include a long list of keywords in an attempt to game podcast search, your show may be removed from the Apple directory.',
], ],
'name' => [ 'name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
@ -31,81 +39,94 @@ class AddPodcasts extends Migration
'description' => [ 'description' => [
'type' => 'TEXT', 'type' => 'TEXT',
'null' => true, 'null' => true,
'comment' => 'The show description. Where description is text containing one or more sentences describing your podcast to potential listeners. The maximum amount of text allowed for this tag is 4000 characters. To include links in your description or rich HTML, adhere to the following technical guidelines: enclose all portions of your XML that contain embedded HTML in a CDATA section to prevent formatting issues, and to ensure proper link functionality.', 'comment' =>
'null' => true, 'The show description. Where description is text containing one or more sentences describing your podcast to potential listeners. The maximum amount of text allowed for this tag is 4000 characters. To include links in your description or rich HTML, adhere to the following technical guidelines: enclose all portions of your XML that contain embedded HTML in a CDATA section to prevent formatting issues, and to ensure proper link functionality.',
], ],
'image' => [ 'image' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'comment' => 'The artwork for the show. Specify your show artwork by providing a URL linking to it. Depending on their device, subscribers see your podcast artwork in varying sizes. Therefore, make sure your design is effective at both its original size and at thumbnail size. You should include a show title, brand, or source name as part of your podcast artwork. Artwork must be a minimum size of 1400 x 1400 pixels and a maximum size of 3000 x 3000 pixels, in JPEG or PNG format, 72 dpi, with appropriate file extensions (.jpg, .png), and in the RGB colorspace.', 'comment' =>
'The artwork for the show. Specify your show artwork by providing a URL linking to it. Depending on their device, subscribers see your podcast artwork in varying sizes. Therefore, make sure your design is effective at both its original size and at thumbnail size. You should include a show title, brand, or source name as part of your podcast artwork. Artwork must be a minimum size of 1400 x 1400 pixels and a maximum size of 3000 x 3000 pixels, in JPEG or PNG format, 72 dpi, with appropriate file extensions (.jpg, .png), and in the RGB colorspace.',
], ],
'language' => [ 'language' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 2, 'constraint' => 2,
'comment' => 'The language spoken on the show. Because Apple Podcasts is available in territories around the world, it is critical to specify the language of a podcast. Apple Podcasts only supports values from the ISO 639 list (two-letter language codes, with some possible modifiers, such as "en-us"). Invalid language codes will cause your feed to fail Apple validation.', 'comment' =>
'The language spoken on the show. Because Apple Podcasts is available in territories around the world, it is critical to specify the language of a podcast. Apple Podcasts only supports values from the ISO 639 list (two-letter language codes, with some possible modifiers, such as "en-us"). Invalid language codes will cause your feed to fail Apple validation.',
], ],
'category' => [ 'category' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'comment' => 'The show category information. For a complete list of categories and subcategories, see Apple Podcasts categories. Select the category that best reflects the content of your show. If available, you can also define a subcategory. Although you can specify more than one category and subcategory in your RSS feed, Apple Podcasts only recognizes the first category and subcategory. When specifying categories and subcategories, be sure to properly escape ampersands.', 'comment' =>
'The show category information. For a complete list of categories and subcategories, see Apple Podcasts categories. Select the category that best reflects the content of your show. If available, you can also define a subcategory. Although you can specify more than one category and subcategory in your RSS feed, Apple Podcasts only recognizes the first category and subcategory. When specifying categories and subcategories, be sure to properly escape ampersands.',
'null' => true, 'null' => true,
], ],
'explicit' => [ 'explicit' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
'comment' => 'The podcast parental advisory information. The explicit value can be one of the following: True: If you specify true, indicating the presence of explicit content, Apple Podcasts displays an Explicit parental advisory graphic for your podcast. Podcasts containing explicit material arent available in some Apple Podcasts territories. False: If you specify false, indicating that your podcast doesnt contain explicit language or adult content, Apple Podcasts displays a Clean parental advisory graphic for your podcast.', 'comment' =>
'The podcast parental advisory information. The explicit value can be one of the following: True: If you specify true, indicating the presence of explicit content, Apple Podcasts displays an Explicit parental advisory graphic for your podcast. Podcasts containing explicit material arent available in some Apple Podcasts territories. False: If you specify false, indicating that your podcast doesnt contain explicit language or adult content, Apple Podcasts displays a Clean parental advisory graphic for your podcast.',
], ],
'author' => [ 'author' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'comment' => 'The group responsible for creating the show. Show author most often refers to the parent company or network of a podcast, but it can also be used to identify the host(s) if none exists. Author information is especially useful if a company or organization publishes multiple podcasts. Providing this information will allow listeners to see all shows created by the same entity.', 'comment' =>
'The group responsible for creating the show. Show author most often refers to the parent company or network of a podcast, but it can also be used to identify the host(s) if none exists. Author information is especially useful if a company or organization publishes multiple podcasts. Providing this information will allow listeners to see all shows created by the same entity.',
'null' => true, 'null' => true,
], ],
'owner_name' => [ 'owner_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'owner_name' => 'The podcast owner name. Note: The owner information is for administrative communication about the podcast and isnt displayed in Apple Podcasts.', 'owner_name' =>
'The podcast owner name. Note: The owner information is for administrative communication about the podcast and isnt displayed in Apple Podcasts.',
'null' => true, 'null' => true,
], ],
'owner_email' => [ 'owner_email' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'owner_email' => 'The podcast owner email address. Note: The owner information is for administrative communication about the podcast and isnt displayed in Apple Podcasts. Please make sure the email address is active and monitored.', 'owner_email' =>
'The podcast owner email address. Note: The owner information is for administrative communication about the podcast and isnt displayed in Apple Podcasts. Please make sure the email address is active and monitored.',
'null' => true, 'null' => true,
], ],
'type' => [ 'type' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['episodic', 'serial'], 'constraint' => ['episodic', 'serial'],
'default' => 'episodic', 'default' => 'episodic',
'comment' => 'The type of show. If your show is Serial you must use this tag. Its values can be one of the following: episodic (default). Specify episodic when episodes are intended to be consumed without any specific order. Apple Podcasts will present newest episodes first and display the publish date (required) of each episode. If organized into seasons, the newest season will be presented first - otherwise, episodes will be grouped by year published, newest first. For new subscribers, Apple Podcasts adds the newest, most recent episode in their Library. serial. Specify serial when episodes are intended to be consumed in sequential order. Apple Podcasts will present the oldest episodes first and display the episode numbers (required) of each episode. If organized into seasons, the newest season will be presented first and <itunes:episode> numbers must be given for each episode. For new subscribers, Apple Podcasts adds the first episode to their Library, or the entire current season if using seasons', 'comment' =>
'The type of show. If your show is Serial you must use this tag. Its values can be one of the following: episodic (default). Specify episodic when episodes are intended to be consumed without any specific order. Apple Podcasts will present newest episodes first and display the publish date (required) of each episode. If organized into seasons, the newest season will be presented first - otherwise, episodes will be grouped by year published, newest first. For new subscribers, Apple Podcasts adds the newest, most recent episode in their Library. serial. Specify serial when episodes are intended to be consumed in sequential order. Apple Podcasts will present the oldest episodes first and display the episode numbers (required) of each episode. If organized into seasons, the newest season will be presented first and <itunes:episode> numbers must be given for each episode. For new subscribers, Apple Podcasts adds the first episode to their Library, or the entire current season if using seasons',
], ],
'copyright' => [ 'copyright' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 1024, 'constraint' => 1024,
'comment' => 'The show copyright details. If your show is copyrighted you should use this tag.', 'comment' =>
'The show copyright details. If your show is copyrighted you should use this tag.',
'null' => true, 'null' => true,
], ],
'block' => [ 'block' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
'comment' => 'The podcast show or hide status. If you want your show removed from the Apple directory, use this tag. Specifying the <itunes:block> tag with a Yes value, prevents the entire podcast from appearing in Apple Podcasts. Specifying any value other than Yes has no effect.', 'comment' =>
'The podcast show or hide status. If you want your show removed from the Apple directory, use this tag. Specifying the <itunes:block> tag with a Yes value, prevents the entire podcast from appearing in Apple Podcasts. Specifying any value other than Yes has no effect.',
], ],
'complete' => [ 'complete' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
'comment' => 'The podcast update status. If you will never publish another episode to your show, use this tag. Specifying the <itunes:complete> tag with a Yes value indicates that a podcast is complete and you will not post any more episodes in the future. Specifying any value other than Yes has no effect.', 'comment' =>
'The podcast update status. If you will never publish another episode to your show, use this tag. Specifying the <itunes:complete> tag with a Yes value indicates that a podcast is complete and you will not post any more episodes in the future. Specifying any value other than Yes has no effect.',
], ],
'episode_description_footer' => [ 'episode_description_footer' => [
'type' => 'TEXT', 'type' => 'TEXT',
'comment' => 'The text that will be added in every episode description (show notes).', 'comment' =>
'The text that will be added in every episode description (show notes).',
'null' => true, 'null' => true,
], ],
'custom_html_head' => [ 'custom_html_head' => [
'type' => 'TEXT', 'type' => 'TEXT',
'comment' => 'The HTML code that will be added to evey page for this podcast. (You could add Google Analytics tracking code here for instance.)', 'comment' =>
'The HTML code that will be added to evey page for this podcast. (You could add Google Analytics tracking code here for instance.)',
'null' => true, 'null' => true,
], ],
'created_at' => [ 'created_at' => [

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Class AddEpisodes
* Creates episodes table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Database\Migrations; namespace App\Database\Migrations;
@ -31,7 +39,6 @@ class AddEpisodes extends Migration
'slug' => [ 'slug' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 191, 'constraint' => 191,
'unique' => true,
'comment' => 'Episode slug for URLs', 'comment' => 'Episode slug for URLs',
], ],
'enclosure_url' => [ 'enclosure_url' => [
@ -94,6 +101,7 @@ class AddEpisodes extends Migration
'type' => 'INT', 'type' => 'INT',
'constraint' => 10, 'constraint' => 10,
'unsigned' => true, 'unsigned' => true,
'null' => true,
'comment' => 'comment' =>
'An episode number. If all your episodes have numbers and you would like them to be ordered based on them use this tag for each one. Episode numbers are optional for <itunes:type> episodic shows, but are mandatory for serial shows. Where episode is a non-zero integer (1, 2, 3, etc.) representing your episode number.', 'An episode number. If all your episodes have numbers and you would like them to be ordered based on them use this tag for each one. Episode numbers are optional for <itunes:type> episodic shows, but are mandatory for serial shows. Where episode is a non-zero integer (1, 2, 3, etc.) representing your episode number.',
], ],
@ -127,7 +135,6 @@ class AddEpisodes extends Migration
], ],
]); ]);
$this->forge->addKey('id', true); $this->forge->addKey('id', true);
$this->forge->addKey('podcast_id', true);
$this->forge->addUniqueKey(['podcast_id', 'slug']); $this->forge->addUniqueKey(['podcast_id', 'slug']);
$this->forge->addForeignKey('podcast_id', 'podcasts', 'id'); $this->forge->addForeignKey('podcast_id', 'podcasts', 'id');
$this->forge->createTable('episodes'); $this->forge->createTable('episodes');

View File

@ -2,18 +2,18 @@
/** /**
* Class AddPlatforms * Class AddPlatforms
* Creates platforms table in database * Creates platforms table in database
* @author Benjamin Bellamy <ben@podlibre.org> *
* @copyright 2020 Podlibre * @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/ * @link https://castopod.org/
*/ */
namespace App\Database\Migrations; namespace App\Database\Migrations;
use \CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;
class AddPlatforms extends Migration class AddPlatforms extends Migration
{ {
public function up() public function up()
{ {
$this->forge->addField([ $this->forge->addField([
@ -62,7 +62,8 @@ class AddPlatforms extends Migration
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
'comment' => 'True if the platform link should be displayed by default.', 'comment' =>
'True if the platform link should be displayed by default.',
], ],
'ios_deeplink' => [ 'ios_deeplink' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
@ -74,7 +75,8 @@ class AddPlatforms extends Migration
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
'comment' => 'Android deeplinking for this platform: 0=No, 1=Manual, 2=Automatic.', 'comment' =>
'Android deeplinking for this platform: 0=No, 1=Manual, 2=Automatic.',
], ],
'logo_file_name' => [ 'logo_file_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',

View File

@ -1,19 +1,19 @@
<?php <?php
/** /**
* Class AddPlatformsLinks * Class AddPlatformsLinks
* Creates platformlinks table in database * Creates platform_links table in database
* @author Benjamin Bellamy <ben@podlibre.org> *
* @copyright 2020 Podlibre * @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/ * @link https://castopod.org/
*/ */
namespace App\Database\Migrations; namespace App\Database\Migrations;
use \CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;
class AddPlatformLinks extends Migration class AddPlatformLinks extends Migration
{ {
public function up() public function up()
{ {
$this->forge->addField([ $this->forge->addField([

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Class CategorySeeder
* Inserts values in categories table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Database\Seeds; namespace App\Database\Seeds;
@ -8,119 +16,785 @@ class CategorySeeder extends Seeder
{ {
public function run() public function run()
{ {
$data = array( $data = [
array('parent_id' => 0, 'id' => 0, 'code' => 'uncategorized', 'apple_category' => 'uncategorized', 'google_category' => 'uncategorized'), [
array('parent_id' => 0, 'id' => 1, 'code' => 'arts', 'apple_category' => 'Arts', 'google_category' => 'Arts'), 'parent_id' => 0,
array('parent_id' => 0, 'id' => 2, 'code' => 'business', 'apple_category' => 'Business', 'google_category' => 'Business'), 'id' => 0,
array('parent_id' => 0, 'id' => 3, 'code' => 'comedy', 'apple_category' => 'Comedy', 'google_category' => 'Comedy'), 'code' => 'uncategorized',
array('parent_id' => 0, 'id' => 4, 'code' => 'education', 'apple_category' => 'Education', 'google_category' => 'Education'), 'apple_category' => 'uncategorized',
array('parent_id' => 0, 'id' => 5, 'code' => 'fiction', 'apple_category' => 'Fiction', 'google_category' => ''), 'google_category' => 'uncategorized',
array('parent_id' => 0, 'id' => 6, 'code' => 'government', 'apple_category' => 'Government', 'google_category' => 'Government &amp; Organizations'), ],
array('parent_id' => 0, 'id' => 7, 'code' => 'health_and_fitness', 'apple_category' => 'Health &amp; Fitness', 'google_category' => 'Health'), [
array('parent_id' => 0, 'id' => 8, 'code' => 'history', 'apple_category' => 'History', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 0, 'id' => 9, 'code' => 'kids_and_family', 'apple_category' => 'Kids &amp; Family', 'google_category' => 'Kids &amp; Family'), 'id' => 1,
array('parent_id' => 0, 'id' => 10, 'code' => 'leisure', 'apple_category' => 'Leisure', 'google_category' => 'Games &amp; Hobbies'), 'code' => 'arts',
array('parent_id' => 0, 'id' => 11, 'code' => 'music', 'apple_category' => 'Music', 'google_category' => 'Music'), 'apple_category' => 'Arts',
array('parent_id' => 0, 'id' => 12, 'code' => 'news', 'apple_category' => 'News', 'google_category' => 'News &amp; Politics'), 'google_category' => 'Arts',
array('parent_id' => 0, 'id' => 13, 'code' => 'religion_and_spirituality', 'apple_category' => 'Religion &amp; Spirituality', 'google_category' => 'Religion &amp; Spirituality'), ],
array('parent_id' => 0, 'id' => 14, 'code' => 'science', 'apple_category' => 'Science', 'google_category' => 'Science &amp; Medicine'), [
array('parent_id' => 0, 'id' => 15, 'code' => 'society_and_culture', 'apple_category' => 'Society &amp; Culture', 'google_category' => 'Society &amp; Culture'), 'parent_id' => 0,
array('parent_id' => 0, 'id' => 16, 'code' => 'sports', 'apple_category' => 'Sports', 'google_category' => 'Sports &amp; Recreation'), 'id' => 2,
array('parent_id' => 0, 'id' => 17, 'code' => 'technology', 'apple_category' => 'Technology', 'google_category' => 'Technology'), 'code' => 'business',
array('parent_id' => 0, 'id' => 18, 'code' => 'true_crime', 'apple_category' => 'True Crime', 'google_category' => ''), 'apple_category' => 'Business',
array('parent_id' => 0, 'id' => 19, 'code' => 'tv_and_film', 'apple_category' => 'TV &amp; Film', 'google_category' => 'TV &amp; Film'), 'google_category' => 'Business',
array('parent_id' => 1, 'id' => 20, 'code' => 'books', 'apple_category' => 'Books', 'google_category' => ''), ],
array('parent_id' => 1, 'id' => 21, 'code' => 'design', 'apple_category' => 'Design', 'google_category' => ''), [
array('parent_id' => 1, 'id' => 22, 'code' => 'fashion_and_beauty', 'apple_category' => 'Fashion &amp; Beauty', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 1, 'id' => 23, 'code' => 'food', 'apple_category' => 'Food', 'google_category' => ''), 'id' => 3,
array('parent_id' => 1, 'id' => 24, 'code' => 'performing_arts', 'apple_category' => 'Performing Arts', 'google_category' => ''), 'code' => 'comedy',
array('parent_id' => 1, 'id' => 25, 'code' => 'visual_arts', 'apple_category' => 'Visual Arts', 'google_category' => ''), 'apple_category' => 'Comedy',
array('parent_id' => 2, 'id' => 26, 'code' => 'careers', 'apple_category' => 'Careers', 'google_category' => ''), 'google_category' => 'Comedy',
array('parent_id' => 2, 'id' => 27, 'code' => 'entrepreneurship', 'apple_category' => 'Entrepreneurship', 'google_category' => ''), ],
array('parent_id' => 2, 'id' => 28, 'code' => 'investing', 'apple_category' => 'Investing', 'google_category' => ''), [
array('parent_id' => 2, 'id' => 29, 'code' => 'management', 'apple_category' => 'Management', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 2, 'id' => 30, 'code' => 'marketing', 'apple_category' => 'Marketing', 'google_category' => ''), 'id' => 4,
array('parent_id' => 2, 'id' => 31, 'code' => 'non_profit', 'apple_category' => 'Non-Profit', 'google_category' => ''), 'code' => 'education',
array('parent_id' => 3, 'id' => 32, 'code' => 'comedy_interviews', 'apple_category' => 'Comedy Interviews', 'google_category' => ''), 'apple_category' => 'Education',
array('parent_id' => 3, 'id' => 33, 'code' => 'improv', 'apple_category' => 'Improv', 'google_category' => ''), 'google_category' => 'Education',
array('parent_id' => 3, 'id' => 34, 'code' => 'stand_up', 'apple_category' => 'Stand-Up', 'google_category' => ''), ],
array('parent_id' => 4, 'id' => 35, 'code' => 'courses', 'apple_category' => 'Courses', 'google_category' => ''), [
array('parent_id' => 4, 'id' => 36, 'code' => 'how_to', 'apple_category' => 'How To', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 4, 'id' => 37, 'code' => 'language_learning', 'apple_category' => 'Language Learning', 'google_category' => ''), 'id' => 5,
array('parent_id' => 4, 'id' => 38, 'code' => 'self_improvement', 'apple_category' => 'Self-Improvement', 'google_category' => ''), 'code' => 'fiction',
array('parent_id' => 5, 'id' => 39, 'code' => 'comedy_fiction', 'apple_category' => 'Comedy Fiction', 'google_category' => ''), 'apple_category' => 'Fiction',
array('parent_id' => 5, 'id' => 40, 'code' => 'drama', 'apple_category' => 'Drama', 'google_category' => ''), 'google_category' => '',
array('parent_id' => 5, 'id' => 41, 'code' => 'science_fiction', 'apple_category' => 'Science Fiction', 'google_category' => ''), ],
array('parent_id' => 7, 'id' => 42, 'code' => 'alternative_health', 'apple_category' => 'Alternative Health', 'google_category' => ''), [
array('parent_id' => 7, 'id' => 43, 'code' => 'fitness', 'apple_category' => 'Fitness', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 7, 'id' => 44, 'code' => 'medicine', 'apple_category' => 'Medicine', 'google_category' => ''), 'id' => 6,
array('parent_id' => 7, 'id' => 45, 'code' => 'mental_health', 'apple_category' => 'Mental Health', 'google_category' => ''), 'code' => 'government',
array('parent_id' => 7, 'id' => 46, 'code' => 'nutrition', 'apple_category' => 'Nutrition', 'google_category' => ''), 'apple_category' => 'Government',
array('parent_id' => 7, 'id' => 47, 'code' => 'sexuality', 'apple_category' => 'Sexuality', 'google_category' => ''), 'google_category' => 'Government &amp; Organizations',
array('parent_id' => 9, 'id' => 48, 'code' => 'education_for_kids', 'apple_category' => 'Education for Kids', 'google_category' => ''), ],
array('parent_id' => 9, 'id' => 49, 'code' => 'parenting', 'apple_category' => 'Parenting', 'google_category' => ''), [
array('parent_id' => 9, 'id' => 50, 'code' => 'pets_and_animals', 'apple_category' => 'Pets &amp; Animals', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 9, 'id' => 51, 'code' => 'stories_for_kids', 'apple_category' => 'Stories for Kids', 'google_category' => ''), 'id' => 7,
array('parent_id' => 10, 'id' => 52, 'code' => 'animation_and_manga', 'apple_category' => 'Animation &amp; Manga', 'google_category' => ''), 'code' => 'health_and_fitness',
array('parent_id' => 10, 'id' => 53, 'code' => 'automotive', 'apple_category' => 'Automotive', 'google_category' => ''), 'apple_category' => 'Health &amp; Fitness',
array('parent_id' => 10, 'id' => 54, 'code' => 'aviation', 'apple_category' => 'Aviation', 'google_category' => ''), 'google_category' => 'Health',
array('parent_id' => 10, 'id' => 55, 'code' => 'crafts', 'apple_category' => 'Crafts', 'google_category' => ''), ],
array('parent_id' => 10, 'id' => 56, 'code' => 'games', 'apple_category' => 'Games', 'google_category' => ''), [
array('parent_id' => 10, 'id' => 57, 'code' => 'hobbies', 'apple_category' => 'Hobbies', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 10, 'id' => 58, 'code' => 'home_and_garden', 'apple_category' => 'Home &amp; Garden', 'google_category' => ''), 'id' => 8,
array('parent_id' => 10, 'id' => 59, 'code' => 'video_games', 'apple_category' => 'Video Games', 'google_category' => ''), 'code' => 'history',
array('parent_id' => 11, 'id' => 60, 'code' => 'music_commentary', 'apple_category' => 'Music Commentary', 'google_category' => ''), 'apple_category' => 'History',
array('parent_id' => 11, 'id' => 61, 'code' => 'music_history', 'apple_category' => 'Music History', 'google_category' => ''), 'google_category' => '',
array('parent_id' => 11, 'id' => 62, 'code' => 'music_interviews', 'apple_category' => 'Music Interviews', 'google_category' => ''), ],
array('parent_id' => 12, 'id' => 63, 'code' => 'business_news', 'apple_category' => 'Business News', 'google_category' => ''), [
array('parent_id' => 12, 'id' => 64, 'code' => 'daily_news', 'apple_category' => 'Daily News', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 12, 'id' => 65, 'code' => 'entertainment_news', 'apple_category' => 'Entertainment News', 'google_category' => ''), 'id' => 9,
array('parent_id' => 12, 'id' => 66, 'code' => 'news_commentary', 'apple_category' => 'News Commentary', 'google_category' => ''), 'code' => 'kids_and_family',
array('parent_id' => 12, 'id' => 67, 'code' => 'politics', 'apple_category' => 'Politics', 'google_category' => ''), 'apple_category' => 'Kids &amp; Family',
array('parent_id' => 12, 'id' => 68, 'code' => 'sports_news', 'apple_category' => 'Sports News', 'google_category' => ''), 'google_category' => 'Kids &amp; Family',
array('parent_id' => 12, 'id' => 69, 'code' => 'tech_news', 'apple_category' => 'Tech News', 'google_category' => ''), ],
array('parent_id' => 13, 'id' => 70, 'code' => 'buddhism', 'apple_category' => 'Buddhism', 'google_category' => ''), [
array('parent_id' => 13, 'id' => 71, 'code' => 'christianity', 'apple_category' => 'Christianity', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 13, 'id' => 72, 'code' => 'hinduism', 'apple_category' => 'Hinduism', 'google_category' => ''), 'id' => 10,
array('parent_id' => 13, 'id' => 73, 'code' => 'islam', 'apple_category' => 'Islam', 'google_category' => ''), 'code' => 'leisure',
array('parent_id' => 13, 'id' => 74, 'code' => 'judaism', 'apple_category' => 'Judaism', 'google_category' => ''), 'apple_category' => 'Leisure',
array('parent_id' => 13, 'id' => 75, 'code' => 'religion', 'apple_category' => 'Religion', 'google_category' => ''), 'google_category' => 'Games &amp; Hobbies',
array('parent_id' => 13, 'id' => 76, 'code' => 'spirituality', 'apple_category' => 'Spirituality', 'google_category' => ''), ],
array('parent_id' => 14, 'id' => 77, 'code' => 'astronomy', 'apple_category' => 'Astronomy', 'google_category' => ''), [
array('parent_id' => 14, 'id' => 78, 'code' => 'chemistry', 'apple_category' => 'Chemistry', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 14, 'id' => 79, 'code' => 'earth_sciences', 'apple_category' => 'Earth Sciences', 'google_category' => ''), 'id' => 11,
array('parent_id' => 14, 'id' => 80, 'code' => 'life_sciences', 'apple_category' => 'Life Sciences', 'google_category' => ''), 'code' => 'music',
array('parent_id' => 14, 'id' => 81, 'code' => 'mathematics', 'apple_category' => 'Mathematics', 'google_category' => ''), 'apple_category' => 'Music',
array('parent_id' => 14, 'id' => 82, 'code' => 'natural_sciences', 'apple_category' => 'Natural Sciences', 'google_category' => ''), 'google_category' => 'Music',
array('parent_id' => 14, 'id' => 83, 'code' => 'nature', 'apple_category' => 'Nature', 'google_category' => ''), ],
array('parent_id' => 14, 'id' => 84, 'code' => 'physics', 'apple_category' => 'Physics', 'google_category' => ''), [
array('parent_id' => 14, 'id' => 85, 'code' => 'social_sciences', 'apple_category' => 'Social Sciences', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 15, 'id' => 86, 'code' => 'documentary', 'apple_category' => 'Documentary', 'google_category' => ''), 'id' => 12,
array('parent_id' => 15, 'id' => 87, 'code' => 'personal_journals', 'apple_category' => 'Personal Journals', 'google_category' => ''), 'code' => 'news',
array('parent_id' => 15, 'id' => 88, 'code' => 'philosophy', 'apple_category' => 'Philosophy', 'google_category' => ''), 'apple_category' => 'News',
array('parent_id' => 15, 'id' => 89, 'code' => 'places_and_travel', 'apple_category' => 'Places &amp; Travel', 'google_category' => ''), 'google_category' => 'News &amp; Politics',
array('parent_id' => 15, 'id' => 90, 'code' => 'relationships', 'apple_category' => 'Relationships', 'google_category' => ''), ],
array('parent_id' => 16, 'id' => 91, 'code' => 'baseball', 'apple_category' => 'Baseball', 'google_category' => ''), [
array('parent_id' => 16, 'id' => 92, 'code' => 'basketball', 'apple_category' => 'Basketball', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 16, 'id' => 93, 'code' => 'cricket', 'apple_category' => 'Cricket', 'google_category' => ''), 'id' => 13,
array('parent_id' => 16, 'id' => 94, 'code' => 'fantasy_sports', 'apple_category' => 'Fantasy Sports', 'google_category' => ''), 'code' => 'religion_and_spirituality',
array('parent_id' => 16, 'id' => 95, 'code' => 'football', 'apple_category' => 'Football', 'google_category' => ''), 'apple_category' => 'Religion &amp; Spirituality',
array('parent_id' => 16, 'id' => 96, 'code' => 'golf', 'apple_category' => 'Golf', 'google_category' => ''), 'google_category' => 'Religion &amp; Spirituality',
array('parent_id' => 16, 'id' => 97, 'code' => 'hockey', 'apple_category' => 'Hockey', 'google_category' => ''), ],
array('parent_id' => 16, 'id' => 98, 'code' => 'rugby', 'apple_category' => 'Rugby', 'google_category' => ''), [
array('parent_id' => 16, 'id' => 99, 'code' => 'running', 'apple_category' => 'Running', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 16, 'id' => 100, 'code' => 'soccer', 'apple_category' => 'Soccer', 'google_category' => ''), 'id' => 14,
array('parent_id' => 16, 'id' => 101, 'code' => 'swimming', 'apple_category' => 'Swimming', 'google_category' => ''), 'code' => 'science',
array('parent_id' => 16, 'id' => 102, 'code' => 'tennis', 'apple_category' => 'Tennis', 'google_category' => ''), 'apple_category' => 'Science',
array('parent_id' => 16, 'id' => 103, 'code' => 'volleyball', 'apple_category' => 'Volleyball', 'google_category' => ''), 'google_category' => 'Science &amp; Medicine',
array('parent_id' => 16, 'id' => 104, 'code' => 'wilderness', 'apple_category' => 'Wilderness', 'google_category' => ''), ],
array('parent_id' => 16, 'id' => 105, 'code' => 'wrestling', 'apple_category' => 'Wrestling', 'google_category' => ''), [
array('parent_id' => 19, 'id' => 106, 'code' => 'after_shows', 'apple_category' => 'After Shows', 'google_category' => ''), 'parent_id' => 0,
array('parent_id' => 19, 'id' => 107, 'code' => 'film_history', 'apple_category' => 'Film History', 'google_category' => ''), 'id' => 15,
array('parent_id' => 19, 'id' => 108, 'code' => 'film_interviews', 'apple_category' => 'Film Interviews', 'google_category' => ''), 'code' => 'society_and_culture',
array('parent_id' => 19, 'id' => 109, 'code' => 'film_reviews', 'apple_category' => 'Film Reviews', 'google_category' => ''), 'apple_category' => 'Society &amp; Culture',
array('parent_id' => 19, 'id' => 110, 'code' => 'tv_reviews', 'apple_category' => 'TV Reviews', 'google_category' => ''), 'google_category' => 'Society &amp; Culture',
); ],
[
'parent_id' => 0,
'id' => 16,
'code' => 'sports',
'apple_category' => 'Sports',
'google_category' => 'Sports &amp; Recreation',
],
[
'parent_id' => 0,
'id' => 17,
'code' => 'technology',
'apple_category' => 'Technology',
'google_category' => 'Technology',
],
[
'parent_id' => 0,
'id' => 18,
'code' => 'true_crime',
'apple_category' => 'True Crime',
'google_category' => '',
],
[
'parent_id' => 0,
'id' => 19,
'code' => 'tv_and_film',
'apple_category' => 'TV &amp; Film',
'google_category' => 'TV &amp; Film',
],
[
'parent_id' => 1,
'id' => 20,
'code' => 'books',
'apple_category' => 'Books',
'google_category' => '',
],
[
'parent_id' => 1,
'id' => 21,
'code' => 'design',
'apple_category' => 'Design',
'google_category' => '',
],
[
'parent_id' => 1,
'id' => 22,
'code' => 'fashion_and_beauty',
'apple_category' => 'Fashion &amp; Beauty',
'google_category' => '',
],
[
'parent_id' => 1,
'id' => 23,
'code' => 'food',
'apple_category' => 'Food',
'google_category' => '',
],
[
'parent_id' => 1,
'id' => 24,
'code' => 'performing_arts',
'apple_category' => 'Performing Arts',
'google_category' => '',
],
[
'parent_id' => 1,
'id' => 25,
'code' => 'visual_arts',
'apple_category' => 'Visual Arts',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 26,
'code' => 'careers',
'apple_category' => 'Careers',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 27,
'code' => 'entrepreneurship',
'apple_category' => 'Entrepreneurship',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 28,
'code' => 'investing',
'apple_category' => 'Investing',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 29,
'code' => 'management',
'apple_category' => 'Management',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 30,
'code' => 'marketing',
'apple_category' => 'Marketing',
'google_category' => '',
],
[
'parent_id' => 2,
'id' => 31,
'code' => 'non_profit',
'apple_category' => 'Non-Profit',
'google_category' => '',
],
[
'parent_id' => 3,
'id' => 32,
'code' => 'comedy_interviews',
'apple_category' => 'Comedy Interviews',
'google_category' => '',
],
[
'parent_id' => 3,
'id' => 33,
'code' => 'improv',
'apple_category' => 'Improv',
'google_category' => '',
],
[
'parent_id' => 3,
'id' => 34,
'code' => 'stand_up',
'apple_category' => 'Stand-Up',
'google_category' => '',
],
[
'parent_id' => 4,
'id' => 35,
'code' => 'courses',
'apple_category' => 'Courses',
'google_category' => '',
],
[
'parent_id' => 4,
'id' => 36,
'code' => 'how_to',
'apple_category' => 'How To',
'google_category' => '',
],
[
'parent_id' => 4,
'id' => 37,
'code' => 'language_learning',
'apple_category' => 'Language Learning',
'google_category' => '',
],
[
'parent_id' => 4,
'id' => 38,
'code' => 'self_improvement',
'apple_category' => 'Self-Improvement',
'google_category' => '',
],
[
'parent_id' => 5,
'id' => 39,
'code' => 'comedy_fiction',
'apple_category' => 'Comedy Fiction',
'google_category' => '',
],
[
'parent_id' => 5,
'id' => 40,
'code' => 'drama',
'apple_category' => 'Drama',
'google_category' => '',
],
[
'parent_id' => 5,
'id' => 41,
'code' => 'science_fiction',
'apple_category' => 'Science Fiction',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 42,
'code' => 'alternative_health',
'apple_category' => 'Alternative Health',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 43,
'code' => 'fitness',
'apple_category' => 'Fitness',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 44,
'code' => 'medicine',
'apple_category' => 'Medicine',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 45,
'code' => 'mental_health',
'apple_category' => 'Mental Health',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 46,
'code' => 'nutrition',
'apple_category' => 'Nutrition',
'google_category' => '',
],
[
'parent_id' => 7,
'id' => 47,
'code' => 'sexuality',
'apple_category' => 'Sexuality',
'google_category' => '',
],
[
'parent_id' => 9,
'id' => 48,
'code' => 'education_for_kids',
'apple_category' => 'Education for Kids',
'google_category' => '',
],
[
'parent_id' => 9,
'id' => 49,
'code' => 'parenting',
'apple_category' => 'Parenting',
'google_category' => '',
],
[
'parent_id' => 9,
'id' => 50,
'code' => 'pets_and_animals',
'apple_category' => 'Pets &amp; Animals',
'google_category' => '',
],
[
'parent_id' => 9,
'id' => 51,
'code' => 'stories_for_kids',
'apple_category' => 'Stories for Kids',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 52,
'code' => 'animation_and_manga',
'apple_category' => 'Animation &amp; Manga',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 53,
'code' => 'automotive',
'apple_category' => 'Automotive',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 54,
'code' => 'aviation',
'apple_category' => 'Aviation',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 55,
'code' => 'crafts',
'apple_category' => 'Crafts',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 56,
'code' => 'games',
'apple_category' => 'Games',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 57,
'code' => 'hobbies',
'apple_category' => 'Hobbies',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 58,
'code' => 'home_and_garden',
'apple_category' => 'Home &amp; Garden',
'google_category' => '',
],
[
'parent_id' => 10,
'id' => 59,
'code' => 'video_games',
'apple_category' => 'Video Games',
'google_category' => '',
],
[
'parent_id' => 11,
'id' => 60,
'code' => 'music_commentary',
'apple_category' => 'Music Commentary',
'google_category' => '',
],
[
'parent_id' => 11,
'id' => 61,
'code' => 'music_history',
'apple_category' => 'Music History',
'google_category' => '',
],
[
'parent_id' => 11,
'id' => 62,
'code' => 'music_interviews',
'apple_category' => 'Music Interviews',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 63,
'code' => 'business_news',
'apple_category' => 'Business News',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 64,
'code' => 'daily_news',
'apple_category' => 'Daily News',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 65,
'code' => 'entertainment_news',
'apple_category' => 'Entertainment News',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 66,
'code' => 'news_commentary',
'apple_category' => 'News Commentary',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 67,
'code' => 'politics',
'apple_category' => 'Politics',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 68,
'code' => 'sports_news',
'apple_category' => 'Sports News',
'google_category' => '',
],
[
'parent_id' => 12,
'id' => 69,
'code' => 'tech_news',
'apple_category' => 'Tech News',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 70,
'code' => 'buddhism',
'apple_category' => 'Buddhism',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 71,
'code' => 'christianity',
'apple_category' => 'Christianity',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 72,
'code' => 'hinduism',
'apple_category' => 'Hinduism',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 73,
'code' => 'islam',
'apple_category' => 'Islam',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 74,
'code' => 'judaism',
'apple_category' => 'Judaism',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 75,
'code' => 'religion',
'apple_category' => 'Religion',
'google_category' => '',
],
[
'parent_id' => 13,
'id' => 76,
'code' => 'spirituality',
'apple_category' => 'Spirituality',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 77,
'code' => 'astronomy',
'apple_category' => 'Astronomy',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 78,
'code' => 'chemistry',
'apple_category' => 'Chemistry',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 79,
'code' => 'earth_sciences',
'apple_category' => 'Earth Sciences',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 80,
'code' => 'life_sciences',
'apple_category' => 'Life Sciences',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 81,
'code' => 'mathematics',
'apple_category' => 'Mathematics',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 82,
'code' => 'natural_sciences',
'apple_category' => 'Natural Sciences',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 83,
'code' => 'nature',
'apple_category' => 'Nature',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 84,
'code' => 'physics',
'apple_category' => 'Physics',
'google_category' => '',
],
[
'parent_id' => 14,
'id' => 85,
'code' => 'social_sciences',
'apple_category' => 'Social Sciences',
'google_category' => '',
],
[
'parent_id' => 15,
'id' => 86,
'code' => 'documentary',
'apple_category' => 'Documentary',
'google_category' => '',
],
[
'parent_id' => 15,
'id' => 87,
'code' => 'personal_journals',
'apple_category' => 'Personal Journals',
'google_category' => '',
],
[
'parent_id' => 15,
'id' => 88,
'code' => 'philosophy',
'apple_category' => 'Philosophy',
'google_category' => '',
],
[
'parent_id' => 15,
'id' => 89,
'code' => 'places_and_travel',
'apple_category' => 'Places &amp; Travel',
'google_category' => '',
],
[
'parent_id' => 15,
'id' => 90,
'code' => 'relationships',
'apple_category' => 'Relationships',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 91,
'code' => 'baseball',
'apple_category' => 'Baseball',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 92,
'code' => 'basketball',
'apple_category' => 'Basketball',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 93,
'code' => 'cricket',
'apple_category' => 'Cricket',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 94,
'code' => 'fantasy_sports',
'apple_category' => 'Fantasy Sports',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 95,
'code' => 'football',
'apple_category' => 'Football',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 96,
'code' => 'golf',
'apple_category' => 'Golf',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 97,
'code' => 'hockey',
'apple_category' => 'Hockey',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 98,
'code' => 'rugby',
'apple_category' => 'Rugby',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 99,
'code' => 'running',
'apple_category' => 'Running',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 100,
'code' => 'soccer',
'apple_category' => 'Soccer',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 101,
'code' => 'swimming',
'apple_category' => 'Swimming',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 102,
'code' => 'tennis',
'apple_category' => 'Tennis',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 103,
'code' => 'volleyball',
'apple_category' => 'Volleyball',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 104,
'code' => 'wilderness',
'apple_category' => 'Wilderness',
'google_category' => '',
],
[
'parent_id' => 16,
'id' => 105,
'code' => 'wrestling',
'apple_category' => 'Wrestling',
'google_category' => '',
],
[
'parent_id' => 19,
'id' => 106,
'code' => 'after_shows',
'apple_category' => 'After Shows',
'google_category' => '',
],
[
'parent_id' => 19,
'id' => 107,
'code' => 'film_history',
'apple_category' => 'Film History',
'google_category' => '',
],
[
'parent_id' => 19,
'id' => 108,
'code' => 'film_interviews',
'apple_category' => 'Film Interviews',
'google_category' => '',
],
[
'parent_id' => 19,
'id' => 109,
'code' => 'film_reviews',
'apple_category' => 'Film Reviews',
'google_category' => '',
],
[
'parent_id' => 19,
'id' => 110,
'code' => 'tv_reviews',
'apple_category' => 'TV Reviews',
'google_category' => '',
],
];
$this->db->table('categories')->insertBatch($data); $this->db->table('categories')->insertBatch($data);
} }

View File

@ -1,9 +1,19 @@
<?php <?php
/**
* Class LanguageSeeder
* Inserts values in languages table in database
*
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
/** /**
* From https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes * From https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
* (cc) Creative Commons Attribution-ShareAlike 3.0 * (cc) Creative Commons Attribution-ShareAlike 3.0
* 2020-06-07 * 2020-06-07
*/ */
namespace App\Database\Seeds; namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder; use CodeIgniter\Database\Seeder;
@ -12,192 +22,615 @@ class LanguageSeeder extends Seeder
{ {
public function run() public function run()
{ {
$data = array( $data = [
array('code'=>'aa','name'=>'Afar','native_name'=>'Afaraf'), ['code' => 'aa', 'name' => 'Afar', 'native_name' => 'Afaraf'],
array('code'=>'ab','name'=>'Abkhazian','native_name'=>'аҧсуа бызшәа, аҧсшәа'), [
array('code'=>'ae','name'=>'Avestan','native_name'=>'avesta'), 'code' => 'ab',
array('code'=>'af','name'=>'Afrikaans','native_name'=>'Afrikaans'), 'name' => 'Abkhazian',
array('code'=>'ak','name'=>'Akan','native_name'=>'Akan'), 'native_name' => 'аҧсуа бызшәа, аҧсшәа',
array('code'=>'am','name'=>'Amharic','native_name'=>'አማርኛ'), ],
array('code'=>'an','name'=>'Aragonese','native_name'=>'aragonés'), ['code' => 'ae', 'name' => 'Avestan', 'native_name' => 'avesta'],
array('code'=>'ar','name'=>'Arabic','native_name'=>'العربية'), [
array('code'=>'as','name'=>'Assamese','native_name'=>'অসমীয়া'), 'code' => 'af',
array('code'=>'av','name'=>'Avaric','native_name'=>'авар мацӀ, магӀарул мацӀ'), 'name' => 'Afrikaans',
array('code'=>'ay','name'=>'Aymara','native_name'=>'aymar aru'), 'native_name' => 'Afrikaans',
array('code'=>'az','name'=>'Azerbaijani','native_name'=>'azərbaycan dili'), ],
array('code'=>'ba','name'=>'Bashkir','native_name'=>'башҡорт теле'), ['code' => 'ak', 'name' => 'Akan', 'native_name' => 'Akan'],
array('code'=>'be','name'=>'Belarusian','native_name'=>'беларуская мова'), ['code' => 'am', 'name' => 'Amharic', 'native_name' => 'አማርኛ'],
array('code'=>'bg','name'=>'Bulgarian','native_name'=>'български език'), [
array('code'=>'bh','name'=>'Bihari languages','native_name'=>'भोजपुरी'), 'code' => 'an',
array('code'=>'bi','name'=>'Bislama','native_name'=>'Bislama'), 'name' => 'Aragonese',
array('code'=>'bm','name'=>'Bambara','native_name'=>'bamanankan'), 'native_name' => 'aragonés',
array('code'=>'bn','name'=>'Bengali','native_name'=>'বাংলা'), ],
array('code'=>'bo','name'=>'Tibetan','native_name'=>'བོད་ཡིག'), ['code' => 'ar', 'name' => 'Arabic', 'native_name' => 'العربية'],
array('code'=>'br','name'=>'Breton','native_name'=>'brezhoneg'), ['code' => 'as', 'name' => 'Assamese', 'native_name' => 'অসমীয়া'],
array('code'=>'bs','name'=>'Bosnian','native_name'=>'bosanski jezik'), [
array('code'=>'ca','name'=>'Catalan, Valencian','native_name'=>'català, valencià'), 'code' => 'av',
array('code'=>'ce','name'=>'Chechen','native_name'=>'нохчийн мотт'), 'name' => 'Avaric',
array('code'=>'ch','name'=>'Chamorro','native_name'=>'Chamoru'), 'native_name' => 'авар мацӀ, магӀарул мацӀ',
array('code'=>'co','name'=>'Corsican','native_name'=>'corsu, lingua corsa'), ],
array('code'=>'cr','name'=>'Cree','native_name'=>'ᓀᐦᐃᔭᐍᐏᐣ'), ['code' => 'ay', 'name' => 'Aymara', 'native_name' => 'aymar aru'],
array('code'=>'cs','name'=>'Czech','native_name'=>'čeština, český jazyk'), [
array('code'=>'cu','name'=>'Church Slavic, Old Slavonic, Church Slavonic, Old Bulgarian, Old Church Slavonic','native_name'=>'ѩзыкъ словѣньскъ'), 'code' => 'az',
array('code'=>'cv','name'=>'Chuvash','native_name'=>'чӑваш чӗлхи'), 'name' => 'Azerbaijani',
array('code'=>'cy','name'=>'Welsh','native_name'=>'Cymraeg'), 'native_name' => 'azərbaycan dili',
array('code'=>'da','name'=>'Danish','native_name'=>'dansk'), ],
array('code'=>'de','name'=>'German','native_name'=>'Deutsch'), [
array('code'=>'dv','name'=>'Divehi, Dhivehi, Maldivian','native_name'=>'ދިވެހި'), 'code' => 'ba',
array('code'=>'dz','name'=>'Dzongkha','native_name'=>'རྫོང་ཁ'), 'name' => 'Bashkir',
array('code'=>'ee','name'=>'Ewe','native_name'=>'Eʋegbe'), 'native_name' => 'башҡорт теле',
array('code'=>'el','name'=>'Greek, Modern (1453)','native_name'=>'ελληνικά'), ],
array('code'=>'en','name'=>'English','native_name'=>'English'), [
array('code'=>'eo','name'=>'Esperanto','native_name'=>'Esperanto'), 'code' => 'be',
array('code'=>'es','name'=>'Spanish, Castilian','native_name'=>'Español'), 'name' => 'Belarusian',
array('code'=>'et','name'=>'Estonian','native_name'=>'eesti, eesti keel'), 'native_name' => 'беларуская мова',
array('code'=>'eu','name'=>'Basque','native_name'=>'euskara, euskera'), ],
array('code'=>'fa','name'=>'Persian','native_name'=>'فارسی'), [
array('code'=>'ff','name'=>'Fulah','native_name'=>'Fulfulde, Pulaar, Pular'), 'code' => 'bg',
array('code'=>'fi','name'=>'Finnish','native_name'=>'suomi, suomen kieli'), 'name' => 'Bulgarian',
array('code'=>'fj','name'=>'Fijian','native_name'=>'vosa Vakaviti'), 'native_name' => 'български език',
array('code'=>'fo','name'=>'Faroese','native_name'=>'føroyskt'), ],
array('code'=>'fr','name'=>'French','native_name'=>'français, langue française'), [
array('code'=>'fy','name'=>'Western Frisian','native_name'=>'Frysk'), 'code' => 'bh',
array('code'=>'ga','name'=>'Irish','native_name'=>'Gaeilge'), 'name' => 'Bihari languages',
array('code'=>'gd','name'=>'Gaelic, Scottish Gaelic','native_name'=>'Gàidhlig'), 'native_name' => 'भोजपुरी',
array('code'=>'gl','name'=>'Galician','native_name'=>'Galego'), ],
array('code'=>'gn','name'=>'Guarani','native_name'=>'Avañe\'ẽ'), ['code' => 'bi', 'name' => 'Bislama', 'native_name' => 'Bislama'],
array('code'=>'gu','name'=>'Gujarati','native_name'=>'ગુજરાતી'), [
array('code'=>'gv','name'=>'Manx','native_name'=>'Gaelg, Gailck'), 'code' => 'bm',
array('code'=>'ha','name'=>'Hausa','native_name'=>'(Hausa) هَوُسَ'), 'name' => 'Bambara',
array('code'=>'he','name'=>'Hebrew','native_name'=>'עברית'), 'native_name' => 'bamanankan',
array('code'=>'hi','name'=>'Hindi','native_name'=>'हिन्दी, हिंदी'), ],
array('code'=>'ho','name'=>'Hiri Motu','native_name'=>'Hiri Motu'), ['code' => 'bn', 'name' => 'Bengali', 'native_name' => 'বাংলা'],
array('code'=>'hr','name'=>'Croatian','native_name'=>'hrvatski jezik'), ['code' => 'bo', 'name' => 'Tibetan', 'native_name' => 'བོད་ཡིག'],
array('code'=>'ht','name'=>'Haitian, Haitian Creole','native_name'=>'Kreyòl ayisyen'), ['code' => 'br', 'name' => 'Breton', 'native_name' => 'brezhoneg'],
array('code'=>'hu','name'=>'Hungarian','native_name'=>'magyar'), [
array('code'=>'hy','name'=>'Armenian','native_name'=>'Հայերեն'), 'code' => 'bs',
array('code'=>'hz','name'=>'Herero','native_name'=>'Otjiherero'), 'name' => 'Bosnian',
array('code'=>'ia','name'=>'Interlingua (International Auxiliary Language Association)','native_name'=>'Interlingua'), 'native_name' => 'bosanski jezik',
array('code'=>'id','name'=>'Indonesian','native_name'=>'Bahasa Indonesia'), ],
array('code'=>'ie','name'=>'Interlingue, Occidental','native_name'=>'(originally:) Occidental, (after WWII:) Interlingue'), [
array('code'=>'ig','name'=>'Igbo','native_name'=>'Asụsụ Igbo'), 'code' => 'ca',
array('code'=>'ii','name'=>'Sichuan Yi, Nuosu','native_name'=>'ꆈꌠ꒿ Nuosuhxop'), 'name' => 'Catalan, Valencian',
array('code'=>'ik','name'=>'Inupiaq','native_name'=>'Iñupiaq, Iñupiatun'), 'native_name' => 'català, valencià',
array('code'=>'io','name'=>'Ido','native_name'=>'Ido'), ],
array('code'=>'is','name'=>'Icelandic','native_name'=>'Íslenska'), [
array('code'=>'it','name'=>'Italian','native_name'=>'Italiano'), 'code' => 'ce',
array('code'=>'iu','name'=>'Inuktitut','native_name'=>'ᐃᓄᒃᑎᑐᑦ'), 'name' => 'Chechen',
array('code'=>'ja','name'=>'Japanese','native_name'=>'日本語 (にほんご)'), 'native_name' => 'нохчийн мотт',
array('code'=>'jv','name'=>'Javanese','native_name'=>'ꦧꦱꦗꦮ, Basa Jawa'), ],
array('code'=>'ka','name'=>'Georgian','native_name'=>'ქართული'), ['code' => 'ch', 'name' => 'Chamorro', 'native_name' => 'Chamoru'],
array('code'=>'kg','name'=>'Kongo','native_name'=>'Kikongo'), [
array('code'=>'ki','name'=>'Kikuyu, Gikuyu','native_name'=>'Gĩkũyũ'), 'code' => 'co',
array('code'=>'kj','name'=>'Kuanyama, Kwanyama','native_name'=>'Kuanyama'), 'name' => 'Corsican',
array('code'=>'kk','name'=>'Kazakh','native_name'=>'қазақ тілі'), 'native_name' => 'corsu, lingua corsa',
array('code'=>'kl','name'=>'Kalaallisut, Greenlandic','native_name'=>'kalaallisut, kalaallit oqaasii'), ],
array('code'=>'km','name'=>'Central Khmer','native_name'=>'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ'), ['code' => 'cr', 'name' => 'Cree', 'native_name' => 'ᓀᐦᐃᔭᐍᐏᐣ'],
array('code'=>'kn','name'=>'Kannada','native_name'=>'ಕನ್ನಡ'), [
array('code'=>'ko','name'=>'Korean','native_name'=>'한국어'), 'code' => 'cs',
array('code'=>'kr','name'=>'Kanuri','native_name'=>'Kanuri'), 'name' => 'Czech',
array('code'=>'ks','name'=>'Kashmiri','native_name'=>'कश्मीरी, كشميري‎'), 'native_name' => 'čeština, český jazyk',
array('code'=>'ku','name'=>'Kurdish','native_name'=>'Kurdî, کوردی‎'), ],
array('code'=>'kv','name'=>'Komi','native_name'=>'коми кыв'), [
array('code'=>'kw','name'=>'Cornish','native_name'=>'Kernewek'), 'code' => 'cu',
array('code'=>'ky','name'=>'Kirghiz, Kyrgyz','native_name'=>'Кыргызча, Кыргыз тили'), 'name' =>
array('code'=>'la','name'=>'Latin','native_name'=>'latine, lingua latina'), 'Church Slavic, Old Slavonic, Church Slavonic, Old Bulgarian, Old Church Slavonic',
array('code'=>'lb','name'=>'Luxembourgish, Letzeburgesch','native_name'=>'Lëtzebuergesch'), 'native_name' => 'ѩзыкъ словѣньскъ',
array('code'=>'lg','name'=>'Ganda','native_name'=>'Luganda'), ],
array('code'=>'li','name'=>'Limburgan, Limburger, Limburgish','native_name'=>'Limburgs'), [
array('code'=>'ln','name'=>'Lingala','native_name'=>'Lingála'), 'code' => 'cv',
array('code'=>'lo','name'=>'Lao','native_name'=>'ພາສາລາວ'), 'name' => 'Chuvash',
array('code'=>'lt','name'=>'Lithuanian','native_name'=>'lietuvių kalba'), 'native_name' => 'чӑваш чӗлхи',
array('code'=>'lu','name'=>'Luba-Katanga','native_name'=>'Kiluba'), ],
array('code'=>'lv','name'=>'Latvian','native_name'=>'latviešu valoda'), ['code' => 'cy', 'name' => 'Welsh', 'native_name' => 'Cymraeg'],
array('code'=>'mg','name'=>'Malagasy','native_name'=>'fiteny malagasy'), ['code' => 'da', 'name' => 'Danish', 'native_name' => 'dansk'],
array('code'=>'mh','name'=>'Marshallese','native_name'=>'Kajin M̧ajeļ'), ['code' => 'de', 'name' => 'German', 'native_name' => 'Deutsch'],
array('code'=>'mi','name'=>'Maori','native_name'=>'te reo Māori'), [
array('code'=>'mk','name'=>'Macedonian','native_name'=>'македонски јазик'), 'code' => 'dv',
array('code'=>'ml','name'=>'Malayalam','native_name'=>'മലയാളം'), 'name' => 'Divehi, Dhivehi, Maldivian',
array('code'=>'mn','name'=>'Mongolian','native_name'=>'Монгол хэл'), 'native_name' => 'ދިވެހި',
array('code'=>'mr','name'=>'Marathi','native_name'=>'मराठी'), ],
array('code'=>'ms','name'=>'Malay','native_name'=>'Bahasa Melayu, بهاس ملايو‎'), ['code' => 'dz', 'name' => 'Dzongkha', 'native_name' => 'རྫོང་ཁ'],
array('code'=>'mt','name'=>'Maltese','native_name'=>'Malti'), ['code' => 'ee', 'name' => 'Ewe', 'native_name' => 'Eʋegbe'],
array('code'=>'my','name'=>'Burmese','native_name'=>'ဗမာစာ'), [
array('code'=>'na','name'=>'Nauru','native_name'=>'Dorerin Naoero'), 'code' => 'el',
array('code'=>'nb','name'=>'Norwegian Bokmål','native_name'=>'Norsk Bokmål'), 'name' => 'Greek, Modern (1453)',
array('code'=>'nd','name'=>'North Ndebele','native_name'=>'isiNdebele'), 'native_name' => 'ελληνικά',
array('code'=>'ne','name'=>'Nepali','native_name'=>'नेपाली'), ],
array('code'=>'ng','name'=>'Ndonga','native_name'=>'Owambo'), ['code' => 'en', 'name' => 'English', 'native_name' => 'English'],
array('code'=>'nl','name'=>'Dutch, Flemish','native_name'=>'Nederlands, Vlaams'), [
array('code'=>'nn','name'=>'Norwegian Nynorsk','native_name'=>'Norsk Nynorsk'), 'code' => 'eo',
array('code'=>'no','name'=>'Norwegian','native_name'=>'Norsk'), 'name' => 'Esperanto',
array('code'=>'nr','name'=>'South Ndebele','native_name'=>'isiNdebele'), 'native_name' => 'Esperanto',
array('code'=>'nv','name'=>'Navajo, Navaho','native_name'=>'Diné bizaad'), ],
array('code'=>'ny','name'=>'Chichewa, Chewa, Nyanja','native_name'=>'chiCheŵa, chinyanja'), [
array('code'=>'oc','name'=>'Occitan','native_name'=>'occitan, lenga dòc'), 'code' => 'es',
array('code'=>'oj','name'=>'Ojibwa','native_name'=>'ᐊᓂᔑᓈᐯᒧᐎᓐ'), 'name' => 'Spanish, Castilian',
array('code'=>'om','name'=>'Oromo','native_name'=>'Afaan Oromoo'), 'native_name' => 'Español',
array('code'=>'or','name'=>'Oriya','native_name'=>'ଓଡ଼ିଆ'), ],
array('code'=>'os','name'=>'Ossetian, Ossetic','native_name'=>'ирон æвзаг'), [
array('code'=>'pa','name'=>'Punjabi, Panjabi','native_name'=>'ਪੰਜਾਬੀ, پنجابی‎'), 'code' => 'et',
array('code'=>'pi','name'=>'Pali','native_name'=>'पालि, पाळि'), 'name' => 'Estonian',
array('code'=>'pl','name'=>'Polish','native_name'=>'język polski, polszczyzna'), 'native_name' => 'eesti, eesti keel',
array('code'=>'ps','name'=>'Pashto, Pushto','native_name'=>'پښتو'), ],
array('code'=>'pt','name'=>'Portuguese','native_name'=>'Português'), [
array('code'=>'qu','name'=>'Quechua','native_name'=>'Runa Simi, Kichwa'), 'code' => 'eu',
array('code'=>'rm','name'=>'Romansh','native_name'=>'Rumantsch Grischun'), 'name' => 'Basque',
array('code'=>'rn','name'=>'Rundi','native_name'=>'Ikirundi'), 'native_name' => 'euskara, euskera',
array('code'=>'ro','name'=>'Romanian, Moldavian, Moldovan','native_name'=>'Română'), ],
array('code'=>'ru','name'=>'Russian','native_name'=>'русский'), ['code' => 'fa', 'name' => 'Persian', 'native_name' => 'فارسی'],
array('code'=>'rw','name'=>'Kinyarwanda','native_name'=>'Ikinyarwanda'), [
array('code'=>'sa','name'=>'Sanskrit','native_name'=>'संस्कृतम्'), 'code' => 'ff',
array('code'=>'sc','name'=>'Sardinian','native_name'=>'sardu'), 'name' => 'Fulah',
array('code'=>'sd','name'=>'Sindhi','native_name'=>'सिन्धी, سنڌي، سندھی‎'), 'native_name' => 'Fulfulde, Pulaar, Pular',
array('code'=>'se','name'=>'Northern Sami','native_name'=>'Davvisámegiella'), ],
array('code'=>'sg','name'=>'Sango','native_name'=>'yângâ tî sängö'), [
array('code'=>'si','name'=>'Sinhala, Sinhalese','native_name'=>'සිංහල'), 'code' => 'fi',
array('code'=>'sk','name'=>'Slovak','native_name'=>'Slovenčina, Slovenský Jazyk'), 'name' => 'Finnish',
array('code'=>'sl','name'=>'Slovenian','native_name'=>'Slovenski Jezik, Slovenščina'), 'native_name' => 'suomi, suomen kieli',
array('code'=>'sm','name'=>'Samoan','native_name'=>'gagana fa\'a Samoa'), ],
array('code'=>'sn','name'=>'Shona','native_name'=>'chiShona'), [
array('code'=>'so','name'=>'Somali','native_name'=>'Soomaaliga, af Soomaali'), 'code' => 'fj',
array('code'=>'sq','name'=>'Albanian','native_name'=>'Shqip'), 'name' => 'Fijian',
array('code'=>'sr','name'=>'Serbian','native_name'=>'српски језик'), 'native_name' => 'vosa Vakaviti',
array('code'=>'ss','name'=>'Swati','native_name'=>'SiSwati'), ],
array('code'=>'st','name'=>'Southern Sotho','native_name'=>'Sesotho'), ['code' => 'fo', 'name' => 'Faroese', 'native_name' => 'føroyskt'],
array('code'=>'su','name'=>'Sundanese','native_name'=>'Basa Sunda'), [
array('code'=>'sv','name'=>'Swedish','native_name'=>'Svenska'), 'code' => 'fr',
array('code'=>'sw','name'=>'Swahili','native_name'=>'Kiswahili'), 'name' => 'French',
array('code'=>'ta','name'=>'Tamil','native_name'=>'தமிழ்'), 'native_name' => 'français, langue française',
array('code'=>'te','name'=>'Telugu','native_name'=>'తెలుగు'), ],
array('code'=>'tg','name'=>'Tajik','native_name'=>'тоҷикӣ, toçikī, تاجیکی‎'), [
array('code'=>'th','name'=>'Thai','native_name'=>'ไทย'), 'code' => 'fy',
array('code'=>'ti','name'=>'Tigrinya','native_name'=>'ትግርኛ'), 'name' => 'Western Frisian',
array('code'=>'tk','name'=>'Turkmen','native_name'=>'Türkmen, Түркмен'), 'native_name' => 'Frysk',
array('code'=>'tl','name'=>'Tagalog','native_name'=>'Wikang Tagalog'), ],
array('code'=>'tn','name'=>'Tswana','native_name'=>'Setswana'), ['code' => 'ga', 'name' => 'Irish', 'native_name' => 'Gaeilge'],
array('code'=>'to','name'=>'Tonga (Tonga Islands)','native_name'=>'Faka Tonga'), [
array('code'=>'tr','name'=>'Turkish','native_name'=>'Türkçe'), 'code' => 'gd',
array('code'=>'ts','name'=>'Tsonga','native_name'=>'Xitsonga'), 'name' => 'Gaelic, Scottish Gaelic',
array('code'=>'tt','name'=>'Tatar','native_name'=>'татар теле, tatar tele'), 'native_name' => 'Gàidhlig',
array('code'=>'tw','name'=>'Twi','native_name'=>'Twi'), ],
array('code'=>'ty','name'=>'Tahitian','native_name'=>'Reo Tahiti'), ['code' => 'gl', 'name' => 'Galician', 'native_name' => 'Galego'],
array('code'=>'ug','name'=>'Uighur, Uyghur','native_name'=>'ئۇيغۇرچە‎, Uyghurche'), ['code' => 'gn', 'name' => 'Guarani', 'native_name' => 'Avañe\'ẽ'],
array('code'=>'uk','name'=>'Ukrainian','native_name'=>'Українська'), ['code' => 'gu', 'name' => 'Gujarati', 'native_name' => 'ગુજરાતી'],
array('code'=>'ur','name'=>'Urdu','native_name'=>'اردو'), [
array('code'=>'uz','name'=>'Uzbek','native_name'=>'Oʻzbek, Ўзбек, أۇزبېك‎'), 'code' => 'gv',
array('code'=>'ve','name'=>'Venda','native_name'=>'Tshivenḓa'), 'name' => 'Manx',
array('code'=>'vi','name'=>'Vietnamese','native_name'=>'Tiếng Việt'), 'native_name' => 'Gaelg, Gailck',
array('code'=>'vo','name'=>'Volapük','native_name'=>'Volapük'), ],
array('code'=>'wa','name'=>'Walloon','native_name'=>'Walon'), [
array('code'=>'wo','name'=>'Wolof','native_name'=>'Wollof'), 'code' => 'ha',
array('code'=>'xh','name'=>'Xhosa','native_name'=>'isiXhosa'), 'name' => 'Hausa',
array('code'=>'yi','name'=>'Yiddish','native_name'=>'ייִדיש'), 'native_name' => '(Hausa) هَوُسَ',
array('code'=>'yo','name'=>'Yoruba','native_name'=>'Yorùbá'), ],
array('code'=>'za','name'=>'Zhuang, Chuang','native_name'=>'Saɯ cueŋƅ, Saw cuengh'), ['code' => 'he', 'name' => 'Hebrew', 'native_name' => 'עברית'],
array('code'=>'zh','name'=>'Chinese','native_name'=>'中文 (Zhōngwén), 汉语, 漢語'), [
array('code'=>'zu','name'=>'Zulu','native_name'=>'isiZulu'), 'code' => 'hi',
); 'name' => 'Hindi',
'native_name' => 'हिन्दी, हिंदी',
],
[
'code' => 'ho',
'name' => 'Hiri Motu',
'native_name' => 'Hiri Motu',
],
[
'code' => 'hr',
'name' => 'Croatian',
'native_name' => 'hrvatski jezik',
],
[
'code' => 'ht',
'name' => 'Haitian, Haitian Creole',
'native_name' => 'Kreyòl ayisyen',
],
['code' => 'hu', 'name' => 'Hungarian', 'native_name' => 'magyar'],
['code' => 'hy', 'name' => 'Armenian', 'native_name' => 'Հայերեն'],
['code' => 'hz', 'name' => 'Herero', 'native_name' => 'Otjiherero'],
[
'code' => 'ia',
'name' =>
'Interlingua (International Auxiliary Language Association)',
'native_name' => 'Interlingua',
],
[
'code' => 'id',
'name' => 'Indonesian',
'native_name' => 'Bahasa Indonesia',
],
[
'code' => 'ie',
'name' => 'Interlingue, Occidental',
'native_name' =>
'(originally:) Occidental, (after WWII:) Interlingue',
],
['code' => 'ig', 'name' => 'Igbo', 'native_name' => 'Asụsụ Igbo'],
[
'code' => 'ii',
'name' => 'Sichuan Yi, Nuosu',
'native_name' => 'ꆈꌠ꒿ Nuosuhxop',
],
[
'code' => 'ik',
'name' => 'Inupiaq',
'native_name' => 'Iñupiaq, Iñupiatun',
],
['code' => 'io', 'name' => 'Ido', 'native_name' => 'Ido'],
[
'code' => 'is',
'name' => 'Icelandic',
'native_name' => 'Íslenska',
],
['code' => 'it', 'name' => 'Italian', 'native_name' => 'Italiano'],
['code' => 'iu', 'name' => 'Inuktitut', 'native_name' => 'ᐃᓄᒃᑎᑐᑦ'],
[
'code' => 'ja',
'name' => 'Japanese',
'native_name' => '日本語 (にほんご)',
],
[
'code' => 'jv',
'name' => 'Javanese',
'native_name' => 'ꦧꦱꦗꦮ, Basa Jawa',
],
['code' => 'ka', 'name' => 'Georgian', 'native_name' => 'ქართული'],
['code' => 'kg', 'name' => 'Kongo', 'native_name' => 'Kikongo'],
[
'code' => 'ki',
'name' => 'Kikuyu, Gikuyu',
'native_name' => 'Gĩkũyũ',
],
[
'code' => 'kj',
'name' => 'Kuanyama, Kwanyama',
'native_name' => 'Kuanyama',
],
['code' => 'kk', 'name' => 'Kazakh', 'native_name' => 'қазақ тілі'],
[
'code' => 'kl',
'name' => 'Kalaallisut, Greenlandic',
'native_name' => 'kalaallisut, kalaallit oqaasii',
],
[
'code' => 'km',
'name' => 'Central Khmer',
'native_name' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ',
],
['code' => 'kn', 'name' => 'Kannada', 'native_name' => 'ಕನ್ನಡ'],
['code' => 'ko', 'name' => 'Korean', 'native_name' => '한국어'],
['code' => 'kr', 'name' => 'Kanuri', 'native_name' => 'Kanuri'],
[
'code' => 'ks',
'name' => 'Kashmiri',
'native_name' => 'कश्मीरी, كشميري‎',
],
[
'code' => 'ku',
'name' => 'Kurdish',
'native_name' => 'Kurdî, کوردی‎',
],
['code' => 'kv', 'name' => 'Komi', 'native_name' => 'коми кыв'],
['code' => 'kw', 'name' => 'Cornish', 'native_name' => 'Kernewek'],
[
'code' => 'ky',
'name' => 'Kirghiz, Kyrgyz',
'native_name' => 'Кыргызча, Кыргыз тили',
],
[
'code' => 'la',
'name' => 'Latin',
'native_name' => 'latine, lingua latina',
],
[
'code' => 'lb',
'name' => 'Luxembourgish, Letzeburgesch',
'native_name' => 'Lëtzebuergesch',
],
['code' => 'lg', 'name' => 'Ganda', 'native_name' => 'Luganda'],
[
'code' => 'li',
'name' => 'Limburgan, Limburger, Limburgish',
'native_name' => 'Limburgs',
],
['code' => 'ln', 'name' => 'Lingala', 'native_name' => 'Lingála'],
['code' => 'lo', 'name' => 'Lao', 'native_name' => 'ພາສາລາວ'],
[
'code' => 'lt',
'name' => 'Lithuanian',
'native_name' => 'lietuvių kalba',
],
[
'code' => 'lu',
'name' => 'Luba-Katanga',
'native_name' => 'Kiluba',
],
[
'code' => 'lv',
'name' => 'Latvian',
'native_name' => 'latviešu valoda',
],
[
'code' => 'mg',
'name' => 'Malagasy',
'native_name' => 'fiteny malagasy',
],
[
'code' => 'mh',
'name' => 'Marshallese',
'native_name' => 'Kajin M̧ajeļ',
],
[
'code' => 'mi',
'name' => 'Maori',
'native_name' => 'te reo Māori',
],
[
'code' => 'mk',
'name' => 'Macedonian',
'native_name' => 'македонски јазик',
],
['code' => 'ml', 'name' => 'Malayalam', 'native_name' => 'മലയാളം'],
[
'code' => 'mn',
'name' => 'Mongolian',
'native_name' => 'Монгол хэл',
],
['code' => 'mr', 'name' => 'Marathi', 'native_name' => 'मराठी'],
[
'code' => 'ms',
'name' => 'Malay',
'native_name' => 'Bahasa Melayu, بهاس ملايو‎',
],
['code' => 'mt', 'name' => 'Maltese', 'native_name' => 'Malti'],
['code' => 'my', 'name' => 'Burmese', 'native_name' => 'ဗမာစာ'],
[
'code' => 'na',
'name' => 'Nauru',
'native_name' => 'Dorerin Naoero',
],
[
'code' => 'nb',
'name' => 'Norwegian Bokmål',
'native_name' => 'Norsk Bokmål',
],
[
'code' => 'nd',
'name' => 'North Ndebele',
'native_name' => 'isiNdebele',
],
['code' => 'ne', 'name' => 'Nepali', 'native_name' => 'नेपाली'],
['code' => 'ng', 'name' => 'Ndonga', 'native_name' => 'Owambo'],
[
'code' => 'nl',
'name' => 'Dutch, Flemish',
'native_name' => 'Nederlands, Vlaams',
],
[
'code' => 'nn',
'name' => 'Norwegian Nynorsk',
'native_name' => 'Norsk Nynorsk',
],
['code' => 'no', 'name' => 'Norwegian', 'native_name' => 'Norsk'],
[
'code' => 'nr',
'name' => 'South Ndebele',
'native_name' => 'isiNdebele',
],
[
'code' => 'nv',
'name' => 'Navajo, Navaho',
'native_name' => 'Diné bizaad',
],
[
'code' => 'ny',
'name' => 'Chichewa, Chewa, Nyanja',
'native_name' => 'chiCheŵa, chinyanja',
],
[
'code' => 'oc',
'name' => 'Occitan',
'native_name' => 'occitan, lenga dòc',
],
['code' => 'oj', 'name' => 'Ojibwa', 'native_name' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ'],
[
'code' => 'om',
'name' => 'Oromo',
'native_name' => 'Afaan Oromoo',
],
['code' => 'or', 'name' => 'Oriya', 'native_name' => 'ଓଡ଼ିଆ'],
[
'code' => 'os',
'name' => 'Ossetian, Ossetic',
'native_name' => 'ирон æвзаг',
],
[
'code' => 'pa',
'name' => 'Punjabi, Panjabi',
'native_name' => 'ਪੰਜਾਬੀ, پنجابی‎',
],
['code' => 'pi', 'name' => 'Pali', 'native_name' => 'पालि, पाळि'],
[
'code' => 'pl',
'name' => 'Polish',
'native_name' => 'język polski, polszczyzna',
],
[
'code' => 'ps',
'name' => 'Pashto, Pushto',
'native_name' => 'پښتو',
],
[
'code' => 'pt',
'name' => 'Portuguese',
'native_name' => 'Português',
],
[
'code' => 'qu',
'name' => 'Quechua',
'native_name' => 'Runa Simi, Kichwa',
],
[
'code' => 'rm',
'name' => 'Romansh',
'native_name' => 'Rumantsch Grischun',
],
['code' => 'rn', 'name' => 'Rundi', 'native_name' => 'Ikirundi'],
[
'code' => 'ro',
'name' => 'Romanian, Moldavian, Moldovan',
'native_name' => 'Română',
],
['code' => 'ru', 'name' => 'Russian', 'native_name' => 'русский'],
[
'code' => 'rw',
'name' => 'Kinyarwanda',
'native_name' => 'Ikinyarwanda',
],
[
'code' => 'sa',
'name' => 'Sanskrit',
'native_name' => 'संस्कृतम्',
],
['code' => 'sc', 'name' => 'Sardinian', 'native_name' => 'sardu'],
[
'code' => 'sd',
'name' => 'Sindhi',
'native_name' => 'सिन्धी, سنڌي، سندھی‎',
],
[
'code' => 'se',
'name' => 'Northern Sami',
'native_name' => 'Davvisámegiella',
],
[
'code' => 'sg',
'name' => 'Sango',
'native_name' => 'yângâ tî sängö',
],
[
'code' => 'si',
'name' => 'Sinhala, Sinhalese',
'native_name' => 'සිංහල',
],
[
'code' => 'sk',
'name' => 'Slovak',
'native_name' => 'Slovenčina, Slovenský Jazyk',
],
[
'code' => 'sl',
'name' => 'Slovenian',
'native_name' => 'Slovenski Jezik, Slovenščina',
],
[
'code' => 'sm',
'name' => 'Samoan',
'native_name' => 'gagana fa\'a Samoa',
],
['code' => 'sn', 'name' => 'Shona', 'native_name' => 'chiShona'],
[
'code' => 'so',
'name' => 'Somali',
'native_name' => 'Soomaaliga, af Soomaali',
],
['code' => 'sq', 'name' => 'Albanian', 'native_name' => 'Shqip'],
[
'code' => 'sr',
'name' => 'Serbian',
'native_name' => 'српски језик',
],
['code' => 'ss', 'name' => 'Swati', 'native_name' => 'SiSwati'],
[
'code' => 'st',
'name' => 'Southern Sotho',
'native_name' => 'Sesotho',
],
[
'code' => 'su',
'name' => 'Sundanese',
'native_name' => 'Basa Sunda',
],
['code' => 'sv', 'name' => 'Swedish', 'native_name' => 'Svenska'],
['code' => 'sw', 'name' => 'Swahili', 'native_name' => 'Kiswahili'],
['code' => 'ta', 'name' => 'Tamil', 'native_name' => 'தமிழ்'],
['code' => 'te', 'name' => 'Telugu', 'native_name' => 'తెలుగు'],
[
'code' => 'tg',
'name' => 'Tajik',
'native_name' => 'тоҷикӣ, toçikī, تاجیکی‎',
],
['code' => 'th', 'name' => 'Thai', 'native_name' => 'ไทย'],
['code' => 'ti', 'name' => 'Tigrinya', 'native_name' => 'ትግርኛ'],
[
'code' => 'tk',
'name' => 'Turkmen',
'native_name' => 'Türkmen, Түркмен',
],
[
'code' => 'tl',
'name' => 'Tagalog',
'native_name' => 'Wikang Tagalog',
],
['code' => 'tn', 'name' => 'Tswana', 'native_name' => 'Setswana'],
[
'code' => 'to',
'name' => 'Tonga (Tonga Islands)',
'native_name' => 'Faka Tonga',
],
['code' => 'tr', 'name' => 'Turkish', 'native_name' => 'Türkçe'],
['code' => 'ts', 'name' => 'Tsonga', 'native_name' => 'Xitsonga'],
[
'code' => 'tt',
'name' => 'Tatar',
'native_name' => 'татар теле, tatar tele',
],
['code' => 'tw', 'name' => 'Twi', 'native_name' => 'Twi'],
[
'code' => 'ty',
'name' => 'Tahitian',
'native_name' => 'Reo Tahiti',
],
[
'code' => 'ug',
'name' => 'Uighur, Uyghur',
'native_name' => 'ئۇيغۇرچە‎, Uyghurche',
],
[
'code' => 'uk',
'name' => 'Ukrainian',
'native_name' => 'Українська',
],
['code' => 'ur', 'name' => 'Urdu', 'native_name' => 'اردو'],
[
'code' => 'uz',
'name' => 'Uzbek',
'native_name' => 'Oʻzbek, Ўзбек, أۇزبېك‎',
],
['code' => 've', 'name' => 'Venda', 'native_name' => 'Tshivenḓa'],
[
'code' => 'vi',
'name' => 'Vietnamese',
'native_name' => 'Tiếng Việt',
],
['code' => 'vo', 'name' => 'Volapük', 'native_name' => 'Volapük'],
['code' => 'wa', 'name' => 'Walloon', 'native_name' => 'Walon'],
['code' => 'wo', 'name' => 'Wolof', 'native_name' => 'Wollof'],
['code' => 'xh', 'name' => 'Xhosa', 'native_name' => 'isiXhosa'],
['code' => 'yi', 'name' => 'Yiddish', 'native_name' => 'ייִדיש'],
['code' => 'yo', 'name' => 'Yoruba', 'native_name' => 'Yorùbá'],
[
'code' => 'za',
'name' => 'Zhuang, Chuang',
'native_name' => 'Saɯ cueŋƅ, Saw cuengh',
],
[
'code' => 'zh',
'name' => 'Chinese',
'native_name' => '中文 (Zhōngwén), 汉语, 漢語',
],
['code' => 'zu', 'name' => 'Zulu', 'native_name' => 'isiZulu'],
];
$this->db->table('languages')->insertBatch($data); $this->db->table('languages')->insertBatch($data);
} }

View File

@ -1,8 +1,8 @@
<?php <?php
/** /**
* Class PlatformsSeeder * Class PlatformsSeeder
* Insert values in platforms table in database * Inserts values in platforms table in database
* @author Benjamin Bellamy <ben@podlibre.org> *
* @copyright 2020 Podlibre * @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/ * @link https://castopod.org/
@ -16,32 +16,319 @@ class PlatformSeeder extends Seeder
{ {
public function run() public function run()
{ {
$data = array( $data = [
array('name' => 'Apple Podcasts', 'home_url' => 'https://www.apple.com/itunes/podcasts/', 'submit_url' => 'https://podcastsconnect.apple.com/my-podcasts/new-feed', 'iosapp_url' => 'https://apps.apple.com/app/apple-podcasts/id525463029', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 1, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'ApplePodcasts.png'), [
array('name' => 'Blubrry', 'home_url' => 'https://www.blubrry.com/', 'submit_url' => 'https://www.blubrry.com/addpodcast.php', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'blubrry.png'), 'name' => 'Apple Podcasts',
array('name' => 'Castbox', 'home_url' => 'https://castbox.fm/', 'submit_url' => 'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast', 'iosapp_url' => 'https://apps.apple.com/app/castbox-the-podcast-app/id1243410543', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=fm.castbox.audiobook.radio.podcast&hl=fr', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Castbox.png'), 'home_url' => 'https://www.apple.com/itunes/podcasts/',
array('name' => 'Castro', 'home_url' => 'http://castro.fm/', 'submit_url' => '', 'iosapp_url' => 'https://apps.apple.com/app/apple-store/id1080840241?ign-mpt=uo%3D4', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'Castro.png'), 'submit_url' =>
array('name' => 'Chartable', 'home_url' => 'https://chartable.com/', 'submit_url' => 'https://chartable.com/podcasts/submit', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'Chartable.png'), 'https://podcastsconnect.apple.com/my-podcasts/new-feed',
array('name' => 'Deezer', 'home_url' => 'https://www.deezer.com/', 'submit_url' => 'https://podcasters.deezer.com/submission', 'iosapp_url' => 'https://apps.apple.com/app/deezer-music-podcast-player/id292738169', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=deezer.android.app', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Deezer.png'), 'iosapp_url' =>
array('name' => 'Google Podcasts', 'home_url' => 'https://podcasts.google.com/about', 'submit_url' => 'https://search.google.com/search-console/about', 'iosapp_url' => '', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.google.android.apps.podcasts', 'comment' => '', 'display_by_default' => 1, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'GooglePodcasts.png'), 'https://apps.apple.com/app/apple-podcasts/id525463029',
array('name' => 'Ivoox', 'home_url' => 'https://www.ivoox.com/', 'submit_url' => '', 'iosapp_url' => 'https://apps.apple.com/app/apple-store/id542673545', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.ivoox.app', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'ivoox.png'), 'androidapp_url' => '',
array('name' => 'ListenNotes', 'home_url' => 'https://www.listennotes.com/', 'submit_url' => 'https://www.listennotes.com/submit/', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'ListenNotes.png'), 'comment' => '',
'display_by_default' => 1,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'ApplePodcasts.png',
],
[
'name' => 'Blubrry',
'home_url' => 'https://www.blubrry.com/',
'submit_url' => 'https://www.blubrry.com/addpodcast.php',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'blubrry.png',
],
[
'name' => 'Castbox',
'home_url' => 'https://castbox.fm/',
'submit_url' =>
'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast',
'iosapp_url' =>
'https://apps.apple.com/app/castbox-the-podcast-app/id1243410543',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=fm.castbox.audiobook.radio.podcast&hl=fr',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 2,
'logo_file_name' => 'Castbox.png',
],
[
'name' => 'Castro',
'home_url' => 'http://castro.fm/',
'submit_url' => '',
'iosapp_url' =>
'https://apps.apple.com/app/apple-store/id1080840241?ign-mpt=uo%3D4',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'Castro.png',
],
[
'name' => 'Chartable',
'home_url' => 'https://chartable.com/',
'submit_url' => 'https://chartable.com/podcasts/submit',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'Chartable.png',
],
[
'name' => 'Deezer',
'home_url' => 'https://www.deezer.com/',
'submit_url' => 'https://podcasters.deezer.com/submission',
'iosapp_url' =>
'https://apps.apple.com/app/deezer-music-podcast-player/id292738169',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=deezer.android.app',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 2,
'logo_file_name' => 'Deezer.png',
],
[
'name' => 'Google Podcasts',
'home_url' => 'https://podcasts.google.com/about',
'submit_url' =>
'https://search.google.com/search-console/about',
'iosapp_url' => '',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.google.android.apps.podcasts',
'comment' => '',
'display_by_default' => 1,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'GooglePodcasts.png',
],
[
'name' => 'Ivoox',
'home_url' => 'https://www.ivoox.com/',
'submit_url' => '',
'iosapp_url' =>
'https://apps.apple.com/app/apple-store/id542673545',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.ivoox.app',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'ivoox.png',
],
[
'name' => 'ListenNotes',
'home_url' => 'https://www.listennotes.com/',
'submit_url' => 'https://www.listennotes.com/submit/',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'ListenNotes.png',
],
//array('name' => 'Majelan', 'home_url' => 'https://www.majelan.com/', 'submit_url' => 'https://support.majelan.com/article/64-how-to-add-my-podcast-on-majelan', 'iosapp_url' => 'https://apps.apple.com/app/majelan-best-audio-stories/id1443711081', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.majelanapp', 'comment' => 'Uses public podcasts indexes. Send a DM if you are not listed.', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Majelan.png'), // https://aide.majelan.com/article/130-pourquoi-nouvelle-application-7-juillet //array('name' => 'Majelan', 'home_url' => 'https://www.majelan.com/', 'submit_url' => 'https://support.majelan.com/article/64-how-to-add-my-podcast-on-majelan', 'iosapp_url' => 'https://apps.apple.com/app/majelan-best-audio-stories/id1443711081', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.majelanapp', 'comment' => 'Uses public podcasts indexes. Send a DM if you are not listed.', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Majelan.png'), // https://aide.majelan.com/article/130-pourquoi-nouvelle-application-7-juillet
array('name' => 'Mytuner', 'home_url' => 'https://mytuner-radio.com/', 'submit_url' => 'https://mytuner-radio.com/broadcasters/', 'iosapp_url' => 'https://apps.apple.com/app/apple-store/id520502858', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.appgeneration.itunerfree', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'myTuner.png'), [
array('name' => 'Overcast', 'home_url' => 'https://overcast.fm/', 'submit_url' => 'https://overcast.fm/podcasterinfo', 'iosapp_url' => 'https://apps.apple.com/us/app/overcast-podcast-player/id888422857', 'androidapp_url' => '', 'comment' => 'Overcast uses Apple Podcasts index, no podcast submission needed.', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'Overcast.png'), 'name' => 'Mytuner',
array('name' => 'Player.Fm', 'home_url' => 'https://player.fm/', 'submit_url' => 'https://player.fm/importer/feed', 'iosapp_url' => 'https://apps.apple.com/app/podcast-app-by-player-fm/id940568467', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=fm.player', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'PlayerFM.png'), 'home_url' => 'https://mytuner-radio.com/',
array('name' => 'Pocketcasts', 'home_url' => 'https://www.pocketcasts.com/', 'submit_url' => 'https://www.pocketcasts.com/submit/', 'iosapp_url' => 'https://apps.apple.com/app/pocket-casts/id414834813', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=au.com.shiftyjelly.pocketcasts', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'PocketCasts.png'), 'submit_url' => 'https://mytuner-radio.com/broadcasters/',
array('name' => 'Podbean', 'home_url' => 'https://www.podbean.com/', 'submit_url' => 'https://www.podbean.com/site/submitPodcast', 'iosapp_url' => 'https://apps.apple.com/app/apple-store/id973361050', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.podbean.app.podcast', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Podbean.png'), 'iosapp_url' =>
array('name' => 'Podcastland', 'home_url' => 'https://podcastland.com/', 'submit_url' => '', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => 'Uses Apple Podcasts index.', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'PodcastLand.png'), 'https://apps.apple.com/app/apple-store/id520502858',
array('name' => 'Podcastrepublic', 'home_url' => 'https://www.podcastrepublic.net/', 'submit_url' => 'https://www.podcastrepublic.net/for-podcast-publisher', 'iosapp_url' => '', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.itunestoppodcastplayer.app', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'PodcastRepublic.png'), 'androidapp_url' =>
array('name' => 'Podchaser', 'home_url' => 'https://www.podchaser.com/', 'submit_url' => 'https://www.podchaser.com/creators/edit', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'Podchaser.png'), 'https://play.google.com/store/apps/details?id=com.appgeneration.itunerfree',
array('name' => 'Podtail', 'home_url' => 'https://podtail.com/', 'submit_url' => 'https://podtail.com/about/faq/', 'iosapp_url' => '', 'androidapp_url' => '', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 0, 'logo_file_name' => 'Podtail.png'), 'comment' => '',
array('name' => 'Radiopublic', 'home_url' => 'https://radiopublic.com/', 'submit_url' => 'https://podcasters.radiopublic.com/signup', 'iosapp_url' => 'https://apps.apple.com/app/radiopublic-free-podcasts/id1113752736', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.radiopublic.android', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'RadioPublic.png'), 'display_by_default' => 0,
array('name' => 'Spotify', 'home_url' => 'https://www.spotify.com/', 'submit_url' => 'https://podcasters.spotify.com/submit', 'iosapp_url' => 'https://apps.apple.com/app/spotify-music/id324684580', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.spotify.music', 'comment' => '', 'display_by_default' => 1, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'Spotify.png'), 'ios_deeplink' => 0,
array('name' => 'Spreaker', 'home_url' => 'https://www.spreaker.com/', 'submit_url' => 'https://www.spreaker.com/cms/shows/rss-import', 'iosapp_url' => 'https://apps.apple.com/app/spreaker-podcast-radio/id388449677', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.spreaker.android', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'Spreaker.png'), 'android_deeplink' => 1,
array('name' => 'Stitcher', 'home_url' => 'https://www.stitcher.com/', 'submit_url' => 'https://www.stitcher.com/content-providers', 'iosapp_url' => 'https://apps.apple.com/app/id288087905', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=com.stitcher.app', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 1, 'logo_file_name' => 'Stitcher.png'), 'logo_file_name' => 'myTuner.png',
array('name' => 'TuneIn', 'home_url' => 'https://tunein.com/', 'submit_url' => 'https://help.tunein.com/contact/add-podcast-S19TR3Sdf', 'iosapp_url' => 'https://apps.apple.com/app/tunein-radio/id418987775', 'androidapp_url' => 'https://play.google.com/store/apps/details?id=tunein.player', 'comment' => '', 'display_by_default' => 0, 'ios_deeplink' => 0, 'android_deeplink' => 2, 'logo_file_name' => 'TuneIn.png'), ],
); [
'name' => 'Overcast',
'home_url' => 'https://overcast.fm/',
'submit_url' => 'https://overcast.fm/podcasterinfo',
'iosapp_url' =>
'https://apps.apple.com/us/app/overcast-podcast-player/id888422857',
'androidapp_url' => '',
'comment' =>
'Overcast uses Apple Podcasts index, no podcast submission needed.',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'Overcast.png',
],
[
'name' => 'Player.Fm',
'home_url' => 'https://player.fm/',
'submit_url' => 'https://player.fm/importer/feed',
'iosapp_url' =>
'https://apps.apple.com/app/podcast-app-by-player-fm/id940568467',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=fm.player',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'PlayerFM.png',
],
[
'name' => 'Pocketcasts',
'home_url' => 'https://www.pocketcasts.com/',
'submit_url' => 'https://www.pocketcasts.com/submit/',
'iosapp_url' =>
'https://apps.apple.com/app/pocket-casts/id414834813',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=au.com.shiftyjelly.pocketcasts',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'PocketCasts.png',
],
[
'name' => 'Podbean',
'home_url' => 'https://www.podbean.com/',
'submit_url' => 'https://www.podbean.com/site/submitPodcast',
'iosapp_url' =>
'https://apps.apple.com/app/apple-store/id973361050',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.podbean.app.podcast',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 2,
'logo_file_name' => 'Podbean.png',
],
[
'name' => 'Podcastland',
'home_url' => 'https://podcastland.com/',
'submit_url' => '',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => 'Uses Apple Podcasts index.',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'PodcastLand.png',
],
[
'name' => 'Podcastrepublic',
'home_url' => 'https://www.podcastrepublic.net/',
'submit_url' =>
'https://www.podcastrepublic.net/for-podcast-publisher',
'iosapp_url' => '',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.itunestoppodcastplayer.app',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'PodcastRepublic.png',
],
[
'name' => 'Podchaser',
'home_url' => 'https://www.podchaser.com/',
'submit_url' => 'https://www.podchaser.com/creators/edit',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'Podchaser.png',
],
[
'name' => 'Podtail',
'home_url' => 'https://podtail.com/',
'submit_url' => 'https://podtail.com/about/faq/',
'iosapp_url' => '',
'androidapp_url' => '',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 0,
'logo_file_name' => 'Podtail.png',
],
[
'name' => 'Radiopublic',
'home_url' => 'https://radiopublic.com/',
'submit_url' => 'https://podcasters.radiopublic.com/signup',
'iosapp_url' =>
'https://apps.apple.com/app/radiopublic-free-podcasts/id1113752736',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.radiopublic.android',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'RadioPublic.png',
],
[
'name' => 'Spotify',
'home_url' => 'https://www.spotify.com/',
'submit_url' => 'https://podcasters.spotify.com/submit',
'iosapp_url' =>
'https://apps.apple.com/app/spotify-music/id324684580',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.spotify.music',
'comment' => '',
'display_by_default' => 1,
'ios_deeplink' => 0,
'android_deeplink' => 2,
'logo_file_name' => 'Spotify.png',
],
[
'name' => 'Spreaker',
'home_url' => 'https://www.spreaker.com/',
'submit_url' => 'https://www.spreaker.com/cms/shows/rss-import',
'iosapp_url' =>
'https://apps.apple.com/app/spreaker-podcast-radio/id388449677',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.spreaker.android',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'Spreaker.png',
],
[
'name' => 'Stitcher',
'home_url' => 'https://www.stitcher.com/',
'submit_url' => 'https://www.stitcher.com/content-providers',
'iosapp_url' => 'https://apps.apple.com/app/id288087905',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=com.stitcher.app',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 1,
'logo_file_name' => 'Stitcher.png',
],
[
'name' => 'TuneIn',
'home_url' => 'https://tunein.com/',
'submit_url' =>
'https://help.tunein.com/contact/add-podcast-S19TR3Sdf',
'iosapp_url' =>
'https://apps.apple.com/app/tunein-radio/id418987775',
'androidapp_url' =>
'https://play.google.com/store/apps/details?id=tunein.player',
'comment' => '',
'display_by_default' => 0,
'ios_deeplink' => 0,
'android_deeplink' => 2,
'logo_file_name' => 'TuneIn.png',
],
];
$this->db->table('platforms')->insertBatch($data); $this->db->table('platforms')->insertBatch($data);
} }
} }

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Entities; namespace App\Entities;

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Entities; namespace App\Entities;

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Entities; namespace App\Entities;
@ -8,6 +13,6 @@ class Language extends Entity
{ {
protected $casts = [ protected $casts = [
'code' => 'string', 'code' => 'string',
'native_name' => 'string' 'native_name' => 'string',
]; ];
} }

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Entities; namespace App\Entities;

View File

@ -0,0 +1,33 @@
<?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
/**
* Get all possible enum values for a table field
*
* @param string $table
* @param string $field
*
* @return array $enums
*/
function field_enums($table = '', $field = '')
{
$enums = [];
if ($table == '' || $field == '') {
return $enums;
}
$db = \Config\Database::connect();
preg_match_all(
"/'(.*?)'/",
$db->query("SHOW COLUMNS FROM {$table} LIKE '{$field}'")->getRow()
->Type,
$matches
);
foreach ($matches[1] as $value) {
$enums[$value] = $value;
}
return $enums;
}

View File

@ -0,0 +1,53 @@
<?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
use JamesHeinrich\GetID3\GetID3;
/**
* Saves a file to the corresponding podcast folder in `public/media`
*
* @param UploadedFile $file
* @param string $podcast_name
* @param string $file_name
*
* @return string The absolute path of the file
*/
function save_podcast_media($file, $podcast_name, $file_name)
{
$image_storage_folder = 'media/' . $podcast_name . '/';
// overwrite file if already existing
$file->move($image_storage_folder, $file_name, true);
return $image_storage_folder . $file_name;
}
/**
* Gets audio file metadata and ID3 info
*
* @param UploadedFile $file
*
* @return array
*/
function get_file_metadata($file)
{
if (!$file->isValid()) {
throw new RuntimeException(
$file->getErrorString() . '(' . $file->getError() . ')'
);
}
$getID3 = new GetID3();
$FileInfo = $getID3->analyze($file);
return [
'cover_picture' => $FileInfo['comments']['picture'][0]['data'],
'filesize' => $FileInfo['filesize'],
'mime_type' => $FileInfo['mime_type'],
'playtime_seconds' => $FileInfo['playtime_seconds'],
];
}

View File

@ -0,0 +1,23 @@
<?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
/**
* Gets the browser default language using the request header key `HTTP_ACCEPT_LANGUAGE`
*
* @param mixed $http_accept_language
*
* @return string|null ISO 639-1 language code or null
*/
function get_browser_language($http_accept_language)
{
$langs = explode(',', $http_accept_language);
if (!empty($langs)) {
return substr($langs[0], 0, 2);
}
return null;
}

View File

@ -0,0 +1,24 @@
<?
return [
'create' => 'Add an episode',
'form' => [
'file' => 'Audio file',
'title' => 'Title',
'slug' => 'Slug',
'description' => 'Description',
'pub_date' => 'Publication date',
'image' => 'Image',
'explicit' => 'Explicit',
'type' => [
'label' => 'Type',
'full' => 'Full',
'trailer' => 'Trailer',
'bonus' => 'Bonus',
],
'episode_number' => 'Episode number',
'season_number' => 'Season number',
'block' => 'Block',
'submit' => 'Create episode',
]
];

View File

@ -1,6 +1,6 @@
<? <?
return [ return [
"all_podcasts" => "All podcasts", 'all_podcasts' => 'All podcasts',
"no_podcast" => "No podcast found" 'no_podcast' => 'No podcast found',
]; ];

View File

@ -1,8 +1,8 @@
<? <?
return [ return [
"create" => "Create a Podcast", 'create' => 'Create a Podcast',
"form" => [ 'form' => [
'title' => 'Title', 'title' => 'Title',
'name' => 'Name', 'name' => 'Name',
'description' => 'Description', 'description' => 'Description',
@ -138,4 +138,6 @@ return [
'film_reviews' => 'Film Reviews', 'film_reviews' => 'Film Reviews',
'tv_reviews' => 'TV Reviews', 'tv_reviews' => 'TV Reviews',
], ],
'list_of_episodes' => 'List of episodes',
'no_episode' => 'No episode found'
]; ];

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Models; namespace App\Models;
@ -9,9 +14,7 @@ class CategoryModel extends Model
protected $table = 'categories'; protected $table = 'categories';
protected $primaryKey = 'id'; protected $primaryKey = 'id';
protected $allowedFields = [ protected $allowedFields = ['apple_category', 'google_category'];
'apple_category', 'google_category',
];
protected $returnType = 'App\Entities\Category'; protected $returnType = 'App\Entities\Category';
protected $useSoftDeletes = false; protected $useSoftDeletes = false;

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Models; namespace App\Models;
@ -10,8 +15,9 @@ class EpisodeModel extends Model
protected $primaryKey = 'id'; protected $primaryKey = 'id';
protected $allowedFields = [ protected $allowedFields = [
'slug', 'podcast_id',
'title', 'title',
'slug',
'enclosure_url', 'enclosure_url',
'enclosure_length', 'enclosure_length',
'enclosure_type', 'enclosure_type',

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Models; namespace App\Models;
@ -9,9 +14,7 @@ class LanguageModel extends Model
protected $table = 'languages'; protected $table = 'languages';
protected $primaryKey = 'id'; protected $primaryKey = 'id';
protected $allowedFields = [ protected $allowedFields = ['code', 'native_name'];
'code', 'native_name'
];
protected $returnType = 'App\Entities\Language'; protected $returnType = 'App\Entities\Language';
protected $useSoftDeletes = false; protected $useSoftDeletes = false;

View File

@ -2,7 +2,7 @@
/** /**
* Class PlatformLinkModel * Class PlatformLinkModel
* Model for platform links table in database * Model for platform links table in database
* @author Benjamin Bellamy <ben@podlibre.org> *
* @copyright 2020 Podlibre * @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/ * @link https://castopod.org/

View File

@ -2,7 +2,7 @@
/** /**
* Class PlatformModel * Class PlatformModel
* Model for platforms table in database * Model for platforms table in database
* @author Benjamin Bellamy <ben@podlibre.org> *
* @copyright 2020 Podlibre * @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/ * @link https://castopod.org/

View File

@ -1,4 +1,9 @@
<?php <?php
/**
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace App\Models; namespace App\Models;
@ -10,6 +15,7 @@ class PodcastModel extends Model
protected $primaryKey = 'id'; protected $primaryKey = 'id';
protected $allowedFields = [ protected $allowedFields = [
'id',
'title', 'title',
'name', 'name',
'description', 'description',

View File

View File

@ -0,0 +1,92 @@
<?= $this->extend('layouts/default') ?>
<?= $this->section('content') ?>
<h1 class="mb-6 text-xl"><?= lang('Episodes.create') ?></h1>
<div class="mb-8">
<?= \Config\Services::validation()->listErrors() ?>
</div>
<?= form_open_multipart(route_to('episodes_create', '@' . $podcast->name), [
'method' => 'post',
'class' => 'flex flex-col max-w-md',
]) ?>
<?= csrf_field() ?>
<div class="flex flex-col mb-4">
<label for="episode_file"><?= lang('Episodes.form.file') ?></label>
<input type="file" class="form-input" id="episode_file" name="episode_file" required accept=".mp3,.m4a" />
</div>
<div class="flex flex-col mb-4">
<label for="title"><?= lang('Episodes.form.title') ?></label>
<input type="text" class="form-input" id="title" name="title" required />
</div>
<div class="flex flex-col mb-4">
<label for="slug"><?= lang('Episodes.form.slug') ?></label>
<input type="text" class="form-input" id="slug" name="slug" required />
</div>
<div class="flex flex-col mb-4">
<label for="description"><?= lang('Episodes.form.description') ?></label>
<textarea class="form-textarea" id="description" name="description" required></textarea>
</div>
<div class="flex flex-col mb-4">
<label for="pub_date"><?= lang('Episodes.form.pub_date') ?></label>
<input type="date" class="form-input" id="pub_date" name="pub_date" value="<?= date(
'Y-m-d'
) ?>" />
</div>
<div class="flex flex-col mb-4">
<label for="image"><?= lang('Episodes.form.image') ?></label>
<input type="file" class="form-input" id="image" name="image" accept=".jpg,.jpeg,.png" />
</div>
<div class="flex flex-col mb-4">
<label for="episode_number"><?= lang(
'Episodes.form.episode_number'
) ?></label>
<input type="number" class="form-input" id="episode_number" name="episode_number"
<?= $podcast->type == 'serial' ? 'required' : '' ?> />
</div>
<div class="flex flex-col mb-4">
<label for="season_number"><?= lang(
'Episodes.form.season_number'
) ?></label>
<input type="number" class="form-input" id="season_number" name="season_number" />
</div>
<div class="inline-flex items-center mb-4">
<input type="checkbox" id="explicit" name="explicit" class="form-checkbox" />
<label for="explicit" class="pl-2"><?= lang(
'Episodes.form.explicit'
) ?></label>
</div>
<fieldset class="flex flex-col mb-4">
<legend><?= lang('Episodes.form.type.label') ?></legend>
<?php foreach ($episode_types as $type): ?>
<label for="<?= $type ?>" class="inline-flex items-center">
<input type="radio" class="form-radio" value="<?= $type ?>" id="<?= $type ?>" name="type" required />
<span class="ml-2"><?= lang('Episodes.form.type.' . $type) ?></span>
</label>
<?php endforeach; ?>
</fieldset>
<div class="inline-flex items-center mb-4">
<input type="checkbox" id="block" name="block" class="form-checkbox" />
<label for="block" class="pl-2"><?= lang('Episodes.form.block') ?></label>
</div>
<button type="submit" name="submit" class="self-end px-4 py-2 bg-gray-200"><?= lang(
'Episodes.form.submit'
) ?></button>
<?= form_close() ?>
<?= $this->endSection() ?>

View File

@ -0,0 +1,16 @@
<?= $this->extend('layouts/default') ?>
<?= $this->section('content') ?>
<h1 class="text-xl"><?= $episode->title ?></h1>
<img src="<?= base_url(
$episode->image ? $episode->image : $podcast->image
) ?>" alt="Episode cover" class="object-cover w-40 h-40 mb-6" />
<audio controls>
<source src="<?= base_url(
$episode->enclosure_url
) ?>" type="<?= $episode->enclosure_type ?>">
Your browser does not support the audio tag.
</audio>
<?= $this->endSection() ?>

View File

@ -2,21 +2,23 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<h1 class="mb-2 text-xl"><?= lang("Home.all_podcasts") ?> (<?= count($podcasts) ?>)</h1> <h1 class="mb-2 text-xl"><?= lang('Home.all_podcasts') ?> (<?= count(
$podcasts
) ?>)</h1>
<section class="flex flex-wrap"> <section class="flex flex-wrap">
<?php if ($podcasts): ?> <?php if ($podcasts): ?>
<?php foreach ($podcasts as $podcast): ?> <?php foreach ($podcasts as $podcast): ?>
<a href="/@<?= $podcast->name ?>"> <a href="<?= route_to('podcasts_view', '@' . $podcast->name) ?>">
<article class="w-48 p-2 mb-4 mr-4 border shadow-sm hover:bg-gray-100 hover:shadow"> <article class="w-48 p-2 mb-4 mr-4 border shadow-sm hover:bg-gray-100 hover:shadow">
<img alt="<?= $podcast->title ?>" src="<?= $podcast->image ?>" class="object-cover w-full h-40 mb-2" /> <img alt="<?= $podcast->title ?>" src="<?= $podcast->image ?>" class="object-cover w-full h-40 mb-2" />
<h2 class="font-semibold leading-tight"><?= $podcast->title ?></h2> <h2 class="font-semibold leading-tight"><?= $podcast->title ?></h2>
<p class="text-gray-600">@<?= $podcast->name ?></p> <p class="text-gray-600">@<?= $podcast->name ?></p>
</article> </article>
</a> </a>
<?php endforeach ?> <?php endforeach; ?>
<?php else: ?> <?php else: ?>
<p class="italic"><?= lang("Home.no_podcast") ?></p> <p class="italic"><?= lang('Home.no_podcast') ?></p>
<?php endif ?> <?php endif; ?>
</section> </section>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -13,9 +13,11 @@
<body class="flex flex-col min-h-screen mx-auto"> <body class="flex flex-col min-h-screen mx-auto">
<header class="border-b"> <header class="border-b">
<div class="container flex items-center justify-between px-2 py-4 mx-auto"> <div class="container flex items-center justify-between px-2 py-4 mx-auto">
<a href="/" class="text-2xl">Castopod</a> <a href="<?= route_to('home') ?>" class="text-2xl">Castopod</a>
<nav> <nav>
<a class="px-4 py-2 border hover:bg-gray-100" href="/podcasts/create">New podcast</a> <a class="px-4 py-2 border hover:bg-gray-100" href="<?= route_to(
'podcasts_create'
) ?>">New podcast</a>
</nav> </nav>
</div> </div>
</header> </header>
@ -23,6 +25,6 @@
<?= $this->renderSection('content') ?> <?= $this->renderSection('content') ?>
</main> </main>
<footer class="container px-2 py-4 mx-auto text-sm text-right border-t"> <footer class="container px-2 py-4 mx-auto text-sm text-right border-t">
Powered by <a class="underline hover:no-underline" href="https://code.podlibre.org/podlibre/castopod">Castopod</a>, a <a class="underline hover:no-underline" href="https://podlibre.org/">Podlibre</a> initiative. Powered by <a class="underline hover:no-underline" href="https://castopod.org">Castopod</a>, a <a class="underline hover:no-underline" href="https://podlibre.org/">Podlibre</a> initiative.
</footer> </footer>
</body> </body>

View File

@ -2,108 +2,126 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<h1 class="mb-6 text-xl"><?= lang("Podcasts.create") ?></h1> <h1 class="mb-6 text-xl"><?= lang('Podcasts.create') ?></h1>
<!-- <div class="mb-8"> <div class="mb-8">
\Config\Services::validation()->listErrors() <?= \Config\Services::validation()->listErrors() ?>
</div> --> </div>
<?= form_open_multipart('podcasts/create', ["method" => "post", "class" => "flex flex-col max-w-md"]) ?> <?= form_open_multipart(base_url(route_to('podcasts_create')), [
'method' => 'post',
'class' => 'flex flex-col max-w-md',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="title"><?= lang("Podcasts.form.title") ?></label> <label for="title"><?= lang('Podcasts.form.title') ?></label>
<input type="text" class="form-input" id="title" name="title" required /> <input type="text" class="form-input" id="title" name="title" required />
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="name"><?= lang("Podcasts.form.name") ?></label> <label for="name"><?= lang('Podcasts.form.name') ?></label>
<input type="text" class="form-input" id="name" name="name" required /> <input type="text" class="form-input" id="name" name="name" required />
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="description"><?= lang("Podcasts.form.description") ?></label> <label for="description"><?= lang('Podcasts.form.description') ?></label>
<textarea class="form-textarea" id="description" name="description" required></textarea> <textarea class="form-textarea" id="description" name="description" required></textarea>
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="episode_description_footer"><?= lang("Podcasts.form.episode_description_footer") ?></label> <label for="episode_description_footer"><?= lang(
'Podcasts.form.episode_description_footer'
) ?></label>
<textarea class="form-textarea" id="episode_description_footer" name="episode_description_footer"></textarea> <textarea class="form-textarea" id="episode_description_footer" name="episode_description_footer"></textarea>
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="image"><?= lang("Podcasts.form.image") ?></label> <label for="image"><?= lang('Podcasts.form.image') ?></label>
<input type="file" class="form-input" id="image" name="image" required /> <input type="file" class="form-input" id="image" name="image" required />
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="language"><?= lang("Podcasts.form.language") ?></label> <label for="language"><?= lang('Podcasts.form.language') ?></label>
<select id="language" name="language" autocomplete="off" class="form-select" required> <select id="language" name="language" autocomplete="off" class="form-select" required>
<?php foreach ($languages as $language): ?> <?php foreach ($languages as $language): ?>
<option <?= ($language->code == $browser_lang) ? "selected='selected'" : "" ?> value="<?= $language->code ?>"><?= $language->native_name ?></option> <option <?= $language->code == $browser_lang
<?php endforeach ?> ? "selected='selected'"
: '' ?> value="<?= $language->code ?>"><?= $language->native_name ?></option>
<?php endforeach; ?>
</select> </select>
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="category"><?= lang("Podcasts.form.category") ?></label> <label for="category"><?= lang('Podcasts.form.category') ?></label>
<select id="category" name="category" class="form-select" required> <select id="category" name="category" class="form-select" required>
<?php foreach ($categories as $category): ?> <?php foreach ($categories as $category): ?>
<option value="<?= $category->code ?>"><?= lang("Podcasts.category_options." . $category->code) ?></option> <option value="<?= $category->code ?>"><?= lang(
<?php endforeach ?> 'Podcasts.category_options.' . $category->code
) ?></option>
<?php endforeach; ?>
</select> </select>
</div> </div>
<div class="inline-flex items-center mb-4"> <div class="inline-flex items-center mb-4">
<input type="checkbox" id="explicit" name="explicit" class="form-checkbox" /> <input type="checkbox" id="explicit" name="explicit" class="form-checkbox" />
<label for="explicit" class="pl-2"><?= lang("Podcasts.form.explicit") ?></label> <label for="explicit" class="pl-2"><?= lang(
'Podcasts.form.explicit'
) ?></label>
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="author"><?= lang("Podcasts.form.author") ?></label> <label for="author"><?= lang('Podcasts.form.author') ?></label>
<input type="text" class="form-input" id="author" name="author" /> <input type="text" class="form-input" id="author" name="author" />
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="owner_name"><?= lang("Podcasts.form.owner_name") ?></label> <label for="owner_name"><?= lang('Podcasts.form.owner_name') ?></label>
<input type="text" class="form-input" id="owner_name" name="owner_name" /> <input type="text" class="form-input" id="owner_name" name="owner_name" />
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="owner_email"><?= lang("Podcasts.form.owner_email") ?></label> <label for="owner_email"><?= lang('Podcasts.form.owner_email') ?></label>
<input type="email" class="form-input" id="owner_email" name="owner_email" required /> <input type="email" class="form-input" id="owner_email" name="owner_email" required />
</div> </div>
<fieldset class="mb-4"> <fieldset class="flex flex-col mb-4">
<legend><?= lang("Podcasts.form.type.label") ?></legend> <legend><?= lang('Podcasts.form.type.label') ?></legend>
<input type="radio" class="form-radio" value="episodic" id="episodic" name="type" checked="checked" /> <?php foreach ($podcast_types as $type): ?>
<label for="episodic"><?= lang("Podcasts.form.type.episodic") ?></label><br /> <label for="<?= $type ?>" class="inline-flex items-center">
<input type="radio" class="form-radio" value="<?= $type ?>" id="<?= $type ?>" name="type" required />
<input type="radio" class="form-radio" value="serial" id="serial" name="type" /> <span class="ml-2"><?= lang('Podcasts.form.type.' . $type) ?></span>
<label for="serial"><?= lang("Podcasts.form.type.serial") ?></label><br /> </label>
<?php endforeach; ?>
</fieldset> </fieldset>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="copyright"><?= lang("Podcasts.form.copyright") ?></label> <label for="copyright"><?= lang('Podcasts.form.copyright') ?></label>
<input type="text" class="form-input" id="copyright" name="copyright" /> <input type="text" class="form-input" id="copyright" name="copyright" />
</div> </div>
<div class="inline-flex items-center mb-4"> <div class="inline-flex items-center mb-4">
<input type="checkbox" id="block" name="block" class="form-checkbox" /> <input type="checkbox" id="block" name="block" class="form-checkbox" />
<label for="block" class="pl-2"><?= lang("Podcasts.form.block") ?></label> <label for="block" class="pl-2"><?= lang('Podcasts.form.block') ?></label>
</div> </div>
<div class="inline-flex items-center mb-4"> <div class="inline-flex items-center mb-4">
<input type="checkbox" id="complete" name="complete" class="form-checkbox" /> <input type="checkbox" id="complete" name="complete" class="form-checkbox" />
<label for="complete" class="pl-2"><?= lang("Podcasts.form.complete") ?></label> <label for="complete" class="pl-2"><?= lang(
'Podcasts.form.complete'
) ?></label>
</div> </div>
<div class="flex flex-col mb-4"> <div class="flex flex-col mb-4">
<label for="custom_html_head"><?= esc(lang("Podcasts.form.custom_html_head")) ?></label> <label for="custom_html_head"><?= esc(
lang('Podcasts.form.custom_html_head')
) ?></label>
<textarea class="form-textarea" id="custom_html_head" name="custom_html_head"></textarea> <textarea class="form-textarea" id="custom_html_head" name="custom_html_head"></textarea>
</div> </div>
<button type="submit" name="submit" class="self-end px-4 py-2 bg-gray-200"><?= lang("Podcasts.form.submit") ?></button> <button type="submit" name="submit" class="self-end px-4 py-2 bg-gray-200"><?= lang(
'Podcasts.form.submit'
) ?></button>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,7 +1,46 @@
<?= $this->extend('layouts/default') ?> <?= $this->extend('layouts/default') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<h1 class="text-xl"><?= $podcast->title ?></h1> <header class="py-4 border-b">
<img src="<?= base_url($podcast->image) ?>" alt="Podcast cover" /> <h1 class="text-2xl"><?= $podcast->title ?></h1>
<img src="<?= base_url(
$podcast->image
) ?>" alt="Podcast cover" class="w-40 h-40 mb-6" />
<a class="inline-flex px-4 py-2 border hover:bg-gray-100" href="<?= route_to(
'episodes_create',
'@' . $podcast->name
) ?>">New Episode</a>
</header>
<section class="flex flex-col py-4">
<h2 class="mb-4 text-xl"><?= lang(
'Podcasts.list_of_episodes'
) ?> (<?= count($episodes) ?>)</h2>
<?php if ($episodes): ?>
<?php foreach ($episodes as $episode): ?>
<article class="flex w-full max-w-lg p-4 mb-4 border shadow">
<img src="<?= base_url(
$episode->image ? $episode->image : $podcast->image
) ?>" alt="<?= $episode->title ?>" class="w-32 h-32 mr-4" />
<div class="flex flex-col flex-1">
<a href="<?= route_to(
'episodes_view',
'@' . $podcast->name,
$episode->slug
) ?>">
<h3 class="text-xl font-semibold underline hover:no-underline"><?= $episode->title ?></h3>
</a>
<audio controls class="mt-auto">
<source src="<?= $episode->enclosure_url ?>" type="<?= $episode->enclosure_type ?>">
Your browser does not support the audio tag.
</audio>
</div>
</article>
<?php endforeach; ?>
<?php else: ?>
<p class="italic"><?= lang('Podcasts.no_episode') ?></p>
<?php endif; ?>
</section>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,14 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>403 Forbidden</title> <title>403 Forbidden</title>
</head> </head>
<body> <body>
<p>Directory access is forbidden.</p> <p>Directory access is forbidden.</p>
</body> </body>
</html> </html>

102
builds
View File

@ -1,6 +1,5 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
define('LATEST_RELEASE', '^4.0'); define('LATEST_RELEASE', '^4.0');
define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4'); define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4');
@ -15,10 +14,9 @@ define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4');
*/ */
// Determine the requested stability // Determine the requested stability
if (empty($argv[1]) || ! in_array($argv[1], ['release', 'development'])) if (empty($argv[1]) || !in_array($argv[1], ['release', 'development'])) {
{
echo 'Usage: php builds [release|development]' . PHP_EOL; echo 'Usage: php builds [release|development]' . PHP_EOL;
exit; exit();
} }
$dev = $argv[1] == 'development'; $dev = $argv[1] == 'development';
@ -29,40 +27,32 @@ $modified = [];
// Composer.json // Composer.json
$file = __DIR__ . DIRECTORY_SEPARATOR . 'composer.json'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'composer.json';
if (is_file($file)) if (is_file($file)) {
{
// Make sure we can read it // Make sure we can read it
if ($contents = file_get_contents($file)) if ($contents = file_get_contents($file)) {
{ if ($array = json_decode($contents, true)) {
if ($array = json_decode($contents, true))
{
// Development // Development
if ($dev) if ($dev) {
{
// Set 'minimum-stability' // Set 'minimum-stability'
$array['minimum-stability'] = 'dev'; $array['minimum-stability'] = 'dev';
$array['prefer-stable'] = true; $array['prefer-stable'] = true;
// Make sure the repo is configured // Make sure the repo is configured
if (! isset($array['repositories'])) if (!isset($array['repositories'])) {
{
$array['repositories'] = []; $array['repositories'] = [];
} }
// Check for the CodeIgniter repo // Check for the CodeIgniter repo
$found = false; $found = false;
foreach ($array['repositories'] as $repository) foreach ($array['repositories'] as $repository) {
{ if ($repository['url'] == GITHUB_URL) {
if ($repository['url'] == GITHUB_URL)
{
$found = true; $found = true;
break; break;
} }
} }
// Add the repo if it was not found // Add the repo if it was not found
if (! $found) if (!$found) {
{
$array['repositories'][] = [ $array['repositories'][] = [
'type' => 'vcs', 'type' => 'vcs',
'url' => GITHUB_URL, 'url' => GITHUB_URL,
@ -75,25 +65,20 @@ if (is_file($file))
} }
// Release // Release
else else {
{
// Clear 'minimum-stability' // Clear 'minimum-stability'
unset($array['minimum-stability']); unset($array['minimum-stability']);
// If the repo is configured then clear it // If the repo is configured then clear it
if (isset($array['repositories'])) if (isset($array['repositories'])) {
{
// Check for the CodeIgniter repo // Check for the CodeIgniter repo
foreach ($array['repositories'] as $i => $repository) foreach ($array['repositories'] as $i => $repository) {
{ if ($repository['url'] == GITHUB_URL) {
if ($repository['url'] == GITHUB_URL)
{
unset($array['repositories'][$i]); unset($array['repositories'][$i]);
break; break;
} }
} }
if (empty($array['repositories'])) if (empty($array['repositories'])) {
{
unset($array['repositories']); unset($array['repositories']);
} }
} }
@ -104,16 +89,19 @@ if (is_file($file))
} }
// Write out a new composer.json // Write out a new composer.json
file_put_contents($file, json_encode($array, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) . PHP_EOL); file_put_contents(
$file,
json_encode(
$array,
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
) . PHP_EOL
);
$modified[] = $file; $modified[] = $file;
} else {
echo 'Warning: Unable to decode composer.json! Skipping...' .
PHP_EOL;
} }
else } else {
{
echo 'Warning: Unable to decode composer.json! Skipping...' . PHP_EOL;
}
}
else
{
echo 'Warning: Unable to read composer.json! Skipping...' . PHP_EOL; echo 'Warning: Unable to read composer.json! Skipping...' . PHP_EOL;
} }
} }
@ -125,22 +113,26 @@ $files = [
__DIR__ . DIRECTORY_SEPARATOR . 'phpunit.xml', __DIR__ . DIRECTORY_SEPARATOR . 'phpunit.xml',
]; ];
foreach ($files as $file) foreach ($files as $file) {
{ if (is_file($file)) {
if (is_file($file))
{
$contents = file_get_contents($file); $contents = file_get_contents($file);
// Development // Development
if ($dev) if ($dev) {
{ $contents = str_replace(
$contents = str_replace('vendor/codeigniter4/framework', 'vendor/codeigniter4/codeigniter4', $contents); 'vendor/codeigniter4/framework',
'vendor/codeigniter4/codeigniter4',
$contents
);
} }
// Release // Release
else else {
{ $contents = str_replace(
$contents = str_replace('vendor/codeigniter4/codeigniter4', 'vendor/codeigniter4/framework', $contents); 'vendor/codeigniter4/codeigniter4',
'vendor/codeigniter4/framework',
$contents
);
} }
file_put_contents($file, $contents); file_put_contents($file, $contents);
@ -148,16 +140,14 @@ foreach ($files as $file)
} }
} }
if (empty($modified)) if (empty($modified)) {
{
echo 'No files modified' . PHP_EOL; echo 'No files modified' . PHP_EOL;
} } else {
else
{
echo 'The following files were modified:' . PHP_EOL; echo 'The following files were modified:' . PHP_EOL;
foreach ($modified as $file) foreach ($modified as $file) {
{
echo " * {$file}" . PHP_EOL; echo " * {$file}" . PHP_EOL;
} }
echo 'Run `composer update` to sync changes with your vendor folder' . PHP_EOL; echo 'Run `composer update` to sync changes with your vendor folder' .
PHP_EOL;
} }

View File

@ -1 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] } module.exports = { extends: ["@commitlint/config-conventional"] };

View File

@ -1,12 +1,13 @@
{ {
"name": "codeigniter4/appstarter", "name": "podlibre/castopod",
"type": "project", "type": "project",
"description": "CodeIgniter4 starter app", "description": "Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience.",
"homepage": "https://codeigniter.com", "homepage": "https://castopod.org",
"license": "MIT", "license": "AGPL-3.0-or-later",
"require": { "require": {
"php": ">=7.2", "php": ">=7.2",
"codeigniter4/framework": "^4" "codeigniter4/framework": "^4",
"james-heinrich/getid3": "~2.0.0-dev"
}, },
"require-dev": { "require-dev": {
"mikey179/vfsstream": "1.6.*", "mikey179/vfsstream": "1.6.*",

87
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "8c49469ea6df972381be63807c7e127d", "content-hash": "a524161e65f809ee6dcfd5f842f4031c",
"packages": [ "packages": [
{ {
"name": "codeigniter4/framework", "name": "codeigniter4/framework",
@ -50,6 +50,87 @@
"homepage": "https://codeigniter.com", "homepage": "https://codeigniter.com",
"time": "2020-05-01T05:01:20+00:00" "time": "2020-05-01T05:01:20+00:00"
}, },
{
"name": "james-heinrich/getid3",
"version": "2.0.x-dev",
"source": {
"type": "git",
"url": "https://github.com/JamesHeinrich/getID3.git",
"reference": "8cf765ec4c42ed732993a9aa60b638ee398df154"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/8cf765ec4c42ed732993a9aa60b638ee398df154",
"reference": "8cf765ec4c42ed732993a9aa60b638ee398df154",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9 || ^1.0",
"phpunit/phpunit": "^4.8|^5.0"
},
"suggest": {
"ext-SimpleXML": "SimpleXML extension is required to analyze RIFF/WAV/BWF audio files (also requires `ext-libxml`).",
"ext-com_dotnet": "COM extension is required when loading files larger than 2GB on Windows.",
"ext-ctype": "ctype extension is required when loading files larger than 2GB on 32-bit PHP (also on 64-bit PHP on Windows) or executing `getid3_lib::CopyTagsToComments`.",
"ext-dba": "DBA extension is required to use the DBA database as a cache storage.",
"ext-exif": "EXIF extension is required for graphic modules.",
"ext-iconv": "iconv extension is required to work with different character sets (when `ext-mbstring` is not available).",
"ext-json": "JSON extension is required to analyze Apple Quicktime videos.",
"ext-libxml": "libxml extension is required to analyze RIFF/WAV/BWF audio files.",
"ext-mbstring": "mbstring extension is required to work with different character sets.",
"ext-mysql": "MySQL extension is required to use the MySQL database as a cache storage (deprecated in PHP 5.5, removed in PHP >= 7.0, use `ext-mysqli` instead).",
"ext-mysqli": "MySQLi extension is required to use the MySQL database as a cache storage.",
"ext-rar": "RAR extension is required for RAR archive module.",
"ext-sqlite3": "SQLite3 extension is required to use the SQLite3 database as a cache storage.",
"ext-xml": "XML extension is required for graphic modules to analyze the XML metadata.",
"ext-zlib": "Zlib extension is required for archive modules and compressed metadata."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"JamesHeinrich\\GetID3\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-1.0-or-later",
"LGPL-3.0-only",
"MPL-2.0"
],
"authors": [
{
"name": "James Heinrich",
"email": "info@getid3.org",
"homepage": "https://github.com/JamesHeinrich",
"role": "Developer"
},
{
"name": "Craig Duncan",
"email": "git@duncanc.co.uk",
"homepage": "https://github.com/duncan3dc",
"role": "Developer"
}
],
"description": "Extract and write useful information to/from popular multimedia file formats",
"homepage": "https://www.getid3.org/",
"keywords": [
"audio",
"codecs",
"id3",
"metadata",
"tags",
"video"
],
"time": "2019-07-22T12:33:16+00:00"
},
{ {
"name": "kint-php/kint", "name": "kint-php/kint",
"version": "3.3", "version": "3.3",
@ -1876,7 +1957,9 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": {
"james-heinrich/getid3": 20
},
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {

627
package-lock.json generated
View File

@ -410,6 +410,17 @@
"fastq": "^1.6.0" "fastq": "^1.6.0"
} }
}, },
"@prettier/plugin-php": {
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/@prettier/plugin-php/-/plugin-php-0.14.2.tgz",
"integrity": "sha512-sG713Vb/eKtlB4rsL1+7mDD85jC2cjop8z/LE2QZHBtbopemfa4okEha01fgCqMaLJ80NBwGP9SZIwY9MR/w6w==",
"dev": true,
"requires": {
"linguist-languages": "^7.5.1",
"mem": "^6.0.1",
"php-parser": "github:glayzzle/php-parser#5a0e2e1bf12517bd1c544c0f4e68482d0362a7b5"
}
},
"@tailwindcss/custom-forms": { "@tailwindcss/custom-forms": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/@tailwindcss/custom-forms/-/custom-forms-0.2.1.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/custom-forms/-/custom-forms-0.2.1.tgz",
@ -478,6 +489,22 @@
"integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==",
"dev": true "dev": true
}, },
"aggregate-error": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz",
"integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==",
"dev": true,
"requires": {
"clean-stack": "^2.0.0",
"indent-string": "^4.0.0"
}
},
"ansi-colors": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
"integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==",
"dev": true
},
"ansi-escapes": { "ansi-escapes": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
@ -572,6 +599,12 @@
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
"dev": true "dev": true
}, },
"astral-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"at-least-node": { "at-least-node": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
@ -987,6 +1020,12 @@
} }
} }
}, },
"clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"dev": true
},
"cli-cursor": { "cli-cursor": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
@ -996,6 +1035,50 @@
"restore-cursor": "^2.0.0" "restore-cursor": "^2.0.0"
} }
}, },
"cli-truncate": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
"integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
"dev": true,
"requires": {
"slice-ansi": "^3.0.0",
"string-width": "^4.2.0"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
}
}
},
"cli-width": { "cli-width": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
@ -1259,6 +1342,28 @@
"parse-json": "^4.0.0" "parse-json": "^4.0.0"
} }
}, },
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"dependencies": {
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"css-unit-converter": { "css-unit-converter": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz", "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz",
@ -1465,6 +1570,24 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true "dev": true
}, },
"end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": {
"once": "^1.4.0"
}
},
"enquirer": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz",
"integrity": "sha512-BNT1C08P9XD0vNg3J475yIUG+mVdp9T6towYFHUv897X0KoHBjB1shyrNmhmtHWKP17iSWgo7Gqh7BBuzLZMSA==",
"dev": true,
"requires": {
"ansi-colors": "^3.2.1"
}
},
"error-ex": { "error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@ -1494,6 +1617,40 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true "dev": true
}, },
"execa": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.0.2.tgz",
"integrity": "sha512-QI2zLa6CjGWdiQsmSkZoGtDx2N+cQIGb3yNolGTdjSQzydzLgYYf8LRuagp7S7fPimjcrzUDSUFd/MgzELMi4Q==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
},
"dependencies": {
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true
},
"onetime": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
"integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
"dev": true,
"requires": {
"mimic-fn": "^2.1.0"
}
}
}
},
"expand-brackets": { "expand-brackets": {
"version": "2.1.4", "version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@ -1827,12 +1984,27 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true "dev": true
}, },
"get-own-enumerable-property-symbols": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
"dev": true
},
"get-stdin": { "get-stdin": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz",
"integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==",
"dev": true "dev": true
}, },
"get-stream": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
"integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
"dev": true,
"requires": {
"pump": "^3.0.0"
}
},
"get-value": { "get-value": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@ -2010,6 +2182,12 @@
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true "dev": true
}, },
"human-signals": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
"dev": true
},
"husky": { "husky": {
"version": "4.2.5", "version": "4.2.5",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz", "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz",
@ -2336,6 +2514,18 @@
"isobject": "^3.0.1" "isobject": "^3.0.1"
} }
}, },
"is-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
"integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
"dev": true
},
"is-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
"integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
"dev": true
},
"is-text-path": { "is-text-path": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
@ -2424,6 +2614,172 @@
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true "dev": true
}, },
"linguist-languages": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.9.0.tgz",
"integrity": "sha512-saKTpS7BH8vOOwzrZNTkFL/DuT2JN7cg6oHWY8nAjt89+pV1qFcpbjEEcZdAv9ogc4DcxVFHkXmjeyU/DiFHQw==",
"dev": true
},
"lint-staged": {
"version": "10.2.9",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.9.tgz",
"integrity": "sha512-ziRAuXEqvJLSXg43ezBpHxRW8FOJCXISaXU//BWrxRrp5cBdRkIx7g5IsB3OI45xYGE0S6cOacfekSjDyDKF2g==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"cli-truncate": "2.1.0",
"commander": "^5.1.0",
"cosmiconfig": "^6.0.0",
"debug": "^4.1.1",
"dedent": "^0.7.0",
"enquirer": "^2.3.5",
"execa": "^4.0.1",
"listr2": "^2.1.0",
"log-symbols": "^4.0.0",
"micromatch": "^4.0.2",
"normalize-path": "^3.0.0",
"please-upgrade-node": "^3.2.0",
"string-argv": "0.3.1",
"stringify-object": "^3.3.0"
},
"dependencies": {
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
}
},
"cosmiconfig": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
"integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
"dev": true,
"requires": {
"@types/parse-json": "^4.0.0",
"import-fresh": "^3.1.0",
"parse-json": "^5.0.0",
"path-type": "^4.0.0",
"yaml": "^1.7.2"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
}
},
"import-fresh": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
"integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
"log-symbols": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
"integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
"dev": true,
"requires": {
"chalk": "^4.0.0"
}
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"dev": true,
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"parse-json": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
"integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1",
"lines-and-columns": "^1.1.6"
}
},
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
"is-number": "^7.0.0"
}
}
}
},
"listr2": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/listr2/-/listr2-2.1.3.tgz",
"integrity": "sha512-6oy3QhrZAlJGrG8oPcRp1hix1zUpb5AvyvZ5je979HCyf48tIj3Hn1TG5+rfyhz30t7HfySH/OIaVbwrI2kruA==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"cli-truncate": "^2.1.0",
"figures": "^3.2.0",
"indent-string": "^4.0.0",
"log-update": "^4.0.0",
"p-map": "^4.0.0",
"rxjs": "^6.5.5",
"through": "^2.3.8"
},
"dependencies": {
"figures": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
"integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
}
}
}
},
"load-json-file": { "load-json-file": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
@ -2524,6 +2880,111 @@
} }
} }
}, },
"log-update": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz",
"integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==",
"dev": true,
"requires": {
"ansi-escapes": "^4.3.0",
"cli-cursor": "^3.1.0",
"slice-ansi": "^4.0.0",
"wrap-ansi": "^6.2.0"
},
"dependencies": {
"ansi-escapes": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"dev": true,
"requires": {
"type-fest": "^0.11.0"
}
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"cli-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
"restore-cursor": "^3.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true
},
"onetime": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
"integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
"dev": true,
"requires": {
"mimic-fn": "^2.1.0"
}
},
"restore-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
}
},
"slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
"integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
}
},
"type-fest": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
"dev": true
}
}
},
"longest": { "longest": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz",
@ -2540,6 +3001,15 @@
"signal-exit": "^3.0.0" "signal-exit": "^3.0.0"
} }
}, },
"map-age-cleaner": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
"dev": true,
"requires": {
"p-defer": "^1.0.0"
}
},
"map-cache": { "map-cache": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
@ -2561,6 +3031,24 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"mem": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-6.1.0.tgz",
"integrity": "sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==",
"dev": true,
"requires": {
"map-age-cleaner": "^0.1.3",
"mimic-fn": "^3.0.0"
},
"dependencies": {
"mimic-fn": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.0.0.tgz",
"integrity": "sha512-PiVO95TKvhiwgSwg1IdLYlCTdul38yZxZMIcnDSFIBUm4BNZha2qpQ4GpJ++15bHoKDtrW2D69lMfFwdFYtNZQ==",
"dev": true
}
}
},
"meow": { "meow": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
@ -2753,6 +3241,12 @@
"integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==",
"dev": true "dev": true
}, },
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"dev": true
},
"merge2": { "merge2": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@ -2946,6 +3440,15 @@
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==", "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==",
"dev": true "dev": true
}, },
"npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
"integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
"dev": true,
"requires": {
"path-key": "^3.0.0"
}
},
"num2fraction": { "num2fraction": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
@ -3037,6 +3540,12 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true "dev": true
}, },
"p-defer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
"dev": true
},
"p-limit": { "p-limit": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@ -3055,6 +3564,15 @@
"p-limit": "^2.2.0" "p-limit": "^2.2.0"
} }
}, },
"p-map": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
"requires": {
"aggregate-error": "^3.0.0"
}
},
"p-try": { "p-try": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
@ -3112,6 +3630,12 @@
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true "dev": true
}, },
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"path-parse": { "path-parse": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
@ -3124,6 +3648,11 @@
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true "dev": true
}, },
"php-parser": {
"version": "github:glayzzle/php-parser#5a0e2e1bf12517bd1c544c0f4e68482d0362a7b5",
"from": "github:glayzzle/php-parser#5a0e2e1bf12517bd1c544c0f4e68482d0362a7b5",
"dev": true
},
"picomatch": { "picomatch": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
@ -3491,6 +4020,12 @@
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
"dev": true "dev": true
}, },
"prettier": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
"integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
"dev": true
},
"pretty-hrtime": { "pretty-hrtime": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
@ -3503,6 +4038,16 @@
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
"dev": true "dev": true
}, },
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"purgecss": { "purgecss": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.2.1.tgz", "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.2.1.tgz",
@ -3889,6 +4434,21 @@
} }
} }
}, },
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
"shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"signal-exit": { "signal-exit": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
@ -3910,6 +4470,50 @@
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true "dev": true
}, },
"slice-ansi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
"integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
}
}
},
"snapdragon": { "snapdragon": {
"version": "0.8.2", "version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@ -4131,6 +4735,12 @@
} }
} }
}, },
"string-argv": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
"integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
"dev": true
},
"string-width": { "string-width": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@ -4161,6 +4771,17 @@
"safe-buffer": "~5.1.0" "safe-buffer": "~5.1.0"
} }
}, },
"stringify-object": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
"integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
"dev": true,
"requires": {
"get-own-enumerable-property-symbols": "^3.0.0",
"is-obj": "^1.0.1",
"is-regexp": "^1.0.0"
}
},
"strip-ansi": { "strip-ansi": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@ -4184,6 +4805,12 @@
"integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
"dev": true "dev": true
}, },
"strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true
},
"strip-indent": { "strip-indent": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",

View File

@ -16,17 +16,24 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^8.3.5", "@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4", "@commitlint/config-conventional": "^8.3.4",
"@prettier/plugin-php": "^0.14.2",
"@tailwindcss/custom-forms": "^0.2.1", "@tailwindcss/custom-forms": "^0.2.1",
"cz-conventional-changelog": "^3.2.0", "cz-conventional-changelog": "^3.2.0",
"husky": "^4.2.5", "husky": "^4.2.5",
"lint-staged": "^10.2.9",
"postcss-cli": "^7.1.1", "postcss-cli": "^7.1.1",
"prettier": "2.0.5",
"tailwindcss": "^1.4.6" "tailwindcss": "^1.4.6"
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
} }
}, },
"lint-staged": {
"*.{js,css,md,php}": "prettier --write"
},
"config": { "config": {
"commitizen": { "commitizen": {
"path": "cz-conventional-changelog" "path": "cz-conventional-changelog"

View File

@ -1,6 +1,3 @@
module.exports = { module.exports = {
plugins: [ plugins: [require("tailwindcss"), require("autoprefixer")],
require('tailwindcss'), };
require('autoprefixer'),
]
}

View File

@ -2,9 +2,11 @@
// Valid PHP Version? // Valid PHP Version?
$minPHPVersion = '7.2'; $minPHPVersion = '7.2';
if (phpversion() < $minPHPVersion) if (phpversion() < $minPHPVersion) {
{ die(
die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion()); "Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " .
phpversion()
);
} }
unset($minPHPVersion); unset($minPHPVersion);

12
spark
View File

@ -1,6 +1,5 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
/* /*
* -------------------------------------------------------------------- * --------------------------------------------------------------------
* CodeIgniter command-line tools * CodeIgniter command-line tools
@ -24,9 +23,10 @@ define('SPARKED', true);
*/ */
// Refuse to run when called from php-cgi // Refuse to run when called from php-cgi
if (substr(php_sapi_name(), 0, 3) === 'cgi') if (substr(php_sapi_name(), 0, 3) === 'cgi') {
{ die(
die("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"); "The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"
);
} }
// Path to the front controller // Path to the front controller
@ -55,7 +55,7 @@ $console->showHeader();
// fire off the command in the main framework. // fire off the command in the main framework.
$response = $console->run(); $response = $console->run();
if ($response->getStatusCode() >= 300) if ($response->getStatusCode() >= 300) {
{
exit($response->getStatusCode()); exit($response->getStatusCode());
} }

View File

@ -4,5 +4,5 @@ module.exports = {
extend: {}, extend: {},
}, },
variants: {}, variants: {},
plugins: [require('@tailwindcss/custom-forms')], plugins: [require("@tailwindcss/custom-forms")],
} };