style: update ecs config to align associative arrays arrows

update composer dependencies to latest
This commit is contained in:
Yassine Doghri 2023-06-12 14:47:38 +00:00
parent 3fc1d8e18d
commit 2a50f6e4d2
268 changed files with 3833 additions and 3973 deletions

View File

@ -424,7 +424,7 @@ class App extends BaseConfig
*/
public array $siteIcon = [
'ico' => '/favicon.ico',
'64' => '/icon-64.png',
'64' => '/icon-64.png',
'180' => '/icon-180.png',
'192' => '/icon-192.png',
'512' => '/icon-512.png',

View File

@ -42,24 +42,24 @@ class Autoload extends AutoloadConfig
* @var array<string, string>
*/
public $psr4 = [
APP_NAMESPACE => APPPATH,
'Modules' => ROOTPATH . 'modules/',
'Modules\Admin' => ROOTPATH . 'modules/Admin/',
'Modules\Auth' => ROOTPATH . 'modules/Auth/',
'Modules\Analytics' => ROOTPATH . 'modules/Analytics/',
'Modules\Install' => ROOTPATH . 'modules/Install/',
'Modules\Update' => ROOTPATH . 'modules/Update/',
'Modules\Fediverse' => ROOTPATH . 'modules/Fediverse/',
'Modules\Media' => ROOTPATH . 'modules/Media/',
'Modules\WebSub' => ROOTPATH . 'modules/WebSub/',
'Modules\Api\Rest\V1' => ROOTPATH . 'modules/Api/Rest/V1',
APP_NAMESPACE => APPPATH,
'Modules' => ROOTPATH . 'modules/',
'Modules\Admin' => ROOTPATH . 'modules/Admin/',
'Modules\Auth' => ROOTPATH . 'modules/Auth/',
'Modules\Analytics' => ROOTPATH . 'modules/Analytics/',
'Modules\Install' => ROOTPATH . 'modules/Install/',
'Modules\Update' => ROOTPATH . 'modules/Update/',
'Modules\Fediverse' => ROOTPATH . 'modules/Fediverse/',
'Modules\Media' => ROOTPATH . 'modules/Media/',
'Modules\WebSub' => ROOTPATH . 'modules/WebSub/',
'Modules\Api\Rest\V1' => ROOTPATH . 'modules/Api/Rest/V1',
'Modules\PremiumPodcasts' => ROOTPATH . 'modules/PremiumPodcasts/',
'Config' => APPPATH . 'Config/',
'ViewComponents' => APPPATH . 'Libraries/ViewComponents/',
'ViewThemes' => APPPATH . 'Libraries/ViewThemes/',
'MediaClipper' => APPPATH . 'Libraries/MediaClipper/',
'Vite' => APPPATH . 'Libraries/Vite/',
'Themes' => ROOTPATH . 'themes',
'Config' => APPPATH . 'Config/',
'ViewComponents' => APPPATH . 'Libraries/ViewComponents/',
'ViewThemes' => APPPATH . 'Libraries/ViewThemes/',
'MediaClipper' => APPPATH . 'Libraries/MediaClipper/',
'Vite' => APPPATH . 'Libraries/Vite/',
'Themes' => ROOTPATH . 'themes',
];
/**

View File

@ -112,7 +112,7 @@ class Cache extends BaseConfig
*/
public array $file = [
'storePath' => WRITEPATH . 'cache/',
'mode' => 0640,
'mode' => 0640,
];
/**
@ -127,10 +127,10 @@ class Cache extends BaseConfig
* @var array<string, string|int|boolean>
*/
public array $memcached = [
'host' => '127.0.0.1',
'port' => 11211,
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 1,
'raw' => false,
'raw' => false,
];
/**
@ -143,10 +143,10 @@ class Cache extends BaseConfig
* @var array<string, string|int|null>
*/
public array $redis = [
'host' => '127.0.0.1',
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
'timeout' => 0,
'port' => 6379,
'timeout' => 0,
'database' => 0,
];
@ -161,11 +161,11 @@ class Cache extends BaseConfig
* @var array<string, string>
*/
public array $validHandlers = [
'dummy' => DummyHandler::class,
'file' => FileHandler::class,
'dummy' => DummyHandler::class,
'file' => FileHandler::class,
'memcached' => MemcachedHandler::class,
'predis' => PredisHandler::class,
'redis' => RedisHandler::class,
'wincache' => WincacheHandler::class,
'predis' => PredisHandler::class,
'redis' => RedisHandler::class,
'wincache' => WincacheHandler::class,
];
}

View File

@ -14,136 +14,136 @@ class Colors extends BaseConfig
public array $themes = [
/* Castopod's brand color */
'pine' => [
'accent-base' => [174, 100, 29],
'accent-hover' => [172, 100, 17],
'accent-muted' => [131, 100, 12],
'accent-base' => [174, 100, 29],
'accent-hover' => [172, 100, 17],
'accent-muted' => [131, 100, 12],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [172, 100, 17],
'heading-background' => [111, 64, 94],
'background-elevated' => [0, 0, 100],
'background-base' => [173, 44, 96],
'background-elevated' => [0, 0, 100],
'background-base' => [173, 44, 96],
'background-navigation' => [172, 100, 17],
'background-header' => [172, 100, 17],
'background-highlight' => [111, 64, 94],
'background-backdrop' => [0, 0, 50],
'background-header' => [172, 100, 17],
'background-highlight' => [111, 64, 94],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [111, 42, 86],
'border-contrast' => [0, 0, 0],
'border-subtle' => [111, 42, 86],
'border-contrast' => [0, 0, 0],
'border-navigation' => [131, 100, 12],
'text-base' => [158, 8, 3],
'text-base' => [158, 8, 3],
'text-muted' => [172, 8, 38],
],
/* Red / Rose color */
'crimson' => [
'accent-base' => [350, 87, 61],
'accent-hover' => [348, 75, 40],
'accent-muted' => [348, 73, 32],
'accent-base' => [350, 87, 61],
'accent-hover' => [348, 75, 40],
'accent-muted' => [348, 73, 32],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [348, 73, 32],
'heading-background' => [344, 79, 96],
'background-elevated' => [0, 0, 100],
'background-base' => [350, 44, 96],
'background-header' => [348, 75, 40],
'background-elevated' => [0, 0, 100],
'background-base' => [350, 44, 96],
'background-header' => [348, 75, 40],
'background-highlight' => [344, 79, 96],
'background-backdrop' => [0, 0, 50],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [348, 42, 86],
'border-subtle' => [348, 42, 86],
'border-contrast' => [0, 0, 0],
'text-base' => [340, 8, 3],
'text-base' => [340, 8, 3],
'text-muted' => [345, 8, 38],
],
/* Blue color */
'lake' => [
'accent-base' => [194, 100, 44],
'accent-hover' => [194, 100, 22],
'accent-muted' => [195, 100, 11],
'accent-base' => [194, 100, 44],
'accent-hover' => [194, 100, 22],
'accent-muted' => [195, 100, 11],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [194, 100, 22],
'heading-background' => [195, 100, 92],
'background-elevated' => [0, 0, 100],
'background-base' => [196, 44, 96],
'background-header' => [194, 100, 22],
'background-elevated' => [0, 0, 100],
'background-base' => [196, 44, 96],
'background-header' => [194, 100, 22],
'background-highlight' => [195, 100, 92],
'background-backdrop' => [0, 0, 50],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [195, 42, 86],
'border-subtle' => [195, 42, 86],
'border-contrast' => [0, 0, 0],
'text-base' => [194, 8, 3],
'text-base' => [194, 8, 3],
'text-muted' => [195, 8, 38],
],
/* Orange color */
'amber' => [
'accent-base' => [17, 100, 57],
'accent-hover' => [17, 100, 35],
'accent-muted' => [17, 100, 24],
'accent-base' => [17, 100, 57],
'accent-hover' => [17, 100, 35],
'accent-muted' => [17, 100, 24],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [17, 100, 35],
'heading-background' => [17, 100, 89],
'background-elevated' => [0, 0, 100],
'background-base' => [15, 44, 96],
'background-header' => [17, 100, 35],
'background-elevated' => [0, 0, 100],
'background-base' => [15, 44, 96],
'background-header' => [17, 100, 35],
'background-highlight' => [17, 100, 89],
'background-backdrop' => [0, 0, 50],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [17, 42, 86],
'border-subtle' => [17, 42, 86],
'border-contrast' => [0, 0, 0],
'text-base' => [15, 8, 3],
'text-base' => [15, 8, 3],
'text-muted' => [17, 8, 38],
],
/* Violet color */
'jacaranda' => [
'accent-base' => [254, 72, 52],
'accent-hover' => [254, 73, 30],
'accent-muted' => [254, 71, 19],
'accent-base' => [254, 72, 52],
'accent-hover' => [254, 73, 30],
'accent-muted' => [254, 71, 19],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [254, 73, 30],
'heading-background' => [254, 73, 84],
'background-elevated' => [0, 0, 100],
'background-base' => [253, 44, 96],
'background-header' => [254, 73, 30],
'background-elevated' => [0, 0, 100],
'background-base' => [253, 44, 96],
'background-header' => [254, 73, 30],
'background-highlight' => [254, 88, 91],
'background-backdrop' => [0, 0, 50],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [254, 42, 86],
'border-subtle' => [254, 42, 86],
'border-contrast' => [0, 0, 0],
'text-base' => [253, 8, 3],
'text-base' => [253, 8, 3],
'text-muted' => [254, 8, 38],
],
/* Black color */
'onyx' => [
'accent-base' => [240, 17, 2],
'accent-hover' => [240, 17, 17],
'accent-muted' => [240, 17, 17],
'accent-base' => [240, 17, 2],
'accent-hover' => [240, 17, 17],
'accent-muted' => [240, 17, 17],
'accent-contrast' => [0, 0, 100],
'heading-foreground' => [240, 17, 17],
'heading-background' => [240, 17, 94],
'background-elevated' => [0, 0, 100],
'background-base' => [240, 17, 96],
'background-header' => [240, 12, 17],
'background-elevated' => [0, 0, 100],
'background-base' => [240, 17, 96],
'background-header' => [240, 12, 17],
'background-highlight' => [240, 17, 94],
'background-backdrop' => [0, 0, 50],
'background-backdrop' => [0, 0, 50],
'border-subtle' => [240, 17, 86],
'border-subtle' => [240, 17, 86],
'border-contrast' => [0, 0, 0],
'text-base' => [240, 8, 3],
'text-base' => [240, 8, 3],
'text-muted' => [240, 8, 38],
],
];

View File

@ -27,7 +27,7 @@ class Database extends Config
* @var array<string, mixed>
*/
public array $default = [
'DSN' => '',
'DSN' => '',
'hostname' => 'localhost',
'username' => '',
'password' => '',
@ -35,15 +35,15 @@ class Database extends Config
'DBDriver' => 'MySQLi',
'DBPrefix' => 'cp_',
'pConnect' => false,
'DBDebug' => ENVIRONMENT !== 'production',
'charset' => 'utf8mb4',
'DBDebug' => ENVIRONMENT !== 'production',
'charset' => 'utf8mb4',
'DBCollat' => 'utf8mb4_unicode_ci',
'swapPre' => '',
'encrypt' => false,
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'port' => 3306,
];
/**
@ -52,7 +52,7 @@ class Database extends Config
* @var array<string, mixed>
*/
public array $tests = [
'DSN' => '',
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => '',
'password' => '',
@ -60,16 +60,16 @@ class Database extends Config
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_',
// Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'foreignKeys' => true,
];

View File

@ -12,42 +12,24 @@ class DocTypes
* @var array<string, string>
*/
public array $list = [
'xhtml11' =>
'<!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-trans' =>
'<!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>',
'html4-strict' =>
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' =>
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' =>
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' =>
'<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' =>
'<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.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">',
'xhtml11' => '<!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-trans' => '<!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>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.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

@ -24,15 +24,15 @@ class Filters extends BaseConfig
* @var array<string, string>
*/
public array $aliases = [
'csrf' => CSRF::class,
'toolbar' => DebugToolbar::class,
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'permission' => PermissionFilter::class,
'fediverse' => FediverseFilter::class,
'allow-cors' => AllowCorsFilter::class,
'rest-api' => ApiFilter::class,
'csrf' => CSRF::class,
'toolbar' => DebugToolbar::class,
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'permission' => PermissionFilter::class,
'fediverse' => FediverseFilter::class,
'allow-cors' => AllowCorsFilter::class,
'rest-api' => ApiFilter::class,
'podcast-unlock' => PodcastUnlockFilter::class,
];

View File

@ -45,8 +45,8 @@ class Format extends BaseConfig
*/
public array $formatters = [
'application/json' => JSONFormatter::class,
'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class,
'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class,
];
/**
@ -61,8 +61,8 @@ class Format extends BaseConfig
*/
public array $formatterOptions = [
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
'application/xml' => 0,
'text/xml' => 0,
'application/xml' => 0,
'text/xml' => 0,
];
//--------------------------------------------------------------------

View File

@ -28,20 +28,15 @@ class Generators extends BaseConfig
* @var array<string, string>
*/
public array $views = [
'make:command' =>
'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
'make:controller' =>
'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
'make:migration' =>
'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php',
'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
'make:validation' =>
'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
'session:migration' =>
'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
'make:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php',
'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
'make:validation' => 'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
'session:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
];
}

View File

@ -26,7 +26,7 @@ class Images extends BaseConfig
* @var array<string, string>
*/
public array $handlers = [
'gd' => GDHandler::class,
'gd' => GDHandler::class,
'imagick' => ImageMagickHandler::class,
];
@ -51,55 +51,55 @@ class Images extends BaseConfig
*/
public array $podcastCoverSizes = [
'tiny' => [
'width' => 40,
'height' => 40,
'mimetype' => 'image/webp',
'width' => 40,
'height' => 40,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'thumbnail' => [
'width' => 150,
'height' => 150,
'mimetype' => 'image/webp',
'width' => 150,
'height' => 150,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'medium' => [
'width' => 320,
'height' => 320,
'mimetype' => 'image/webp',
'width' => 320,
'height' => 320,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'large' => [
'width' => 1024,
'height' => 1024,
'mimetype' => 'image/webp',
'width' => 1024,
'height' => 1024,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'feed' => [
'width' => 1400,
'width' => 1400,
'height' => 1400,
],
'id3' => [
'width' => 500,
'width' => 500,
'height' => 500,
],
'og' => [
'width' => 1200,
'width' => 1200,
'height' => 1200,
],
'federation' => [
'width' => 400,
'width' => 400,
'height' => 400,
],
'webmanifest192' => [
'width' => 192,
'height' => 192,
'mimetype' => 'image/png',
'width' => 192,
'height' => 192,
'mimetype' => 'image/png',
'extension' => 'png',
],
'webmanifest512' => [
'width' => 512,
'height' => 512,
'mimetype' => 'image/png',
'width' => 512,
'height' => 512,
'mimetype' => 'image/png',
'extension' => 'png',
],
];
@ -113,19 +113,19 @@ class Images extends BaseConfig
*/
public array $podcastBannerSizes = [
'small' => [
'width' => 320,
'height' => 128,
'mimetype' => 'image/webp',
'width' => 320,
'height' => 128,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'medium' => [
'width' => 960,
'height' => 320,
'mimetype' => 'image/webp',
'width' => 960,
'height' => 320,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'federation' => [
'width' => 1500,
'width' => 1500,
'height' => 500,
],
];
@ -139,31 +139,31 @@ class Images extends BaseConfig
*/
public array $podcastBannerDefaultPaths = [
'default' => [
'path' => 'castopod-banner-pine.jpg',
'path' => 'castopod-banner-pine.jpg',
'mimetype' => 'image/jpeg',
],
'pine' => [
'path' => 'castopod-banner-pine.jpg',
'path' => 'castopod-banner-pine.jpg',
'mimetype' => 'image/jpeg',
],
'crimson' => [
'path' => 'castopod-banner-crimson.jpg',
'path' => 'castopod-banner-crimson.jpg',
'mimetype' => 'image/jpeg',
],
'amber' => [
'path' => 'castopod-banner-amber.jpg',
'path' => 'castopod-banner-amber.jpg',
'mimetype' => 'image/jpeg',
],
'lake' => [
'path' => 'castopod-banner-lake.jpg',
'path' => 'castopod-banner-lake.jpg',
'mimetype' => 'image/jpeg',
],
'jacaranda' => [
'path' => 'castopod-banner-jacaranda.jpg',
'path' => 'castopod-banner-jacaranda.jpg',
'mimetype' => 'image/jpeg',
],
'onyx' => [
'path' => 'castopod-banner-onyx.jpg',
'path' => 'castopod-banner-onyx.jpg',
'mimetype' => 'image/jpeg',
],
];
@ -181,26 +181,25 @@ class Images extends BaseConfig
*/
public array $personAvatarSizes = [
'federation' => [
'width' => 400,
'width' => 400,
'height' => 400,
],
'tiny' => [
'width' => 40,
'height' => 40,
'mimetype' => 'image/webp',
'width' => 40,
'height' => 40,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'thumbnail' => [
'width' => 150,
'height' => 150,
'mimetype' => 'image/webp',
'width' => 150,
'height' => 150,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
'medium' => [
'width' => 320,
'height' => 320,
'mimetype' =>
'image/webp',
'width' => 320,
'height' => 320,
'mimetype' => 'image/webp',
'extension' => 'webp',
],
];

View File

@ -50,24 +50,24 @@ class Mimes
'application/x-binary',
'application/x-macbinary',
],
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => ['application/octet-stream', 'application/x-msdownload'],
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => ['application/octet-stream', 'application/x-msdownload'],
'class' => 'application/octet-stream',
'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => ['application/pdf', 'application/force-download', 'application/x-download'],
'ai' => ['application/pdf', 'application/postscript'],
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => [
'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => ['application/pdf', 'application/force-download', 'application/x-download'],
'ai' => ['application/pdf', 'application/postscript'],
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => [
'application/vnd.ms-excel',
'application/msexcel',
'application/x-msexcel',
@ -87,17 +87,17 @@ class Mimes
'application/vnd.ms-office',
'application/msword',
],
'pptx' => ['application/vnd.openxmlformats-officedocument.presentationml.presentation'],
'pptx' => ['application/vnd.openxmlformats-officedocument.presentationml.presentation'],
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => [
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => [
'application/x-php',
'application/x-httpd-php',
'application/php',
@ -105,41 +105,41 @@ class Mimes
'text/x-php',
'application/x-httpd-php-source',
],
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => ['application/x-javascript', 'text/plain'],
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
'z' => 'application/x-compress',
'phps' => 'application/x-httpd-php-source',
'js' => ['application/x-javascript', 'text/plain'],
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => [
'xht' => 'application/xhtml+xml',
'zip' => [
'application/x-zip',
'application/zip',
'application/x-zip-compressed',
'application/s-compressed',
'multipart/x-zip',
],
'rar' => ['application/vnd.rar', 'application/x-rar', 'application/rar', 'application/x-rar-compressed'],
'mid' => 'audio/midi',
'rar' => ['application/vnd.rar', 'application/x-rar', 'application/rar', 'application/x-rar-compressed'],
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3', 'application/octet-stream'],
'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3', 'application/octet-stream'],
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'aif' => ['audio/x-aiff', 'audio/aiff'],
'mp2' => 'audio/mpeg',
'aif' => ['audio/x-aiff', 'audio/aiff'],
'aiff' => ['audio/x-aiff', 'audio/aiff'],
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
'bmp' => [
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
'bmp' => [
'image/bmp',
'image/x-bmp',
'image/x-bitmap',
@ -152,48 +152,48 @@ class Mimes
'application/x-bmp',
'application/x-win-bitmap',
],
'gif' => 'image/gif',
'jpg' => ['image/jpeg', 'image/pjpeg'],
'jpeg' => ['image/jpeg', 'image/pjpeg'],
'jpe' => ['image/jpeg', 'image/pjpeg'],
'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'],
'webp' => 'image/webp',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'css' => ['text/css', 'text/plain'],
'html' => ['text/html', 'text/plain'],
'htm' => ['text/html', 'text/plain'],
'gif' => 'image/gif',
'jpg' => ['image/jpeg', 'image/pjpeg'],
'jpeg' => ['image/jpeg', 'image/pjpeg'],
'jpe' => ['image/jpeg', 'image/pjpeg'],
'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'],
'webp' => 'image/webp',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'css' => ['text/css', 'text/plain'],
'html' => ['text/html', 'text/plain'],
'htm' => ['text/html', 'text/plain'],
'shtml' => ['text/html', 'text/plain'],
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => ['text/plain', 'text/x-log'],
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => ['application/xml', 'text/xml', 'text/plain'],
'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'],
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => ['text/plain', 'text/x-log'],
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => ['application/xml', 'text/xml', 'text/plain'],
'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'],
'movie' => 'video/x-sgi-movie',
'doc' => ['application/msword', 'application/vnd.ms-office'],
'docx' => [
'doc' => ['application/msword', 'application/vnd.ms-office'],
'docx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
'application/msword',
'application/x-zip',
],
'dot' => ['application/msword', 'application/vnd.ms-office'],
'dot' => ['application/msword', 'application/vnd.ms-office'],
'dotx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
@ -209,49 +209,49 @@ class Mimes
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
'word' => ['application/msword', 'application/octet-stream'],
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => ['application/json', 'text/json', 'text/plain'],
'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'],
'p10' => ['application/x-pkcs10', 'application/pkcs10'],
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'],
'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
'3g2' => 'video/3gpp2',
'3gp' => ['video/3gp', 'video/3gpp'],
'mp4' => 'video/mp4',
'm4a' => ['audio/m4a', 'audio/x-m4a', 'application/octet-stream'],
'f4v' => ['video/mp4', 'video/x-f4v'],
'flv' => 'video/x-flv',
'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'],
'p10' => ['application/x-pkcs10', 'application/pkcs10'],
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'],
'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
'3g2' => 'video/3gpp2',
'3gp' => ['video/3gp', 'video/3gpp'],
'mp4' => 'video/mp4',
'm4a' => ['audio/m4a', 'audio/x-m4a', 'application/octet-stream'],
'f4v' => ['video/mp4', 'video/x-f4v'],
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'vlc' => 'application/videolan',
'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'],
'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'],
'ics' => 'text/calendar',
'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'],
'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'],
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'zsh' => 'text/x-scriptzsh',
'7zip' => [
'application/x-compressed',
'application/x-zip-compressed',

View File

@ -23,9 +23,9 @@ class Pager extends BaseConfig
* @var array<string, string>
*/
public $templates = [
'default_full' => 'App\Views\pager\default_full',
'default_full' => 'App\Views\pager\default_full',
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
'default_head' => 'CodeIgniter\Pager\Views\default_head',
'default_head' => 'CodeIgniter\Pager\Views\default_head',
];
/**

View File

@ -23,6 +23,6 @@ class Publisher extends BasePublisher
*/
public $restrictions = [
ROOTPATH => '*',
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
];
}

View File

@ -84,18 +84,18 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
// override default Fediverse Library's actor route
$routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'PodcastController::activity/$1', [
'as' => 'actor',
'as' => 'actor',
'alternate-content' => [
'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'ActorController/$1',
],
'application/podcast-activity+json' => [
'namespace' => 'App\Controllers',
'namespace' => 'App\Controllers',
'controller-method' => 'PodcastController::podcastActor/$1',
],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'ActorController/$1',
],
],
@ -106,7 +106,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]);
$routes->options('episodes', 'ActivityPubController::preflight');
$routes->get('episodes', 'PodcastController::episodes/$1', [
'as' => 'podcast-episodes',
'as' => 'podcast-episodes',
'alternate-content' => [
'application/activity+json' => [
'controller-method' => 'PodcastController::episodeCollection/$1',
@ -123,7 +123,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
$routes->group('episodes/(:slug)', static function ($routes): void {
$routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'EpisodeController/$1/$2', [
'as' => 'episode',
'as' => 'episode',
'alternate-content' => [
'application/activity+json' => [
'controller-method' => 'EpisodeController::episodeObject/$1/$2',
@ -142,7 +142,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]);
$routes->options('comments', 'ActivityPubController::preflight');
$routes->get('comments', 'EpisodeController::comments/$1/$2', [
'as' => 'episode-comments',
'as' => 'episode-comments',
'application/activity+json' => [
'controller-method' => 'EpisodeController::comments/$1/$2',
],
@ -156,7 +156,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]);
$routes->options('comments/(:uuid)', 'ActivityPubController::preflight');
$routes->get('comments/(:uuid)', 'EpisodeCommentController::view/$1/$2/$3', [
'as' => 'episode-comment',
'as' => 'episode-comment',
'application/activity+json' => [
'controller-method' => 'EpisodeController::commentObject/$1/$2',
],
@ -226,21 +226,21 @@ $routes->get('/pages/(:slug)', 'PageController/$1', [
*/
$routes->group('@(:podcastHandle)', static function ($routes): void {
$routes->post('posts/new', 'PostController::attemptCreate/$1', [
'as' => 'post-attempt-create',
'as' => 'post-attempt-create',
'filter' => 'permission:podcast#.manage-publications',
]);
// Post
$routes->group('posts/(:uuid)', static function ($routes): void {
$routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'PostController::view/$1/$2', [
'as' => 'post',
'as' => 'post',
'alternate-content' => [
'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController/$2',
],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController/$2',
],
],
@ -248,14 +248,14 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]);
$routes->options('replies', 'ActivityPubController::preflight');
$routes->get('replies', 'PostController/$1/$2', [
'as' => 'post-replies',
'as' => 'post-replies',
'alternate-content' => [
'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController::replies/$2',
],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers',
'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController::replies/$2',
],
],
@ -263,14 +263,14 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]);
// Actions
$routes->post('action', 'PostController::attemptAction/$1/$2', [
'as' => 'post-attempt-action',
'as' => 'post-attempt-action',
'filter' => 'permission:podcast#.interact-as',
]);
$routes->post(
'block-actor',
'PostController::attemptBlockActor/$1/$2',
[
'as' => 'post-attempt-block-actor',
'as' => 'post-attempt-block-actor',
'filter' => 'permission:fediverse.manage-blocks',
],
);
@ -278,12 +278,12 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
'block-domain',
'PostController::attemptBlockDomain/$1/$2',
[
'as' => 'post-attempt-block-domain',
'as' => 'post-attempt-block-domain',
'filter' => 'permission:fediverse.manage-blocks',
],
);
$routes->post('delete', 'PostController::attemptDelete/$1/$2', [
'as' => 'post-attempt-delete',
'as' => 'post-attempt-delete',
'filter' => 'permission:podcast#.manage-publications',
]);
$routes->get(
@ -298,7 +298,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
'as' => 'follow',
]);
$routes->get('outbox', 'ActorController::outbox/$1', [
'as' => 'outbox',
'as' => 'outbox',
'filter' => 'fediverse:verify-activitystream',
]);
});

View File

@ -27,47 +27,47 @@ class UserAgents extends BaseConfig
*/
public array $platforms = [
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS',
];
/**
@ -81,37 +81,37 @@ class UserAgents extends BaseConfig
* @var array<string, string>
*/
public array $browsers = [
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
'Edg' => 'Edge',
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
'Edg' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser',
'Vivaldi' => 'Vivaldi',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser',
'Vivaldi' => 'Vivaldi',
];
/**
@ -139,86 +139,86 @@ class UserAgents extends BaseConfig
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile',
];
/**
@ -231,24 +231,24 @@ class UserAgents extends BaseConfig
* @var array<string, string>
*/
public array $robots = [
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot',
];
}

View File

@ -32,7 +32,7 @@ class Validation extends BaseConfig
* @var array<string, string>
*/
public array $templates = [
'list' => 'CodeIgniter\Validation\Views\list',
'list' => 'CodeIgniter\Validation\Views\list',
'single' => 'CodeIgniter\Validation\Views\single',
];
}

View File

@ -34,7 +34,7 @@ class ActorController extends FediverseActorController
$data = [
// @phpstan-ignore-next-line
'metatags' => get_follow_metatags($this->actor),
'actor' => $this->actor,
'actor' => $this->actor,
];
return view('podcast/follow', $data);

View File

@ -28,8 +28,8 @@ class CreditsController extends BaseController
if (! ($found = cache($cacheName))) {
$page = new Page([
'title' => lang('Person.credits', [], $locale),
'slug' => 'credits',
'title' => lang('Person.credits', [], $locale),
'slug' => 'credits',
'content_markdown' => '',
]);
@ -48,17 +48,15 @@ class CreditsController extends BaseController
$personRole = $credit->person_role;
$credits[$personGroup] = [
'group_label' => $credit->group_label,
'persons' => [
'persons' => [
$personId => [
'full_name' => $credit->person->full_name,
'thumbnail_url' =>
get_avatar_url($credit->person, 'thumbnail'),
'information_url' =>
$credit->person->information_url,
'roles' => [
'full_name' => $credit->person->full_name,
'thumbnail_url' => get_avatar_url($credit->person, 'thumbnail'),
'information_url' => $credit->person->information_url,
'roles' => [
$personRole => [
'role_label' => $credit->role_label,
'is_in' => [
'is_in' => [
[
'link' => $credit->episode_id
? $credit->episode->link
@ -88,14 +86,13 @@ class CreditsController extends BaseController
$personId = $credit->person_id;
$personRole = $credit->person_role;
$credits[$personGroup]['persons'][$personId] = [
'full_name' => $credit->person->full_name,
'thumbnail_url' =>
get_avatar_url($credit->person, 'thumbnail'),
'full_name' => $credit->person->full_name,
'thumbnail_url' => get_avatar_url($credit->person, 'thumbnail'),
'information_url' => $credit->person->information_url,
'roles' => [
'roles' => [
$personRole => [
'role_label' => $credit->role_label,
'is_in' => [
'is_in' => [
[
'link' => $credit->episode_id
? $credit->episode->link
@ -124,7 +121,7 @@ class CreditsController extends BaseController
$personRole
] = [
'role_label' => $credit->role_label,
'is_in' => [
'is_in' => [
[
'link' => $credit->episode_id
? $credit->episode->link
@ -169,8 +166,8 @@ class CreditsController extends BaseController
$data = [
'metatags' => get_page_metatags($page),
'page' => $page,
'credits' => $credits,
'page' => $page,
'credits' => $credits,
];
$found = view('pages/credits', $data);

View File

@ -102,7 +102,7 @@ class EpisodeAudioController extends Controller
->setJSON([
'errors' => [
'status' => 401,
'title' => 'Unauthorized',
'title' => 'Unauthorized',
'detail' => 'Episode is premium, you must provide a token to unlock it.',
],
]);
@ -117,7 +117,7 @@ class EpisodeAudioController extends Controller
->setJSON([
'errors' => [
'status' => 401,
'title' => 'Unauthorized',
'title' => 'Unauthorized',
'detail' => 'Invalid token!',
],
]);

View File

@ -99,10 +99,10 @@ class EpisodeCommentController extends BaseController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_episode_comment_metatags($this->comment),
'podcast' => $this->podcast,
'actor' => $this->actor,
'episode' => $this->episode,
'comment' => $this->comment,
'podcast' => $this->podcast,
'actor' => $this->actor,
'episode' => $this->episode,
'comment' => $this->comment,
];
// if user is logged in then send to the authenticated activity view
@ -112,7 +112,7 @@ class EpisodeCommentController extends BaseController
}
return view('episode/comment', $data, [
'cache' => DECADE,
'cache' => DECADE,
'cache_name' => $cacheName,
]);
}

View File

@ -87,8 +87,8 @@ class EpisodeController extends BaseController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_episode_metatags($this->episode),
'podcast' => $this->podcast,
'episode' => $this->episode,
'podcast' => $this->podcast,
'episode' => $this->episode,
];
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode(
@ -138,8 +138,8 @@ class EpisodeController extends BaseController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_episode_metatags($this->episode),
'podcast' => $this->podcast,
'episode' => $this->episode,
'podcast' => $this->podcast,
'episode' => $this->episode,
];
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode(
@ -197,9 +197,9 @@ class EpisodeController extends BaseController
$themeData = EpisodeModel::$themes[$theme];
$data = [
'podcast' => $this->podcast,
'episode' => $this->episode,
'theme' => $theme,
'podcast' => $this->podcast,
'episode' => $this->episode,
'theme' => $theme,
'themeData' => $themeData,
];
@ -222,22 +222,21 @@ class EpisodeController extends BaseController
public function oembedJSON(): ResponseInterface
{
return $this->response->setJSON([
'type' => 'rich',
'version' => '1.0',
'title' => $this->episode->title,
'type' => 'rich',
'version' => '1.0',
'title' => $this->episode->title,
'provider_name' => $this->podcast->title,
'provider_url' => $this->podcast->link,
'author_name' => $this->podcast->title,
'author_url' => $this->podcast->link,
'html' =>
'<iframe src="' .
'provider_url' => $this->podcast->link,
'author_name' => $this->podcast->title,
'author_url' => $this->podcast->link,
'html' => '<iframe src="' .
$this->episode->embed_url .
'" width="100%" height="' . config('Embed')->height . '" frameborder="0" scrolling="no"></iframe>',
'width' => config('Embed')
->width,
'height' => config('Embed')
->height,
'thumbnail_url' => $this->episode->cover->og_url,
'thumbnail_url' => $this->episode->cover->og_url,
'thumbnail_width' => config('Images')
->podcastCoverSizes['og']['width'],
'thumbnail_height' => config('Images')

View File

@ -36,7 +36,7 @@ class HomeController extends BaseController
$data = [
'metatags' => get_home_metatags(),
'podcasts' => $allPodcasts,
'sortBy' => $sortBy,
'sortBy' => $sortBy,
];
return view('home', $data);
@ -69,14 +69,14 @@ class HomeController extends BaseController
if ($errors !== []) {
return $this->response->setStatusCode(503)
->setJSON([
'code' => 503,
'code' => 503,
'errors' => $errors,
]);
}
return $this->response->setStatusCode(200)
->setJSON([
'code' => 200,
'code' => 200,
'message' => '✨ All good!',
]);
}

View File

@ -31,7 +31,7 @@ class MapController extends BaseController
if (! ($found = cache($cacheName))) {
return view('pages/map', [], [
'cache' => DECADE,
'cache' => DECADE,
'cache_name' => $cacheName,
]);
}
@ -50,13 +50,13 @@ class MapController extends BaseController
$found = [];
foreach ($episodes as $episode) {
$found[] = [
'latitude' => $episode->location->latitude,
'longitude' => $episode->location->longitude,
'latitude' => $episode->location->latitude,
'longitude' => $episode->location->longitude,
'location_name' => esc($episode->location->name),
'location_url' => $episode->location->url,
'episode_link' => $episode->link,
'podcast_link' => $episode->podcast->link,
'cover_url' => $episode->cover->thumbnail_url,
'location_url' => $episode->location->url,
'episode_link' => $episode->link,
'podcast_link' => $episode->podcast->link,
'cover_url' => $episode->cover->thumbnail_url,
'podcast_title' => esc($episode->podcast->title),
'episode_title' => esc($episode->title),
];

View File

@ -52,7 +52,7 @@ class PageController extends BaseController
if (! ($found = cache($cacheName))) {
$data = [
'metatags' => get_page_metatags($this->page),
'page' => $this->page,
'page' => $this->page,
];
$found = view('pages/page', $data);

View File

@ -80,8 +80,8 @@ class PodcastController extends BaseController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_podcast_metatags($this->podcast, 'activity'),
'podcast' => $this->podcast,
'posts' => (new PostModel())->getActorPublishedPosts($this->podcast->actor_id),
'podcast' => $this->podcast,
'posts' => (new PostModel())->getActorPublishedPosts($this->podcast->actor_id),
];
// if user is logged in then send to the authenticated activity view
@ -132,8 +132,8 @@ class PodcastController extends BaseController
$data = [
'metatags' => get_podcast_metatags($this->podcast, 'about'),
'podcast' => $this->podcast,
'stats' => $stats,
'podcast' => $this->podcast,
'stats' => $stats,
];
// // if user is logged in then send to the authenticated activity view
@ -207,18 +207,17 @@ class PodcastController extends BaseController
$isActive = $yearQuery === $year['year'];
if ($isActive) {
$activeQuery = [
'type' => 'year',
'value' => $year['year'],
'label' => $year['year'],
'type' => 'year',
'value' => $year['year'],
'label' => $year['year'],
'number_of_episodes' => $year['number_of_episodes'],
];
}
$episodesNavigation[] = [
'label' => $year['year'],
'label' => $year['year'],
'number_of_episodes' => $year['number_of_episodes'],
'route' =>
route_to('podcast-episodes', $this->podcast->handle) .
'route' => route_to('podcast-episodes', $this->podcast->handle) .
'?year=' .
$year['year'],
'is_active' => $isActive,
@ -229,7 +228,7 @@ class PodcastController extends BaseController
$isActive = $seasonQuery === $season['season_number'];
if ($isActive) {
$activeQuery = [
'type' => 'season',
'type' => 'season',
'value' => $season['season_number'],
'label' => lang('Podcast.season', [
'seasonNumber' => $season['season_number'],
@ -243,8 +242,7 @@ class PodcastController extends BaseController
'seasonNumber' => $season['season_number'],
]),
'number_of_episodes' => $season['number_of_episodes'],
'route' =>
route_to('podcast-episodes', $this->podcast->handle) .
'route' => route_to('podcast-episodes', $this->podcast->handle) .
'?season=' .
$season['season_number'],
'is_active' => $isActive,
@ -252,11 +250,11 @@ class PodcastController extends BaseController
}
$data = [
'metatags' => get_podcast_metatags($this->podcast, 'episodes'),
'podcast' => $this->podcast,
'metatags' => get_podcast_metatags($this->podcast, 'episodes'),
'podcast' => $this->podcast,
'episodesNav' => $episodesNavigation,
'activeQuery' => $activeQuery,
'episodes' => (new EpisodeModel())->getPodcastEpisodes(
'episodes' => (new EpisodeModel())->getPodcastEpisodes(
$this->podcast->id,
$this->podcast->type,
$yearQuery,

View File

@ -92,8 +92,8 @@ class PostController extends FediversePostController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_post_metatags($this->post),
'post' => $this->post,
'podcast' => $this->podcast,
'post' => $this->post,
'podcast' => $this->podcast,
];
// if user is logged in then send to the authenticated activity view
@ -103,7 +103,7 @@ class PostController extends FediversePostController
}
return view('post/post', $data, [
'cache' => DECADE,
'cache' => DECADE,
'cache_name' => $cacheName,
]);
}
@ -114,7 +114,7 @@ class PostController extends FediversePostController
public function attemptCreate(): RedirectResponse
{
$rules = [
'message' => 'required|max_length[500]',
'message' => 'required|max_length[500]',
'episode_url' => 'valid_url_strict|permit_empty',
];
@ -128,9 +128,9 @@ class PostController extends FediversePostController
$message = $this->request->getPost('message');
$newPost = new CastopodPost([
'actor_id' => interact_as_actor_id(),
'actor_id' => interact_as_actor_id(),
'published_at' => Time::now(),
'created_by' => user_id(),
'created_by' => user_id(),
]);
// get episode if episodeUrl has been set
@ -174,11 +174,11 @@ class PostController extends FediversePostController
}
$newPost = new CastopodPost([
'actor_id' => interact_as_actor_id(),
'actor_id' => interact_as_actor_id(),
'in_reply_to_id' => $this->post->id,
'message' => $this->request->getPost('message'),
'published_at' => Time::now(),
'created_by' => user_id(),
'message' => $this->request->getPost('message'),
'published_at' => Time::now(),
'created_by' => user_id(),
]);
if ($this->post->episode_id !== null) {
@ -227,9 +227,9 @@ class PostController extends FediversePostController
$action = $this->request->getPost('action');
return match ($action) {
'favourite' => $this->attemptFavourite(),
'reblog' => $this->attemptReblog(),
'reply' => $this->attemptReply(),
default => redirect()
'reblog' => $this->attemptReblog(),
'reply' => $this->attemptReply(),
default => redirect()
->back()
->withInput()
->with('errors', 'error'),
@ -251,16 +251,16 @@ class PostController extends FediversePostController
if (! ($cachedView = cache($cacheName))) {
$data = [
'metatags' => get_remote_actions_metatags($this->post, $action),
'podcast' => $this->podcast,
'actor' => $this->actor,
'post' => $this->post,
'action' => $action,
'podcast' => $this->podcast,
'actor' => $this->actor,
'post' => $this->post,
'action' => $action,
];
helper('form');
return view('post/remote_action', $data, [
'cache' => DECADE,
'cache' => DECADE,
'cache_name' => $cacheName,
]);
}

View File

@ -23,27 +23,27 @@ class WebmanifestController extends Controller
*/
final public const THEME_COLORS = [
'pine' => [
'theme' => '#009486',
'theme' => '#009486',
'background' => '#F0F9F8',
],
'lake' => [
'theme' => '#00ACE0',
'theme' => '#00ACE0',
'background' => '#F0F7F9',
],
'jacaranda' => [
'theme' => '#562CDD',
'theme' => '#562CDD',
'background' => '#F2F0F9',
],
'crimson' => [
'theme' => '#F24562',
'theme' => '#F24562',
'background' => '#F9F0F2',
],
'amber' => [
'theme' => '#FF6224',
'theme' => '#FF6224',
'background' => '#F9F3F0',
],
'onyx' => [
'theme' => '#040406',
'theme' => '#040406',
'background' => '#F3F3F7',
],
];
@ -53,24 +53,24 @@ class WebmanifestController extends Controller
helper('misc');
$webmanifest = [
'name' => esc(service('settings') ->get('App.siteName')),
'name' => esc(service('settings') ->get('App.siteName')),
'description' => esc(service('settings') ->get('App.siteDescription')),
'lang' => service('request')
'lang' => service('request')
->getLocale(),
'start_url' => base_url(),
'display' => 'standalone',
'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'start_url' => base_url(),
'display' => 'standalone',
'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'],
'icons' => [
'icons' => [
[
'src' => get_site_icon_url('192'),
'type' => 'image/png',
'src' => get_site_icon_url('192'),
'type' => 'image/png',
'sizes' => '192x192',
],
[
'src' => get_site_icon_url('512'),
'type' => 'image/png',
'src' => get_site_icon_url('512'),
'type' => 'image/png',
'sizes' => '512x512',
],
],
@ -88,25 +88,25 @@ class WebmanifestController extends Controller
}
$webmanifest = [
'name' => esc($podcast->title),
'short_name' => '@' . esc($podcast->handle),
'description' => $podcast->description,
'lang' => $podcast->language_code,
'start_url' => $podcast->link,
'scope' => '/@' . esc($podcast->handle),
'display' => 'standalone',
'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'name' => esc($podcast->title),
'short_name' => '@' . esc($podcast->handle),
'description' => $podcast->description,
'lang' => $podcast->language_code,
'start_url' => $podcast->link,
'scope' => '/@' . esc($podcast->handle),
'display' => 'standalone',
'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'],
'icons' => [
'icons' => [
[
'src' => $podcast->cover->webmanifest192_url,
'type' => $podcast->cover->webmanifest192_mimetype,
'src' => $podcast->cover->webmanifest192_url,
'type' => $podcast->cover->webmanifest192_mimetype,
'sizes' => '192x192',
],
[
'src' => $podcast->cover->webmanifest512_url,
'type' => $podcast->cover->webmanifest512_mimetype,
'src' => $podcast->cover->webmanifest512_url,
'type' => $podcast->cover->webmanifest512_mimetype,
'sizes' => '512x512',
],
],

View File

@ -20,24 +20,24 @@ class AddCategories extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'parent_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'code' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'apple_category' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'google_category' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
]);

View File

@ -20,12 +20,12 @@ class AddLanguages extends Migration
{
$this->forge->addField([
'code' => [
'type' => 'VARCHAR',
'comment' => 'ISO 639-1 language code',
'type' => 'VARCHAR',
'comment' => 'ISO 639-1 language code',
'constraint' => 2,
],
'native_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
]);

View File

@ -20,24 +20,24 @@ class AddPodcasts extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'guid' => [
'type' => 'CHAR',
'type' => 'CHAR',
'constraint' => 36,
],
'actor_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'handle' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'title' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
'description_markdown' => [
@ -47,50 +47,50 @@ class AddPodcasts extends Migration
'type' => 'TEXT',
],
'cover_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'banner_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'language_code' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 2,
],
'category_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'default' => 0,
'default' => 0,
],
'parental_advisory' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['clean', 'explicit'],
'null' => true,
'null' => true,
],
'owner_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
'owner_email' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 255,
],
'publisher' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'null' => true,
'null' => true,
],
'type' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['episodic', 'serial'],
'default' => 'episodic',
'default' => 'episodic',
],
'copyright' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'null' => true,
'null' => true,
],
'episode_description_footer_markdown' => [
'type' => 'TEXT',
@ -101,85 +101,83 @@ class AddPodcasts extends Migration
'null' => true,
],
'is_blocked' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'is_completed' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'is_locked' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 1,
'default' => 1,
],
'imported_feed_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'comment' =>
'The RSS feed URL if this podcast was imported, NULL otherwise.',
'null' => true,
'comment' => 'The RSS feed URL if this podcast was imported, NULL otherwise.',
'null' => true,
],
'new_feed_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'comment' =>
'The RSS new feed URL if this podcast is moving out, NULL otherwise.',
'null' => true,
'comment' => 'The RSS new feed URL if this podcast is moving out, NULL otherwise.',
'null' => true,
],
'payment_pointer' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'comment' => 'Wallet address for Web Monetization payments',
'null' => true,
'comment' => 'Wallet address for Web Monetization payments',
'null' => true,
],
'location_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'null' => true,
'null' => true,
],
'location_geo' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
'null' => true,
'null' => true,
],
'location_osm' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 12,
'null' => true,
'null' => true,
],
'custom_rss' => [
'type' => 'JSON',
'null' => true,
],
'partner_id' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
'null' => true,
'null' => true,
],
'partner_link_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'null' => true,
'null' => true,
],
'partner_image_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'null' => true,
'null' => true,
],
'is_premium_by_default' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'updated_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'published_at' => [

View File

@ -20,28 +20,28 @@ class AddEpisodes extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'guid' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 255,
],
'title' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
'slug' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
'audio_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'description_markdown' => [
@ -51,95 +51,95 @@ class AddEpisodes extends Migration
'type' => 'TEXT',
],
'cover_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'transcript_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'transcript_remote_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'null' => true,
'null' => true,
],
'chapters_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'chapters_remote_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'null' => true,
'null' => true,
],
'parental_advisory' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['clean', 'explicit'],
'null' => true,
'null' => true,
],
'number' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'season_number' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'type' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['trailer', 'full', 'bonus'],
'default' => 'full',
'default' => 'full',
],
'is_blocked' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'location_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'null' => true,
'null' => true,
],
'location_geo' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
'null' => true,
'null' => true,
],
'location_osm' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 12,
'null' => true,
'null' => true,
],
'custom_rss' => [
'type' => 'JSON',
'null' => true,
],
'posts_count' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'default' => 0,
'default' => 0,
],
'comments_count' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'default' => 0,
'default' => 0,
],
'is_premium' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'updated_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'published_at' => [

View File

@ -20,25 +20,25 @@ class AddPlatforms extends Migration
{
$this->forge->addField([
'slug' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'type' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['podcasting', 'social', 'funding'],
],
'label' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'home_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 255,
],
'submit_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'null' => true,
'null' => true,
],
]);
$this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()');

View File

@ -20,31 +20,31 @@ class AddPodcastsPlatforms extends Migration
{
$this->forge->addField([
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'platform_slug' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'link_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
],
'account_id' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'null' => true,
'null' => true,
],
'is_visible' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
'is_on_embed' => [
'type' => 'TINYINT',
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
'default' => 0,
],
]);

View File

@ -20,49 +20,49 @@ class AddEpisodeComments extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'BINARY',
'type' => 'BINARY',
'constraint' => 16,
],
'uri' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 255,
],
'episode_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'actor_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'in_reply_to_id' => [
'type' => 'BINARY',
'type' => 'BINARY',
'constraint' => 16,
'null' => true,
'null' => true,
],
'message' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 5000,
],
'message_html' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 6000,
],
'likes_count' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'replies_count' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'created_at' => [
'type' => 'DATETIME',
],
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
]);

View File

@ -20,11 +20,11 @@ class AddLikes extends Migration
{
$this->forge->addField([
'actor_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'comment_id' => [
'type' => 'BINARY',
'type' => 'BINARY',
'constraint' => 16,
],
]);

View File

@ -20,18 +20,18 @@ class AddPages extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'title' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 255,
],
'slug' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
'unique' => true,
'unique' => true,
],
'content_markdown' => [
'type' => 'TEXT',

View File

@ -20,11 +20,11 @@ class AddPodcastsCategories extends Migration
{
$this->forge->addField([
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'category_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
]);

View File

@ -18,57 +18,57 @@ class AddClips extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'episode_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'start_time' => [
'type' => 'DECIMAL(8,3)',
'type' => 'DECIMAL(8,3)',
'unsigned' => true,
],
'duration' => [
// clip duration cannot be higher than 9999,999 seconds ~ 2.77 hours
'type' => 'DECIMAL(7,3)',
'type' => 'DECIMAL(7,3)',
'unsigned' => true,
],
'title' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 128,
],
'type' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['audio', 'video'],
],
'media_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'metadata' => [
'type' => 'JSON',
'null' => true,
],
'status' => [
'type' => 'ENUM',
'type' => 'ENUM',
'constraint' => ['queued', 'pending', 'running', 'passed', 'failed'],
],
'logs' => [
'type' => 'TEXT',
],
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'updated_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'job_started_at' => [

View File

@ -20,39 +20,38 @@ class AddPersons extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'full_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 192,
'comment' => 'This is the full name or alias of the person.',
'comment' => 'This is the full name or alias of the person.',
],
'unique_name' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 192,
'comment' => 'This is the slug name or alias of the person.',
'unique' => true,
'comment' => 'This is the slug name or alias of the person.',
'unique' => true,
],
'information_url' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 512,
'comment' =>
'The url to a relevant resource of information about the person, such as a homepage or third-party profile platform.',
'null' => true,
'comment' => 'The url to a relevant resource of information about the person, such as a homepage or third-party profile platform.',
'null' => true,
],
'avatar_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'null' => true,
],
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'updated_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'created_at' => [

View File

@ -20,24 +20,24 @@ class AddPodcastsPersons extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'person_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'person_group' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'person_role' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
]);

View File

@ -20,28 +20,28 @@ class AddEpisodesPersons extends Migration
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'unsigned' => true,
'type' => 'INT',
'unsigned' => true,
'auto_increment' => true,
],
'podcast_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'episode_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'person_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
],
'person_group' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
'person_role' => [
'type' => 'VARCHAR',
'type' => 'VARCHAR',
'constraint' => 32,
],
]);

View File

@ -24,10 +24,10 @@ class AddEpisodeIdToPosts extends Migration
$this->forge->addColumn("{$fediverseTablesPrefix}posts", [
'episode_id' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'after' => 'replies_count',
'null' => true,
'after' => 'replies_count',
],
]);

View File

@ -24,10 +24,10 @@ class AddCreatedByToPosts extends Migration
$this->forge->addColumn("{$fediverseTablesPrefix}posts", [
'created_by' => [
'type' => 'INT',
'type' => 'INT',
'unsigned' => true,
'null' => true,
'after' => 'episode_id',
'null' => true,
'after' => 'episode_id',
],
]);

File diff suppressed because it is too large Load Diff

View File

@ -122,50 +122,50 @@ class FakePodcastsAnalyticsSeeder extends Seeder
$hits = rand(0, (int) $probability2);
$analyticsPodcasts[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'duration' => rand(60, 3600),
'bandwidth' => rand(1000000, 10000000),
'hits' => $hits,
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'duration' => rand(60, 3600),
'bandwidth' => rand(1000000, 10000000),
'hits' => $hits,
'unique_listeners' => $hits,
];
$analyticsPodcastsByHour[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'hour' => rand(0, 23),
'hits' => $hits,
'date' => date('Y-m-d', $date),
'hour' => rand(0, 23),
'hits' => $hits,
];
$analyticsPodcastsByCountry[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'country_code' => $countryCode,
'hits' => $hits,
'hits' => $hits,
];
$analyticsPodcastsByEpisode[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'date' => date('Y-m-d', $date),
'episode_id' => $episode->id,
'age' => $age,
'hits' => $hits,
'age' => $age,
'hits' => $hits,
];
$analyticsPodcastsByPlayer[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'service' => $service,
'app' => $app,
'device' => $device,
'os' => $os,
'is_bot' => $isBot,
'hits' => $hits,
'date' => date('Y-m-d', $date),
'service' => $service,
'app' => $app,
'device' => $device,
'os' => $os,
'is_bot' => $isBot,
'hits' => $hits,
];
$analyticsPodcastsByRegion[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'country_code' => $countryCode,
'region_code' => $regionCode,
'latitude' => $latitude,
'longitude' => $longitude,
'hits' => $hits,
'region_code' => $regionCode,
'latitude' => $latitude,
'longitude' => $longitude,
'hits' => $hits,
];
}
}

View File

@ -14,18 +14,18 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function cover(): array
{
return [
'id' => 1,
'file_key' => 'podcasts/Handle/cover.jpg',
'file_size' => 400000,
'id' => 1,
'file_key' => 'podcasts/Handle/cover.jpg',
'file_size' => 400000,
'file_mimetype' => 'image/jpeg',
'file_metadata' => '{"FILE":{"FileName":"cover.jpg","FileDateTime":1654861723,"FileSize":468541,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":"COMMENT"},"COMPUTED":{"html":"width=\"1400\" height=\"1400\"","Height":1400,"Width":1400,"IsColor":1},"COMMENT":["CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90\n"],"sizes":{"tiny":{"width":40,"height":40,"mimetype":"image\/webp","extension":"webp"},"thumbnail":{"width":150,"height":150,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":320,"height":320,"mimetype":"image\/webp","extension":"webp"},"large":{"width":1024,"height":1024,"mimetype":"image\/webp","extension":"webp"},"feed":{"width":1400,"height":1400},"id3":{"width":500,"height":500},"og":{"width":1200,"height":1200},"federation":{"width":400,"height":400},"webmanifest192":{"width":192,"height":192,"mimetype":"image\/png","extension":"png"},"webmanifest512":{"width":512,"height":512,"mimetype":"image\/png","extension":"png"}}}',
'type' => 'image',
'description' => null,
'type' => 'image',
'description' => null,
'language_code' => null,
'uploaded_by' => 1,
'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
'uploaded_by' => 1,
'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
];
}
@ -35,18 +35,18 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function banner(): array
{
return [
'id' => 2,
'file_key' => 'podcasts/Handle/banner.jpg',
'file_size' => 400000,
'id' => 2,
'file_key' => 'podcasts/Handle/banner.jpg',
'file_size' => 400000,
'file_mimetype' => 'image/jpeg',
'file_metadata' => '{"FILE":{"FileName":"banner.jpg","FileDateTime":1654861724,"FileSize":98209,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":""},"COMPUTED":{"html":"width=\"1500\" height=\"500\"","Height":500,"Width":1500,"IsColor":1},"sizes":{"small":{"width":320,"height":128,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":960,"height":320,"mimetype":"image\/webp","extension":"webp"},"federation":{"width":1500,"height":500}}}',
'type' => 'image',
'description' => null,
'type' => 'image',
'description' => null,
'language_code' => null,
'uploaded_by' => 1,
'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
'uploaded_by' => 1,
'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
];
}
@ -56,26 +56,26 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function actor(): array
{
return [
'id' => 1,
'uri' => getenv('app_baseURL') . '@Handle',
'username' => 'Handle',
'domain' => getenv('app_baseURL'),
'private_key' => 'private_key',
'public_key' => 'public_key',
'display_name' => 'Title',
'summary' => '<p>description</p>',
'avatar_image_url' => getenv('app_baseURL') . 'media/podcasts/Handle',
'id' => 1,
'uri' => getenv('app_baseURL') . '@Handle',
'username' => 'Handle',
'domain' => getenv('app_baseURL'),
'private_key' => 'private_key',
'public_key' => 'public_key',
'display_name' => 'Title',
'summary' => '<p>description</p>',
'avatar_image_url' => getenv('app_baseURL') . 'media/podcasts/Handle',
'avatar_image_mimetype' => 'image/webp',
'cover_image_url' => null,
'cover_image_mimetype' => null,
'inbox_url' => getenv('app_baseURL') . '@Handle/inbox',
'outbox_url' => getenv('app_baseURL') . '@Handle/outbox',
'followers_url' => getenv('app_baseURL') . '@Handle/followers',
'followers_count' => 0,
'posts_count' => 0,
'is_blocked' => 0,
'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
'cover_image_url' => null,
'cover_image_mimetype' => null,
'inbox_url' => getenv('app_baseURL') . '@Handle/inbox',
'outbox_url' => getenv('app_baseURL') . '@Handle/outbox',
'followers_url' => getenv('app_baseURL') . '@Handle/followers',
'followers_count' => 0,
'posts_count' => 0,
'is_blocked' => 0,
'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
];
}
@ -85,43 +85,43 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function podcast(): array
{
return [
'id' => 1,
'guid' => '0d341200-0234-5de7-99a6-a7d02bea4ce2',
'actor_id' => 1,
'handle' => 'Handle',
'title' => 'Title',
'description_markdown' => 'description',
'description_html' => '<p>description</p>',
'cover_id' => 1,
'banner_id' => 2,
'language_code' => 'en',
'category_id' => 1,
'parental_advisory' => null,
'owner_name' => 'Owner',
'owner_email' => 'Owner@gmail.com',
'publisher' => '',
'type' => 'episodic',
'copyright' => '',
'id' => 1,
'guid' => '0d341200-0234-5de7-99a6-a7d02bea4ce2',
'actor_id' => 1,
'handle' => 'Handle',
'title' => 'Title',
'description_markdown' => 'description',
'description_html' => '<p>description</p>',
'cover_id' => 1,
'banner_id' => 2,
'language_code' => 'en',
'category_id' => 1,
'parental_advisory' => null,
'owner_name' => 'Owner',
'owner_email' => 'Owner@gmail.com',
'publisher' => '',
'type' => 'episodic',
'copyright' => '',
'episode_description_footer_markdown' => null,
'episode_description_footer_html' => null,
'is_blocked' => 0,
'is_completed' => 0,
'is_locked' => 1,
'imported_feed_url' => null,
'new_feed_url' => null,
'payment_pointer' => null,
'location_name' => null,
'location_geo' => null,
'location_osm' => null,
'custom_rss' => null,
'is_published_on_hubs' => 0,
'partner_id' => null,
'partner_link_url' => null,
'partner_image_url' => null,
'created_by' => 1,
'updated_by' => 1,
'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
'episode_description_footer_html' => null,
'is_blocked' => 0,
'is_completed' => 0,
'is_locked' => 1,
'imported_feed_url' => null,
'new_feed_url' => null,
'payment_pointer' => null,
'location_name' => null,
'location_geo' => null,
'location_osm' => null,
'custom_rss' => null,
'is_published_on_hubs' => 0,
'partner_id' => null,
'partner_link_url' => null,
'partner_image_url' => null,
'created_by' => 1,
'updated_by' => 1,
'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00',
];
}

View File

@ -227,24 +227,23 @@ class FakeWebsiteAnalyticsSeeder extends Seeder
$websiteByBrowser[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'browser' => $browser,
'hits' => $hits,
'date' => date('Y-m-d', $date),
'browser' => $browser,
'hits' => $hits,
];
$websiteByEntryPage[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'entry_page_url' => $episode->link,
'hits' => $hits,
'hits' => $hits,
];
$websiteByReferer[] = [
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'referer_url' =>
'http://' . $domain . '/?q=' . $keyword,
'domain' => $domain,
'keywords' => $keyword,
'hits' => $hits,
'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date),
'referer_url' => 'http://' . $domain . '/?q=' . $keyword,
'domain' => $domain,
'keywords' => $keyword,
'hits' => $hits,
];
}
}

View File

@ -25,740 +25,739 @@ class LanguageSeeder extends Seeder
{
$data = [
[
'code' => 'aa',
'code' => 'aa',
'native_name' => 'Afaraf',
],
[
'code' => 'ab',
'code' => 'ab',
'native_name' => 'аҧсуа бызшәа, аҧсшәа',
],
[
'code' => 'ae',
'code' => 'ae',
'native_name' => 'Avesta',
],
[
'code' => 'af',
'code' => 'af',
'native_name' => 'Afrikaans',
],
[
'code' => 'ak',
'code' => 'ak',
'native_name' => 'Akan',
],
[
'code' => 'am',
'code' => 'am',
'native_name' => 'አማርኛ',
],
[
'code' => 'an',
'code' => 'an',
'native_name' => 'Aragonés',
],
[
'code' => 'ar',
'code' => 'ar',
'native_name' => 'العربية',
],
[
'code' => 'as',
'code' => 'as',
'native_name' => 'অসমীয়া',
],
[
'code' => 'av',
'code' => 'av',
'native_name' => 'авар мацӀ, магӀарул мацӀ',
],
[
'code' => 'ay',
'code' => 'ay',
'native_name' => 'Aymar aru',
],
[
'code' => 'az',
'code' => 'az',
'native_name' => 'azərbaycan dili',
],
[
'code' => 'ba',
'code' => 'ba',
'native_name' => 'башҡорт теле',
],
[
'code' => 'be',
'code' => 'be',
'native_name' => 'беларуская мова',
],
[
'code' => 'bg',
'code' => 'bg',
'native_name' => 'български език',
],
[
'code' => 'bh',
'code' => 'bh',
'native_name' => 'भोजपुरी',
],
[
'code' => 'bi',
'code' => 'bi',
'native_name' => 'Bislama',
],
[
'code' => 'bm',
'code' => 'bm',
'native_name' => 'Bamanankan',
],
[
'code' => 'bn',
'code' => 'bn',
'native_name' => 'বাংলা',
],
[
'code' => 'bo',
'code' => 'bo',
'native_name' => 'བོད་ཡིག',
],
[
'code' => 'br',
'code' => 'br',
'native_name' => 'Brezhoneg',
],
[
'code' => 'bs',
'code' => 'bs',
'native_name' => 'Bosanski jezik',
],
[
'code' => 'ca',
'code' => 'ca',
'native_name' => 'Català, valencià',
],
[
'code' => 'ce',
'code' => 'ce',
'native_name' => 'нохчийн мотт',
],
[
'code' => 'ch',
'code' => 'ch',
'native_name' => 'Chamoru',
],
[
'code' => 'co',
'code' => 'co',
'native_name' => 'Corsu, lingua corsa',
],
[
'code' => 'cr',
'code' => 'cr',
'native_name' => 'ᓀᐦᐃᔭᐍᐏᐣ',
],
[
'code' => 'cs',
'code' => 'cs',
'native_name' => 'čeština, český jazyk',
],
[
'code' => 'cu',
'code' => 'cu',
'native_name' => 'ѩзыкъ словѣньскъ',
],
[
'code' => 'cv',
'code' => 'cv',
'native_name' => 'чӑваш чӗлхи',
],
[
'code' => 'cy',
'code' => 'cy',
'native_name' => 'Cymraeg',
],
[
'code' => 'da',
'code' => 'da',
'native_name' => 'Dansk',
],
[
'code' => 'de',
'code' => 'de',
'native_name' => 'Deutsch',
],
[
'code' => 'dv',
'code' => 'dv',
'native_name' => 'ދިވެހި',
],
[
'code' => 'dz',
'code' => 'dz',
'native_name' => 'རྫོང་ཁ',
],
[
'code' => 'ee',
'code' => 'ee',
'native_name' => 'Eʋegbe',
],
[
'code' => 'el',
'code' => 'el',
'native_name' => 'ελληνικά',
],
[
'code' => 'en',
'code' => 'en',
'native_name' => 'English',
],
[
'code' => 'eo',
'code' => 'eo',
'native_name' => 'Esperanto',
],
[
'code' => 'es',
'code' => 'es',
'native_name' => 'Español',
],
[
'code' => 'et',
'code' => 'et',
'native_name' => 'eesti, eesti keel',
],
[
'code' => 'eu',
'code' => 'eu',
'native_name' => 'Euskara, euskera',
],
[
'code' => 'fa',
'code' => 'fa',
'native_name' => 'فارسی',
],
[
'code' => 'ff',
'code' => 'ff',
'native_name' => 'Fulfulde, Pulaar, Pular',
],
[
'code' => 'fi',
'code' => 'fi',
'native_name' => 'Suomi, suomen kieli',
],
[
'code' => 'fj',
'code' => 'fj',
'native_name' => 'Vosa Vakaviti',
],
[
'code' => 'fo',
'code' => 'fo',
'native_name' => 'Føroyskt',
],
[
'code' => 'fr',
'code' => 'fr',
'native_name' => 'Français, langue française',
],
[
'code' => 'fy',
'code' => 'fy',
'native_name' => 'Frysk',
],
[
'code' => 'ga',
'code' => 'ga',
'native_name' => 'Gaeilge',
],
[
'code' => 'gd',
'code' => 'gd',
'native_name' => 'Gàidhlig',
],
[
'code' => 'gl',
'code' => 'gl',
'native_name' => 'Galego',
],
[
'code' => 'gn',
'code' => 'gn',
'native_name' => "Avañe'ẽ",
],
[
'code' => 'gu',
'code' => 'gu',
'native_name' => 'ગુજરાતી',
],
[
'code' => 'gv',
'code' => 'gv',
'native_name' => 'Gaelg, Gailck',
],
[
'code' => 'ha',
'code' => 'ha',
'native_name' => '(Hausa) هَوُسَ',
],
[
'code' => 'he',
'code' => 'he',
'native_name' => 'עברית',
],
[
'code' => 'hi',
'code' => 'hi',
'native_name' => 'हिन्दी, हिंदी',
],
[
'code' => 'ho',
'code' => 'ho',
'native_name' => 'Hiri Motu',
],
[
'code' => 'hr',
'code' => 'hr',
'native_name' => 'Hrvatski jezik',
],
[
'code' => 'ht',
'code' => 'ht',
'native_name' => 'Kreyòl ayisyen',
],
[
'code' => 'hu',
'code' => 'hu',
'native_name' => 'Magyar',
],
[
'code' => 'hy',
'code' => 'hy',
'native_name' => 'Հայերեն',
],
[
'code' => 'hz',
'code' => 'hz',
'native_name' => 'Otjiherero',
],
[
'code' => 'ia',
'code' => 'ia',
'native_name' => 'Interlingua',
],
[
'code' => 'id',
'code' => 'id',
'native_name' => 'Bahasa Indonesia',
],
[
'code' => 'ie',
'native_name' =>
'Interlingue, formerly Occidental',
'code' => 'ie',
'native_name' => 'Interlingue, formerly Occidental',
],
[
'code' => 'ig',
'code' => 'ig',
'native_name' => 'Asụsụ Igbo',
],
[
'code' => 'ii',
'code' => 'ii',
'native_name' => 'ꆈꌠ꒿ Nuosuhxop',
],
[
'code' => 'ik',
'code' => 'ik',
'native_name' => 'Iñupiaq, Iñupiatun',
],
[
'code' => 'io',
'code' => 'io',
'native_name' => 'Ido',
],
[
'code' => 'is',
'code' => 'is',
'native_name' => 'Íslenska',
],
[
'code' => 'it',
'code' => 'it',
'native_name' => 'Italiano',
],
[
'code' => 'iu',
'code' => 'iu',
'native_name' => 'ᐃᓄᒃᑎᑐᑦ',
],
[
'code' => 'ja',
'code' => 'ja',
'native_name' => '日本語 (にほんご)',
],
[
'code' => 'jv',
'code' => 'jv',
'native_name' => 'ꦧꦱꦗꦮ, Basa Jawa',
],
[
'code' => 'ka',
'code' => 'ka',
'native_name' => 'ქართული',
],
[
'code' => 'kg',
'code' => 'kg',
'native_name' => 'Kikongo',
],
[
'code' => 'ki',
'code' => 'ki',
'native_name' => 'Gĩkũyũ',
],
[
'code' => 'kj',
'code' => 'kj',
'native_name' => 'Kuanyama',
],
[
'code' => 'kk',
'code' => 'kk',
'native_name' => 'қазақ тілі',
],
[
'code' => 'kl',
'code' => 'kl',
'native_name' => 'Kalaallisut, kalaallit oqaasii',
],
[
'code' => 'km',
'code' => 'km',
'native_name' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ',
],
[
'code' => 'kn',
'code' => 'kn',
'native_name' => 'ಕನ್ನಡ',
],
[
'code' => 'ko',
'code' => 'ko',
'native_name' => '한국어',
],
[
'code' => 'kr',
'code' => 'kr',
'native_name' => 'Kanuri',
],
[
'code' => 'ks',
'code' => 'ks',
'native_name' => 'कश्मीरी, كشميري‎',
],
[
'code' => 'ku',
'code' => 'ku',
'native_name' => 'Kurdî, کوردی‎',
],
[
'code' => 'kv',
'code' => 'kv',
'native_name' => 'коми кыв',
],
[
'code' => 'kw',
'code' => 'kw',
'native_name' => 'Kernewek',
],
[
'code' => 'ky',
'code' => 'ky',
'native_name' => 'Кыргызча, Кыргыз тили',
],
[
'code' => 'la',
'code' => 'la',
'native_name' => 'Latine, lingua latina',
],
[
'code' => 'lb',
'code' => 'lb',
'native_name' => 'Lëtzebuergesch',
],
[
'code' => 'lg',
'code' => 'lg',
'native_name' => 'Luganda',
],
[
'code' => 'li',
'code' => 'li',
'native_name' => 'Limburgs',
],
[
'code' => 'ln',
'code' => 'ln',
'native_name' => 'Lingála',
],
[
'code' => 'lo',
'code' => 'lo',
'native_name' => 'ພາສາລາວ',
],
[
'code' => 'lt',
'code' => 'lt',
'native_name' => 'Lietuvių kalba',
],
[
'code' => 'lu',
'code' => 'lu',
'native_name' => 'Kiluba',
],
[
'code' => 'lv',
'code' => 'lv',
'native_name' => 'Latviešu valoda',
],
[
'code' => 'mg',
'code' => 'mg',
'native_name' => 'Fiteny malagasy',
],
[
'code' => 'mh',
'code' => 'mh',
'native_name' => 'Kajin M̧ajeļ',
],
[
'code' => 'mi',
'code' => 'mi',
'native_name' => 'Te reo Māori',
],
[
'code' => 'mk',
'code' => 'mk',
'native_name' => 'македонски јазик',
],
[
'code' => 'ml',
'code' => 'ml',
'native_name' => 'മലയാളം',
],
[
'code' => 'mn',
'code' => 'mn',
'native_name' => 'Монгол хэл',
],
[
'code' => 'mr',
'code' => 'mr',
'native_name' => 'मराठी',
],
[
'code' => 'ms',
'code' => 'ms',
'native_name' => 'Bahasa Melayu, بهاس ملايو‎',
],
[
'code' => 'mt',
'code' => 'mt',
'native_name' => 'Malti',
],
[
'code' => 'my',
'code' => 'my',
'native_name' => 'ဗမာစာ',
],
[
'code' => 'na',
'code' => 'na',
'native_name' => 'Dorerin Naoero',
],
[
'code' => 'nb',
'code' => 'nb',
'native_name' => 'Norsk Bokmål',
],
[
'code' => 'nd',
'code' => 'nd',
'native_name' => 'isiNdebele',
],
[
'code' => 'ne',
'code' => 'ne',
'native_name' => 'नेपाली',
],
[
'code' => 'ng',
'code' => 'ng',
'native_name' => 'Owambo',
],
[
'code' => 'nl',
'code' => 'nl',
'native_name' => 'Nederlands, Vlaams',
],
[
'code' => 'nn',
'code' => 'nn',
'native_name' => 'Norsk Nynorsk',
],
[
'code' => 'no',
'code' => 'no',
'native_name' => 'Norsk',
],
[
'code' => 'nr',
'code' => 'nr',
'native_name' => 'isiNdebele',
],
[
'code' => 'nv',
'code' => 'nv',
'native_name' => 'Diné bizaad',
],
[
'code' => 'ny',
'code' => 'ny',
'native_name' => 'Chicheŵa, chinyanja',
],
[
'code' => 'oc',
'code' => 'oc',
'native_name' => 'Occitan, lenga dòc',
],
[
'code' => 'oj',
'code' => 'oj',
'native_name' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ',
],
[
'code' => 'om',
'code' => 'om',
'native_name' => 'Afaan Oromoo',
],
[
'code' => 'or',
'code' => 'or',
'native_name' => 'ଓଡ଼ିଆ',
],
[
'code' => 'os',
'code' => 'os',
'native_name' => 'ирон æвзаг',
],
[
'code' => 'pa',
'code' => 'pa',
'native_name' => 'ਪੰਜਾਬੀ, پنجابی‎',
],
[
'code' => 'pi',
'code' => 'pi',
'native_name' => 'पालि, पाळि',
],
[
'code' => 'pl',
'code' => 'pl',
'native_name' => 'język polski, polszczyzna',
],
[
'code' => 'ps',
'code' => 'ps',
'native_name' => 'پښتو',
],
[
'code' => 'pt',
'code' => 'pt',
'native_name' => 'Português',
],
[
'code' => 'qu',
'code' => 'qu',
'native_name' => 'Runa Simi, Kichwa',
],
[
'code' => 'rm',
'code' => 'rm',
'native_name' => 'Rumantsch Grischun',
],
[
'code' => 'rn',
'code' => 'rn',
'native_name' => 'Ikirundi',
],
[
'code' => 'ro',
'code' => 'ro',
'native_name' => 'Română',
],
[
'code' => 'ru',
'code' => 'ru',
'native_name' => 'Pусский',
],
[
'code' => 'rw',
'code' => 'rw',
'native_name' => 'Ikinyarwanda',
],
[
'code' => 'sa',
'code' => 'sa',
'native_name' => 'संस्कृतम्',
],
[
'code' => 'sc',
'code' => 'sc',
'native_name' => 'Sardu',
],
[
'code' => 'sd',
'code' => 'sd',
'native_name' => 'सिन्धी, سنڌي، سندھی‎',
],
[
'code' => 'se',
'code' => 'se',
'native_name' => 'Davvisámegiella',
],
[
'code' => 'sg',
'code' => 'sg',
'native_name' => 'Yângâ tî sängö',
],
[
'code' => 'si',
'code' => 'si',
'native_name' => 'සිංහල',
],
[
'code' => 'sk',
'code' => 'sk',
'native_name' => 'Slovenčina, Slovenský Jazyk',
],
[
'code' => 'sl',
'code' => 'sl',
'native_name' => 'Slovenski Jezik, Slovenščina',
],
[
'code' => 'sm',
'code' => 'sm',
'native_name' => "Gagana fa'a Samoa",
],
[
'code' => 'sn',
'code' => 'sn',
'native_name' => 'chiShona',
],
[
'code' => 'so',
'code' => 'so',
'native_name' => 'Soomaaliga, af Soomaali',
],
[
'code' => 'sq',
'code' => 'sq',
'native_name' => 'Shqip',
],
[
'code' => 'sr',
'code' => 'sr',
'native_name' => 'српски језик',
],
[
'code' => 'ss',
'code' => 'ss',
'native_name' => 'SiSwati',
],
[
'code' => 'st',
'code' => 'st',
'native_name' => 'Sesotho',
],
[
'code' => 'su',
'code' => 'su',
'native_name' => 'Basa Sunda',
],
[
'code' => 'sv',
'code' => 'sv',
'native_name' => 'Svenska',
],
[
'code' => 'sw',
'code' => 'sw',
'native_name' => 'Kiswahili',
],
[
'code' => 'ta',
'code' => 'ta',
'native_name' => 'தமிழ்',
],
[
'code' => 'te',
'code' => 'te',
'native_name' => 'తెలుగు',
],
[
'code' => 'tg',
'code' => 'tg',
'native_name' => 'тоҷикӣ, toçikī, تاجیکی‎',
],
[
'code' => 'th',
'code' => 'th',
'native_name' => 'ไทย',
],
[
'code' => 'ti',
'code' => 'ti',
'native_name' => 'ትግርኛ',
],
[
'code' => 'tk',
'code' => 'tk',
'native_name' => 'Türkmen, Түркмен',
],
[
'code' => 'tl',
'code' => 'tl',
'native_name' => 'Wikang Tagalog',
],
[
'code' => 'tn',
'code' => 'tn',
'native_name' => 'Setswana',
],
[
'code' => 'to',
'code' => 'to',
'native_name' => 'Faka Tonga',
],
[
'code' => 'tr',
'code' => 'tr',
'native_name' => 'Türkçe',
],
[
'code' => 'ts',
'code' => 'ts',
'native_name' => 'Xitsonga',
],
[
'code' => 'tt',
'code' => 'tt',
'native_name' => 'татар теле, tatar tele',
],
[
'code' => 'tw',
'code' => 'tw',
'native_name' => 'Twi',
],
[
'code' => 'ty',
'code' => 'ty',
'native_name' => 'Reo Tahiti',
],
[
'code' => 'ug',
'code' => 'ug',
'native_name' => 'ئۇيغۇرچە‎, Uyghurche',
],
[
'code' => 'uk',
'code' => 'uk',
'native_name' => 'Українська',
],
[
'code' => 'ur',
'code' => 'ur',
'native_name' => 'اردو',
],
[
'code' => 'uz',
'code' => 'uz',
'native_name' => 'Oʻzbek, Ўзбек, أۇزبېك‎',
],
[
'code' => 've',
'code' => 've',
'native_name' => 'Tshivenḓa',
],
[
'code' => 'vi',
'code' => 'vi',
'native_name' => 'Tiếng Việt',
],
[
'code' => 'vo',
'code' => 'vo',
'native_name' => 'Volapük',
],
[
'code' => 'wa',
'code' => 'wa',
'native_name' => 'Walon',
],
[
'code' => 'wo',
'code' => 'wo',
'native_name' => 'Wollof',
],
[
'code' => 'xh',
'code' => 'xh',
'native_name' => 'isiXhosa',
],
[
'code' => 'yi',
'code' => 'yi',
'native_name' => 'ייִדיש',
],
[
'code' => 'yo',
'code' => 'yo',
'native_name' => 'Yorùbá',
],
[
'code' => 'za',
'code' => 'za',
'native_name' => 'Saɯ cueŋƅ, Saw cuengh',
],
[
'code' => 'zh',
'code' => 'zh',
'native_name' => '中文 (Zhōngwén), 汉语, 漢語',
],
[
'code' => 'zu',
'code' => 'zu',
'native_name' => 'isiZulu',
],
];

View File

@ -20,592 +20,583 @@ class PlatformSeeder extends Seeder
{
$podcastingData = [
[
'slug' => 'amazon',
'type' => 'podcasting',
'label' => 'Amazon Music and Audible',
'home_url' => 'https://music.amazon.com/',
'slug' => 'amazon',
'type' => 'podcasting',
'label' => 'Amazon Music and Audible',
'home_url' => 'https://music.amazon.com/',
'submit_url' => 'https://podcasters.amazon.com/',
],
[
'slug' => 'antennapod',
'type' => 'podcasting',
'label' => 'AntennaPod',
'home_url' => 'https://antennapod.org/',
'slug' => 'antennapod',
'type' => 'podcasting',
'label' => 'AntennaPod',
'home_url' => 'https://antennapod.org/',
'submit_url' => 'https://antennapod.org/documentation/podcasters-hosters/add-on-antennapod',
],
[
'slug' => 'apple',
'type' => 'podcasting',
'label' => 'Apple Podcasts',
'home_url' => 'https://www.apple.com/itunes/podcasts/',
'submit_url' =>
'https://podcastsconnect.apple.com/my-podcasts/new-feed',
'slug' => 'apple',
'type' => 'podcasting',
'label' => 'Apple Podcasts',
'home_url' => 'https://www.apple.com/itunes/podcasts/',
'submit_url' => 'https://podcastsconnect.apple.com/my-podcasts/new-feed',
],
[
'slug' => 'blubrry',
'type' => 'podcasting',
'label' => 'Blubrry',
'home_url' => 'https://www.blubrry.com/',
'slug' => 'blubrry',
'type' => 'podcasting',
'label' => 'Blubrry',
'home_url' => 'https://www.blubrry.com/',
'submit_url' => 'https://www.blubrry.com/addpodcast.php',
],
[
'slug' => 'breaker',
'type' => 'podcasting',
'label' => 'Breaker',
'home_url' => 'https://www.breaker.audio/',
'slug' => 'breaker',
'type' => 'podcasting',
'label' => 'Breaker',
'home_url' => 'https://www.breaker.audio/',
'submit_url' => 'https://podcasters.breaker.audio/',
],
[
'slug' => 'castbox',
'type' => 'podcasting',
'label' => 'Castbox',
'home_url' => 'https://castbox.fm/',
'submit_url' =>
'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast',
'slug' => 'castbox',
'type' => 'podcasting',
'label' => 'Castbox',
'home_url' => 'https://castbox.fm/',
'submit_url' => 'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast',
],
[
'slug' => 'castopod',
'type' => 'podcasting',
'label' => 'Castopod',
'home_url' => 'https://castopod.org/',
'slug' => 'castopod',
'type' => 'podcasting',
'label' => 'Castopod',
'home_url' => 'https://castopod.org/',
'submit_url' => 'https://castopod.org/instances',
],
[
'slug' => 'castro',
'type' => 'podcasting',
'label' => 'Castro',
'home_url' => 'http://castro.fm/',
'submit_url' =>
'https://castro.fm/support/link-to-your-podcast-in-castro',
'slug' => 'castro',
'type' => 'podcasting',
'label' => 'Castro',
'home_url' => 'http://castro.fm/',
'submit_url' => 'https://castro.fm/support/link-to-your-podcast-in-castro',
],
[
'slug' => 'chartable',
'type' => 'podcasting',
'label' => 'Chartable',
'home_url' => 'https://chartable.com/',
'slug' => 'chartable',
'type' => 'podcasting',
'label' => 'Chartable',
'home_url' => 'https://chartable.com/',
'submit_url' => 'https://chartable.com/podcasts/submit',
],
[
'slug' => 'deezer',
'type' => 'podcasting',
'label' => 'Deezer',
'home_url' => 'https://www.deezer.com/',
'slug' => 'deezer',
'type' => 'podcasting',
'label' => 'Deezer',
'home_url' => 'https://www.deezer.com/',
'submit_url' => 'https://podcasters.deezer.com/submission',
],
[
'slug' => 'fyyd',
'type' => 'podcasting',
'label' => 'fyyd',
'home_url' => 'https://fyyd.de/',
'slug' => 'fyyd',
'type' => 'podcasting',
'label' => 'fyyd',
'home_url' => 'https://fyyd.de/',
'submit_url' => 'https://fyyd.de/add-feed',
],
[
'slug' => 'google',
'type' => 'podcasting',
'label' => 'Google Podcasts',
'home_url' => 'https://podcasts.google.com/about',
'submit_url' =>
'https://search.google.com/search-console/about',
'slug' => 'google',
'type' => 'podcasting',
'label' => 'Google Podcasts',
'home_url' => 'https://podcasts.google.com/about',
'submit_url' => 'https://search.google.com/search-console/about',
],
[
'slug' => 'ivoox',
'type' => 'podcasting',
'label' => 'Ivoox',
'home_url' => 'https://www.ivoox.com/',
'slug' => 'ivoox',
'type' => 'podcasting',
'label' => 'Ivoox',
'home_url' => 'https://www.ivoox.com/',
'submit_url' => 'http://www.ivoox.com/upload-podcast_u.html',
],
[
'slug' => 'listennotes',
'type' => 'podcasting',
'label' => 'ListenNotes',
'home_url' => 'https://www.listennotes.com/',
'slug' => 'listennotes',
'type' => 'podcasting',
'label' => 'ListenNotes',
'home_url' => 'https://www.listennotes.com/',
'submit_url' => 'https://www.listennotes.com/submit/',
],
[
'slug' => 'overcast',
'type' => 'podcasting',
'label' => 'Overcast',
'home_url' => 'https://overcast.fm/',
'slug' => 'overcast',
'type' => 'podcasting',
'label' => 'Overcast',
'home_url' => 'https://overcast.fm/',
'submit_url' => 'https://overcast.fm/podcasterinfo',
],
[
'slug' => 'playerfm',
'type' => 'podcasting',
'label' => 'Player.Fm',
'home_url' => 'https://player.fm/',
'slug' => 'playerfm',
'type' => 'podcasting',
'label' => 'Player.Fm',
'home_url' => 'https://player.fm/',
'submit_url' => 'https://player.fm/importer/feed',
],
[
'slug' => 'pocketcasts',
'type' => 'podcasting',
'label' => 'Pocketcasts',
'home_url' => 'https://www.pocketcasts.com/',
'slug' => 'pocketcasts',
'type' => 'podcasting',
'label' => 'Pocketcasts',
'home_url' => 'https://www.pocketcasts.com/',
'submit_url' => 'https://www.pocketcasts.com/submit/',
],
[
'slug' => 'podbean',
'type' => 'podcasting',
'label' => 'Podbean',
'home_url' => 'https://www.podbean.com/',
'slug' => 'podbean',
'type' => 'podcasting',
'label' => 'Podbean',
'home_url' => 'https://www.podbean.com/',
'submit_url' => 'https://www.podbean.com/site/submitPodcast',
],
[
'slug' => 'podcastaddict',
'type' => 'podcasting',
'label' => 'Podcast Addict',
'home_url' => 'https://podcastaddict.com/',
'slug' => 'podcastaddict',
'type' => 'podcasting',
'label' => 'Podcast Addict',
'home_url' => 'https://podcastaddict.com/',
'submit_url' => 'https://podcastaddict.com/submit',
],
[
'slug' => 'podcastindex',
'type' => 'podcasting',
'label' => 'Podcast Index',
'home_url' => 'https://podcastindex.org/',
'slug' => 'podcastindex',
'type' => 'podcasting',
'label' => 'Podcast Index',
'home_url' => 'https://podcastindex.org/',
'submit_url' => 'https://podcastindex.org/add',
],
[
'slug' => 'podchaser',
'type' => 'podcasting',
'label' => 'Podchaser',
'home_url' => 'https://www.podchaser.com/',
'slug' => 'podchaser',
'type' => 'podcasting',
'label' => 'Podchaser',
'home_url' => 'https://www.podchaser.com/',
'submit_url' => 'https://www.podchaser.com/creators/edit',
],
[
'slug' => 'podcloud',
'type' => 'podcasting',
'label' => 'podCloud',
'home_url' => 'https://podcloud.fr/',
'slug' => 'podcloud',
'type' => 'podcasting',
'label' => 'podCloud',
'home_url' => 'https://podcloud.fr/',
'submit_url' => 'https://podcloud.fr/studio/podcasts/new',
],
[
'slug' => 'podinstall',
'type' => 'podcasting',
'label' => 'Podinstall',
'home_url' => 'https://www.podinstall.com/',
'slug' => 'podinstall',
'type' => 'podcasting',
'label' => 'Podinstall',
'home_url' => 'https://www.podinstall.com/',
'submit_url' => 'https://www.podinstall.com/claim.html',
],
[
'slug' => 'podlink',
'type' => 'podcasting',
'label' => 'pod.link',
'home_url' => 'https://pod.link/',
'slug' => 'podlink',
'type' => 'podcasting',
'label' => 'pod.link',
'home_url' => 'https://pod.link/',
'submit_url' => 'https://pod.link',
],
[
'slug' => 'podtail',
'type' => 'podcasting',
'label' => 'Podtail',
'home_url' => 'https://podtail.com/',
'slug' => 'podtail',
'type' => 'podcasting',
'label' => 'Podtail',
'home_url' => 'https://podtail.com/',
'submit_url' => 'https://podtail.com/about/faq/',
],
[
'slug' => 'podfriend',
'type' => 'podcasting',
'label' => 'Podfriend',
'home_url' => 'https://www.podfriend.com/',
'slug' => 'podfriend',
'type' => 'podcasting',
'label' => 'Podfriend',
'home_url' => 'https://www.podfriend.com/',
'submit_url' => 'https://podcastindex.org/add',
],
[
'slug' => 'podverse',
'type' => 'podcasting',
'label' => 'Podverse',
'home_url' => 'https://podverse.fm/',
'submit_url' =>
'https://docs.google.com/forms/d/e/1FAIpQLSdewKP-YrE8zGjDPrkmoJEwCxPl_gizEkmzAlTYsiWAuAk1Ng/viewform',
'slug' => 'podverse',
'type' => 'podcasting',
'label' => 'Podverse',
'home_url' => 'https://podverse.fm/',
'submit_url' => 'https://docs.google.com/forms/d/e/1FAIpQLSdewKP-YrE8zGjDPrkmoJEwCxPl_gizEkmzAlTYsiWAuAk1Ng/viewform',
],
[
'slug' => 'radiopublic',
'type' => 'podcasting',
'label' => 'RadioPublic',
'home_url' => 'https://radiopublic.com/',
'slug' => 'radiopublic',
'type' => 'podcasting',
'label' => 'RadioPublic',
'home_url' => 'https://radiopublic.com/',
'submit_url' => 'https://podcasters.radiopublic.com/signup',
],
[
'slug' => 'spotify',
'type' => 'podcasting',
'label' => 'Spotify',
'home_url' => 'https://www.spotify.com/',
'slug' => 'spotify',
'type' => 'podcasting',
'label' => 'Spotify',
'home_url' => 'https://www.spotify.com/',
'submit_url' => 'https://podcasters.spotify.com/submit',
],
[
'slug' => 'spreaker',
'type' => 'podcasting',
'label' => 'Spreaker',
'home_url' => 'https://www.spreaker.com/',
'slug' => 'spreaker',
'type' => 'podcasting',
'label' => 'Spreaker',
'home_url' => 'https://www.spreaker.com/',
'submit_url' => 'https://www.spreaker.com/cms/shows/rss-import',
],
[
'slug' => 'stitcher',
'type' => 'podcasting',
'label' => 'Stitcher',
'home_url' => 'https://www.stitcher.com/',
'slug' => 'stitcher',
'type' => 'podcasting',
'label' => 'Stitcher',
'home_url' => 'https://www.stitcher.com/',
'submit_url' => 'https://partners.stitcher.com/join',
],
[
'slug' => 'tunein',
'type' => 'podcasting',
'label' => 'TuneIn',
'home_url' => 'https://tunein.com/',
'submit_url' =>
'https://help.tunein.com/contact/add-podcast-S19TR3Sdf',
'slug' => 'tunein',
'type' => 'podcasting',
'label' => 'TuneIn',
'home_url' => 'https://tunein.com/',
'submit_url' => 'https://help.tunein.com/contact/add-podcast-S19TR3Sdf',
],
[
'slug' => 'anytime',
'type' => 'podcasting',
'label' => 'Anytime Podcast Player',
'home_url' => 'https://anytimeplayer.app/',
'slug' => 'anytime',
'type' => 'podcasting',
'label' => 'Anytime Podcast Player',
'home_url' => 'https://anytimeplayer.app/',
'submit_url' => '',
],
[
'slug' => 'breez',
'type' => 'podcasting',
'label' => 'Breez',
'home_url' => 'https://breez.technology/',
'slug' => 'breez',
'type' => 'podcasting',
'label' => 'Breez',
'home_url' => 'https://breez.technology/',
'submit_url' => '',
],
[
'slug' => 'castamatic',
'type' => 'podcasting',
'label' => 'Castamatic',
'home_url' => 'https://castamatic.com/',
'slug' => 'castamatic',
'type' => 'podcasting',
'label' => 'Castamatic',
'home_url' => 'https://castamatic.com/',
'submit_url' => '',
],
[
'slug' => 'castcoverage',
'type' => 'podcasting',
'label' => 'CastCoverage',
'home_url' => 'http://castcoverage.com/',
'slug' => 'castcoverage',
'type' => 'podcasting',
'label' => 'CastCoverage',
'home_url' => 'http://castcoverage.com/',
'submit_url' => '',
],
[
'slug' => 'curiocaster',
'type' => 'podcasting',
'label' => 'CurioCaster',
'home_url' => 'https://curiocaster.com/',
'slug' => 'curiocaster',
'type' => 'podcasting',
'label' => 'CurioCaster',
'home_url' => 'https://curiocaster.com/',
'submit_url' => '',
],
[
'slug' => 'escapepod',
'type' => 'podcasting',
'label' => 'Escapepod',
'home_url' => 'http://y20k.org/escapepod/',
'slug' => 'escapepod',
'type' => 'podcasting',
'label' => 'Escapepod',
'home_url' => 'http://y20k.org/escapepod/',
'submit_url' => '',
],
[
'slug' => 'fountain',
'type' => 'podcasting',
'label' => 'Fountain',
'home_url' => 'https://www.fountain.fm/',
'slug' => 'fountain',
'type' => 'podcasting',
'label' => 'Fountain',
'home_url' => 'https://www.fountain.fm/',
'submit_url' => '',
],
[
'slug' => 'gpodder',
'type' => 'podcasting',
'label' => 'gPodder',
'home_url' => 'https://gpodder.org/',
'slug' => 'gpodder',
'type' => 'podcasting',
'label' => 'gPodder',
'home_url' => 'https://gpodder.org/',
'submit_url' => '',
],
[
'slug' => 'hypercatcher',
'type' => 'podcasting',
'label' => 'HyperCatcher',
'home_url' => 'https://hypercatcher.com/',
'slug' => 'hypercatcher',
'type' => 'podcasting',
'label' => 'HyperCatcher',
'home_url' => 'https://hypercatcher.com/',
'submit_url' => '',
],
[
'slug' => 'ivyfm',
'type' => 'podcasting',
'label' => 'Ivy Podcast Discovery',
'home_url' => 'https://ivy.fm/',
'slug' => 'ivyfm',
'type' => 'podcasting',
'label' => 'Ivy Podcast Discovery',
'home_url' => 'https://ivy.fm/',
'submit_url' => '',
],
[
'slug' => 'jumplink',
'type' => 'podcasting',
'label' => 'JumpLink',
'home_url' => 'https://jump.link/',
'slug' => 'jumplink',
'type' => 'podcasting',
'label' => 'JumpLink',
'home_url' => 'https://jump.link/',
'submit_url' => 'https://jump.link/a/accounts/signup/',
],
[
'slug' => 'kasts',
'type' => 'podcasting',
'label' => 'Kasts',
'home_url' => 'https://apps.kde.org/kasts/',
'slug' => 'kasts',
'type' => 'podcasting',
'label' => 'Kasts',
'home_url' => 'https://apps.kde.org/kasts/',
'submit_url' => '',
],
[
'slug' => 'playapod',
'type' => 'podcasting',
'label' => 'Playapod',
'home_url' => 'https://playapod.com/',
'slug' => 'playapod',
'type' => 'podcasting',
'label' => 'Playapod',
'home_url' => 'https://playapod.com/',
'submit_url' => '',
],
[
'slug' => 'plink',
'type' => 'podcasting',
'label' => 'Plink',
'home_url' => 'https://plinkhq.com/',
'slug' => 'plink',
'type' => 'podcasting',
'label' => 'Plink',
'home_url' => 'https://plinkhq.com/',
'submit_url' => '',
],
[
'slug' => 'podcastchapters',
'type' => 'podcasting',
'label' => 'Podcast Chapters',
'home_url' => 'https://chaptersapp.com/',
'slug' => 'podcastchapters',
'type' => 'podcasting',
'label' => 'Podcast Chapters',
'home_url' => 'https://chaptersapp.com/',
'submit_url' => '',
],
[
'slug' => 'podcastguru',
'type' => 'podcasting',
'label' => 'Podcast Guru',
'home_url' => 'https://podcastguru.io/',
'slug' => 'podcastguru',
'type' => 'podcasting',
'label' => 'Podcast Guru',
'home_url' => 'https://podcastguru.io/',
'submit_url' => 'https://podcastguru.io/promote-your-podcast/',
],
[
'slug' => 'podlp',
'type' => 'podcasting',
'label' => 'PodLP',
'home_url' => 'https://podlp.com/',
'slug' => 'podlp',
'type' => 'podcasting',
'label' => 'PodLP',
'home_url' => 'https://podlp.com/',
'submit_url' => 'https://podlp.com/submit.html',
],
[
'slug' => 'podnews',
'type' => 'podcasting',
'label' => 'podnews',
'home_url' => 'https://podnews.net/podcast/subscribe-pages',
'slug' => 'podnews',
'type' => 'podcasting',
'label' => 'podnews',
'home_url' => 'https://podnews.net/podcast/subscribe-pages',
'submit_url' => '',
],
[
'slug' => 'podstation',
'type' => 'podcasting',
'label' => 'podStation',
'home_url' => 'https://podstation.github.io/',
'slug' => 'podstation',
'type' => 'podcasting',
'label' => 'podStation',
'home_url' => 'https://podstation.github.io/',
'submit_url' => '',
],
[
'slug' => 'sphinxchat',
'type' => 'podcasting',
'label' => 'Sphinx',
'home_url' => 'https://sphinx.chat/',
'slug' => 'sphinxchat',
'type' => 'podcasting',
'label' => 'Sphinx',
'home_url' => 'https://sphinx.chat/',
'submit_url' => '',
],
[
'slug' => 'tsacdop',
'type' => 'podcasting',
'label' => 'Tsacdop',
'home_url' => 'https://www.tsacdop.app/',
'slug' => 'tsacdop',
'type' => 'podcasting',
'label' => 'Tsacdop',
'home_url' => 'https://www.tsacdop.app/',
'submit_url' => '',
],
[
'slug' => 'zion',
'type' => 'podcasting',
'label' => 'Zion',
'home_url' => 'https://getzion.com/',
'slug' => 'zion',
'type' => 'podcasting',
'label' => 'Zion',
'home_url' => 'https://getzion.com/',
'submit_url' => 'https://shop.n2n2.chat/',
],
];
$fundingData = [
[
'slug' => 'paypal',
'type' => 'funding',
'label' => 'Paypal',
'home_url' => 'https://www.paypal.com/',
'slug' => 'paypal',
'type' => 'funding',
'label' => 'Paypal',
'home_url' => 'https://www.paypal.com/',
'submit_url' => 'https://www.paypal.com/paypalme/my/grab',
],
[
'slug' => 'fosspay',
'type' => 'funding',
'label' => 'fosspay',
'home_url' => 'https://git.sr.ht/~sircmpwn/fosspay',
'slug' => 'fosspay',
'type' => 'funding',
'label' => 'fosspay',
'home_url' => 'https://git.sr.ht/~sircmpwn/fosspay',
'submit_url' => '',
],
[
'slug' => 'gofundme',
'type' => 'funding',
'label' => 'GoFundMe',
'home_url' => 'https://www.gofundme.com/',
'slug' => 'gofundme',
'type' => 'funding',
'label' => 'GoFundMe',
'home_url' => 'https://www.gofundme.com/',
'submit_url' => 'https://www.gofundme.com/sign-up',
],
[
'slug' => 'helloasso',
'type' => 'funding',
'label' => 'helloasso',
'home_url' => 'https://www.helloasso.com/',
'slug' => 'helloasso',
'type' => 'funding',
'label' => 'helloasso',
'home_url' => 'https://www.helloasso.com/',
'submit_url' => 'https://auth.helloasso.com/inscription',
],
[
'slug' => 'indiegogo',
'type' => 'funding',
'label' => 'Indiegogo',
'home_url' => 'https://www.indiegogo.com/',
'slug' => 'indiegogo',
'type' => 'funding',
'label' => 'Indiegogo',
'home_url' => 'https://www.indiegogo.com/',
'submit_url' => 'https://www.indiegogo.com/start-a-campaign#/',
],
[
'slug' => 'kickstarter',
'type' => 'funding',
'label' => 'Kickstarter',
'home_url' => 'https://www.kickstarter.com/',
'slug' => 'kickstarter',
'type' => 'funding',
'label' => 'Kickstarter',
'home_url' => 'https://www.kickstarter.com/',
'submit_url' => 'https://www.kickstarter.com/learn',
],
[
'slug' => 'kisskissbankbank',
'type' => 'funding',
'label' => 'KissKissBankBank',
'home_url' => 'https://www.kisskissbankbank.com/',
'submit_url' =>
'https://www.kisskissbankbank.com/en/financer-mon-projet',
'slug' => 'kisskissbankbank',
'type' => 'funding',
'label' => 'KissKissBankBank',
'home_url' => 'https://www.kisskissbankbank.com/',
'submit_url' => 'https://www.kisskissbankbank.com/en/financer-mon-projet',
],
[
'slug' => 'liberapay',
'type' => 'funding',
'label' => 'Liberapay',
'home_url' => 'https://liberapay.com/',
'slug' => 'liberapay',
'type' => 'funding',
'label' => 'Liberapay',
'home_url' => 'https://liberapay.com/',
'submit_url' => 'https://liberapay.com/sign-up',
],
[
'slug' => 'patreon',
'type' => 'funding',
'label' => 'Patreon',
'home_url' => 'https://www.patreon.com/',
'slug' => 'patreon',
'type' => 'funding',
'label' => 'Patreon',
'home_url' => 'https://www.patreon.com/',
'submit_url' => 'https://www.patreon.com/create',
],
[
'slug' => 'tipeee',
'type' => 'funding',
'label' => 'Tipeee',
'home_url' => 'https://tipeee.com/',
'slug' => 'tipeee',
'type' => 'funding',
'label' => 'Tipeee',
'home_url' => 'https://tipeee.com/',
'submit_url' => 'https://tipeee.com/register/',
],
[
'slug' => 'ulule',
'type' => 'funding',
'label' => 'Ulule',
'home_url' => 'https://www.ulule.com/',
'slug' => 'ulule',
'type' => 'funding',
'label' => 'Ulule',
'home_url' => 'https://www.ulule.com/',
'submit_url' => 'https://www.ulule.com/projects/create/#/',
],
];
$socialData = [
[
'slug' => 'discord',
'type' => 'social',
'label' => 'Discord',
'home_url' => 'https://discord.com/',
'slug' => 'discord',
'type' => 'social',
'label' => 'Discord',
'home_url' => 'https://discord.com/',
'submit_url' => 'https://discord.com/register',
],
[
'slug' => 'facebook',
'type' => 'social',
'label' => 'Facebook',
'home_url' => 'https://www.facebook.com/',
'submit_url' =>
'https://www.facebook.com/pages/creation/?ref_type=comet_home',
'slug' => 'facebook',
'type' => 'social',
'label' => 'Facebook',
'home_url' => 'https://www.facebook.com/',
'submit_url' => 'https://www.facebook.com/pages/creation/?ref_type=comet_home',
],
[
'slug' => 'funkwhale',
'type' => 'social',
'label' => 'Funkwhale',
'home_url' => 'https://funkwhale.audio/',
'slug' => 'funkwhale',
'type' => 'social',
'label' => 'Funkwhale',
'home_url' => 'https://funkwhale.audio/',
'submit_url' => 'https://network.funkwhale.audio/dashboards/',
],
[
'slug' => 'instagram',
'type' => 'social',
'label' => 'Instagram',
'home_url' => 'https://www.instagram.com/',
'submit_url' =>
'https://www.instagram.com/accounts/emailsignup/',
'slug' => 'instagram',
'type' => 'social',
'label' => 'Instagram',
'home_url' => 'https://www.instagram.com/',
'submit_url' => 'https://www.instagram.com/accounts/emailsignup/',
],
[
'slug' => 'linkedin',
'type' => 'social',
'label' => 'LinkedIn',
'home_url' => 'https://www.linkedin.com/',
'slug' => 'linkedin',
'type' => 'social',
'label' => 'LinkedIn',
'home_url' => 'https://www.linkedin.com/',
'submit_url' => 'https://www.linkedin.com/company/setup/new/',
],
[
'slug' => 'mastodon',
'type' => 'social',
'label' => 'Mastodon',
'home_url' => 'https://joinmastodon.org/',
'slug' => 'mastodon',
'type' => 'social',
'label' => 'Mastodon',
'home_url' => 'https://joinmastodon.org/',
'submit_url' => 'https://joinmastodon.org/communities',
],
[
'slug' => 'misskey',
'type' => 'social',
'label' => 'Misskey',
'home_url' => 'https://join.misskey.page/',
'slug' => 'misskey',
'type' => 'social',
'label' => 'Misskey',
'home_url' => 'https://join.misskey.page/',
'submit_url' => 'https://join.misskey.page/en-US/instances',
],
[
'slug' => 'mobilizon',
'type' => 'social',
'label' => 'Mobilizon',
'home_url' => 'https://joinmobilizon.org/',
'slug' => 'mobilizon',
'type' => 'social',
'label' => 'Mobilizon',
'home_url' => 'https://joinmobilizon.org/',
'submit_url' => 'https://instances.joinmobilizon.org/instances',
],
[
'slug' => 'peertube',
'type' => 'social',
'label' => 'PeerTube',
'home_url' => 'https://joinpeertube.org/',
'slug' => 'peertube',
'type' => 'social',
'label' => 'PeerTube',
'home_url' => 'https://joinpeertube.org/',
'submit_url' => 'https://joinpeertube.org/instances',
],
[
'slug' => 'pixelfed',
'type' => 'social',
'label' => 'Pixelfed',
'home_url' => 'https://pixelfed.org/',
'slug' => 'pixelfed',
'type' => 'social',
'label' => 'Pixelfed',
'home_url' => 'https://pixelfed.org/',
'submit_url' => 'https://beta.joinpixelfed.org/',
],
[
'slug' => 'pleroma',
'type' => 'social',
'label' => 'Pleroma',
'home_url' => 'https://pleroma.social/',
'slug' => 'pleroma',
'type' => 'social',
'label' => 'Pleroma',
'home_url' => 'https://pleroma.social/',
'submit_url' => 'https://pleroma.social/#featured-instances',
],
[
'slug' => 'plume',
'type' => 'social',
'label' => 'Plume',
'home_url' => 'https://joinplu.me/',
'slug' => 'plume',
'type' => 'social',
'label' => 'Plume',
'home_url' => 'https://joinplu.me/',
'submit_url' => 'https://joinplu.me/#instances',
],
[
'slug' => 'slack',
'type' => 'social',
'label' => 'Slack',
'home_url' => 'https://slack.com/',
'slug' => 'slack',
'type' => 'social',
'label' => 'Slack',
'home_url' => 'https://slack.com/',
'submit_url' => 'https://slack.com/get-started#/create',
],
[
'slug' => 'twitch',
'type' => 'social',
'label' => 'Twitch',
'home_url' => 'https://www.twitch.tv/',
'slug' => 'twitch',
'type' => 'social',
'label' => 'Twitch',
'home_url' => 'https://www.twitch.tv/',
'submit_url' => 'https://www.twitch.tv/signup',
],
[
'slug' => 'twitter',
'type' => 'social',
'label' => 'Twitter',
'home_url' => 'https://twitter.com/',
'slug' => 'twitter',
'type' => 'social',
'label' => 'Twitter',
'home_url' => 'https://twitter.com/',
'submit_url' => 'https://twitter.com/i/flow/signup',
],
[
'slug' => 'writefreely',
'type' => 'social',
'label' => 'WriteFreely',
'home_url' => 'https://writefreely.org/',
'slug' => 'writefreely',
'type' => 'social',
'label' => 'WriteFreely',
'home_url' => 'https://writefreely.org/',
'submit_url' => 'https://writefreely.org/instances',
],
[
'slug' => 'youtube',
'type' => 'social',
'label' => 'Youtube',
'home_url' => 'https://www.youtube.com/',
'slug' => 'youtube',
'type' => 'social',
'label' => 'Youtube',
'home_url' => 'https://www.youtube.com/',
'submit_url' => 'https://creatoracademy.youtube.com/page/home',
],
];

View File

@ -25,17 +25,17 @@ class TestSeeder extends Seeder
*/
$this->db->table('users')
->insert([
'id' => 1,
'id' => 1,
'username' => 'admin',
'is_owner' => 1,
]);
$this->db->table('auth_identities')
->insert([
'id' => 1,
'id' => 1,
'user_id' => 1,
'type' => 'email_password',
'secret' => 'admin@example.com',
'type' => 'email_password',
'secret' => 'admin@example.com',
'secret2' => '$2y$10$TXJEHX/djW8jtzgpDVf7dOOCGo5rv1uqtAYWdwwwkttQcDkAeB2.6',
]);
@ -43,7 +43,7 @@ class TestSeeder extends Seeder
->table('auth_groups_users')
->insert([
'user_id' => 1,
'group' => setting('AuthGroups.mostPowerfulGroup'),
'group' => setting('AuthGroups.mostPowerfulGroup'),
]);
}
}

View File

@ -29,10 +29,10 @@ class Category extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'parent_id' => '?integer',
'code' => 'string',
'apple_category' => 'string',
'id' => 'integer',
'parent_id' => '?integer',
'code' => 'string',
'apple_category' => 'string',
'google_category' => 'string',
];

View File

@ -65,17 +65,17 @@ class BaseClip extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'id' => 'integer',
'podcast_id' => 'integer',
'episode_id' => 'integer',
'title' => 'string',
'title' => 'string',
'start_time' => 'double',
'duration' => 'double',
'type' => 'string',
'media_id' => '?integer',
'metadata' => '?json-array',
'status' => 'string',
'logs' => 'string',
'duration' => 'double',
'type' => 'string',
'media_id' => '?integer',
'metadata' => '?json-array',
'status' => 'string',
'logs' => 'string',
'created_by' => 'integer',
'updated_by' => 'integer',
];
@ -132,11 +132,11 @@ class BaseClip extends Entity
(new MediaModel('audio'))->updateMedia($this->getMedia());
} else {
$media = new Audio([
'file_key' => $fileKey,
'file_key' => $fileKey,
'language_code' => $this->getPodcast()
->language_code,
'uploaded_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'],
]);
$media->setFile($file);

View File

@ -71,11 +71,11 @@ class VideoClip extends BaseClip
}
$video = new Video([
'file_key' => $fileKey,
'file_key' => $fileKey,
'language_code' => $this->getPodcast()
->language_code,
'uploaded_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'],
]);
$video->setFile($file);

View File

@ -45,12 +45,12 @@ class Credit extends Entity
* @var array<string, string>
*/
protected $casts = [
'podcast_id' => 'integer',
'episode_id' => '?integer',
'person_id' => 'integer',
'full_name' => 'string',
'podcast_id' => 'integer',
'episode_id' => '?integer',
'person_id' => 'integer',
'full_name' => 'string',
'person_group' => 'string',
'person_role' => 'string',
'person_role' => 'string',
];
public function getPerson(): ?Person

View File

@ -147,34 +147,34 @@ class Episode extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'podcast_id' => 'integer',
'guid' => 'string',
'slug' => 'string',
'title' => 'string',
'audio_id' => 'integer',
'description_markdown' => 'string',
'description_html' => 'string',
'cover_id' => '?integer',
'transcript_id' => '?integer',
'id' => 'integer',
'podcast_id' => 'integer',
'guid' => 'string',
'slug' => 'string',
'title' => 'string',
'audio_id' => 'integer',
'description_markdown' => 'string',
'description_html' => 'string',
'cover_id' => '?integer',
'transcript_id' => '?integer',
'transcript_remote_url' => '?string',
'chapters_id' => '?integer',
'chapters_remote_url' => '?string',
'parental_advisory' => '?string',
'number' => '?integer',
'season_number' => '?integer',
'type' => 'string',
'is_blocked' => 'boolean',
'location_name' => '?string',
'location_geo' => '?string',
'location_osm' => '?string',
'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean',
'posts_count' => 'integer',
'comments_count' => 'integer',
'is_premium' => 'boolean',
'created_by' => 'integer',
'updated_by' => 'integer',
'chapters_id' => '?integer',
'chapters_remote_url' => '?string',
'parental_advisory' => '?string',
'number' => '?integer',
'season_number' => '?integer',
'type' => 'string',
'is_blocked' => 'boolean',
'location_name' => '?string',
'location_geo' => '?string',
'location_osm' => '?string',
'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean',
'posts_count' => 'integer',
'comments_count' => 'integer',
'is_premium' => 'boolean',
'created_by' => 'integer',
'updated_by' => 'integer',
];
public function setCover(UploadedFile | File $file = null): self
@ -192,10 +192,10 @@ class Episode extends Entity
} else {
$cover = new Image([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '.' . $file->getExtension(),
'sizes' => config('Images')
'sizes' => config('Images')
->podcastCoverSizes,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$cover->setFile($file);
@ -244,7 +244,7 @@ class Episode extends Entity
'language_code' => $this->getPodcast()
->language_code,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$audio->setFile($file);
@ -277,11 +277,11 @@ class Episode extends Entity
(new MediaModel('transcript'))->updateMedia($this->getTranscript());
} else {
$transcript = new Transcript([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-transcript.' . $file->getExtension(),
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-transcript.' . $file->getExtension(),
'language_code' => $this->getPodcast()
->language_code,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$transcript->setFile($file);
@ -314,11 +314,11 @@ class Episode extends Entity
(new MediaModel('chapters'))->updateMedia($this->getChapters());
} else {
$chapters = new Chapters([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-chapters' . '.' . $file->getExtension(),
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-chapters' . '.' . $file->getExtension(),
'language_code' => $this->getPodcast()
->language_code,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$chapters->setFile($file);
@ -471,7 +471,7 @@ class Episode extends Entity
public function setDescriptionMarkdown(string $descriptionMarkdown): static
{
$config = [
'html_input' => 'escape',
'html_input' => 'escape',
'allow_unsafe_links' => false,
];

View File

@ -59,17 +59,17 @@ class EpisodeComment extends UuidEntity
* @var array<string, string>
*/
protected $casts = [
'id' => 'string',
'uri' => 'string',
'episode_id' => 'integer',
'actor_id' => 'integer',
'id' => 'string',
'uri' => 'string',
'episode_id' => 'integer',
'actor_id' => 'integer',
'in_reply_to_id' => '?string',
'message' => 'string',
'message_html' => 'string',
'likes_count' => 'integer',
'replies_count' => 'integer',
'created_by' => 'integer',
'is_from_post' => 'boolean',
'message' => 'string',
'message_html' => 'string',
'likes_count' => 'integer',
'replies_count' => 'integer',
'created_by' => 'integer',
'is_from_post' => 'boolean',
];
public function getEpisode(): ?Episode

View File

@ -22,7 +22,7 @@ class Language extends Entity
* @var array<string, string>
*/
protected $casts = [
'code' => 'string',
'code' => 'string',
'native_name' => 'string',
];
}

View File

@ -27,7 +27,7 @@ class Like extends UuidEntity
* @var array<string, string>
*/
protected $casts = [
'actor_id' => 'integer',
'actor_id' => 'integer',
'comment_id' => 'string',
];
}

View File

@ -47,10 +47,10 @@ class Location extends Entity
}
parent::__construct([
'name' => $name,
'geo' => $geo,
'osm' => $osm,
'latitude' => $latitude,
'name' => $name,
'geo' => $geo,
'osm' => $osm,
'latitude' => $latitude,
'longitude' => $longitude,
]);
}
@ -93,7 +93,7 @@ class Location extends Entity
[
'headers' => [
'User-Agent' => 'Castopod/' . CP_VERSION,
'Accept' => 'application/json',
'Accept' => 'application/json',
],
],
);

View File

@ -40,11 +40,11 @@ class Page extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'title' => 'string',
'slug' => 'string',
'id' => 'integer',
'title' => 'string',
'slug' => 'string',
'content_markdown' => 'string',
'content_html' => 'string',
'content_html' => 'string',
];
public function getLink(): string

View File

@ -42,15 +42,15 @@ class Person extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'full_name' => 'string',
'unique_name' => 'string',
'id' => 'integer',
'full_name' => 'string',
'unique_name' => 'string',
'information_url' => '?string',
'avatar_id' => '?int',
'podcast_id' => '?integer',
'episode_id' => '?integer',
'created_by' => 'integer',
'updated_by' => 'integer',
'avatar_id' => '?int',
'podcast_id' => '?integer',
'episode_id' => '?integer',
'created_by' => 'integer',
'updated_by' => 'integer',
];
/**
@ -71,10 +71,10 @@ class Person extends Entity
} else {
$avatar = new Image([
'file_key' => 'persons/' . $this->attributes['unique_name'] . '.' . $file->getExtension(),
'sizes' => config('Images')
'sizes' => config('Images')
->personAvatarSizes,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$avatar->setFile($file);

View File

@ -29,14 +29,14 @@ class Platform extends Entity
* @var array<string, string>
*/
protected $casts = [
'slug' => 'string',
'type' => 'string',
'label' => 'string',
'home_url' => 'string',
'submit_url' => '?string',
'link_url' => '?string',
'account_id' => '?string',
'is_visible' => '?boolean',
'slug' => 'string',
'type' => 'string',
'label' => 'string',
'home_url' => 'string',
'submit_url' => '?string',
'link_url' => '?string',
'account_id' => '?string',
'is_visible' => '?boolean',
'is_on_embed' => '?boolean',
];
}

View File

@ -172,42 +172,42 @@ class Podcast extends Entity
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'guid' => 'string',
'actor_id' => 'integer',
'handle' => 'string',
'title' => 'string',
'description_markdown' => 'string',
'description_html' => 'string',
'cover_id' => 'int',
'banner_id' => '?int',
'language_code' => 'string',
'category_id' => 'integer',
'parental_advisory' => '?string',
'publisher' => '?string',
'owner_name' => 'string',
'owner_email' => 'string',
'type' => 'string',
'copyright' => '?string',
'id' => 'integer',
'guid' => 'string',
'actor_id' => 'integer',
'handle' => 'string',
'title' => 'string',
'description_markdown' => 'string',
'description_html' => 'string',
'cover_id' => 'int',
'banner_id' => '?int',
'language_code' => 'string',
'category_id' => 'integer',
'parental_advisory' => '?string',
'publisher' => '?string',
'owner_name' => 'string',
'owner_email' => 'string',
'type' => 'string',
'copyright' => '?string',
'episode_description_footer_markdown' => '?string',
'episode_description_footer_html' => '?string',
'is_blocked' => 'boolean',
'is_completed' => 'boolean',
'is_locked' => 'boolean',
'is_premium_by_default' => 'boolean',
'imported_feed_url' => '?string',
'new_feed_url' => '?string',
'location_name' => '?string',
'location_geo' => '?string',
'location_osm' => '?string',
'payment_pointer' => '?string',
'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean',
'partner_id' => '?string',
'partner_link_url' => '?string',
'partner_image_url' => '?string',
'created_by' => 'integer',
'updated_by' => 'integer',
'episode_description_footer_html' => '?string',
'is_blocked' => 'boolean',
'is_completed' => 'boolean',
'is_locked' => 'boolean',
'is_premium_by_default' => 'boolean',
'imported_feed_url' => '?string',
'new_feed_url' => '?string',
'location_name' => '?string',
'location_geo' => '?string',
'location_osm' => '?string',
'payment_pointer' => '?string',
'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean',
'partner_id' => '?string',
'partner_link_url' => '?string',
'partner_image_url' => '?string',
'created_by' => 'integer',
'updated_by' => 'integer',
];
public function getAtHandle(): string
@ -244,10 +244,10 @@ class Podcast extends Entity
} else {
$cover = new Image([
'file_key' => 'podcasts/' . $this->attributes['handle'] . '/cover.' . $file->getExtension(),
'sizes' => config('Images')
'sizes' => config('Images')
->podcastCoverSizes,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$cover->setFile($file);
@ -281,10 +281,10 @@ class Podcast extends Entity
} else {
$banner = new Image([
'file_key' => 'podcasts/' . $this->attributes['handle'] . '/banner.' . $file->getExtension(),
'sizes' => config('Images')
'sizes' => config('Images')
->podcastBannerSizes,
'uploaded_by' => user_id(),
'updated_by' => user_id(),
'updated_by' => user_id(),
]);
$banner->setFile($file);
@ -420,7 +420,7 @@ class Podcast extends Entity
public function setDescriptionMarkdown(string $descriptionMarkdown): static
{
$config = [
'html_input' => 'escape',
'html_input' => 'escape',
'allow_unsafe_links' => false,
];
@ -452,7 +452,7 @@ class Podcast extends Entity
}
$config = [
'html_input' => 'escape',
'html_input' => 'escape',
'allow_unsafe_links' => false,
];

View File

@ -26,18 +26,18 @@ class Post extends FediversePost
* @var array<string, string>
*/
protected $casts = [
'id' => 'string',
'uri' => 'string',
'actor_id' => 'integer',
'in_reply_to_id' => '?string',
'reblog_of_id' => '?string',
'episode_id' => '?integer',
'message' => 'string',
'message_html' => 'string',
'id' => 'string',
'uri' => 'string',
'actor_id' => 'integer',
'in_reply_to_id' => '?string',
'reblog_of_id' => '?string',
'episode_id' => '?integer',
'message' => 'string',
'message_html' => 'string',
'favourites_count' => 'integer',
'reblogs_count' => 'integer',
'replies_count' => 'integer',
'created_by' => 'integer',
'reblogs_count' => 'integer',
'replies_count' => 'integer',
'created_by' => 'integer',
];
/**

View File

@ -57,14 +57,13 @@ if (! function_exists('data_table')) {
$template = [
'table_open' => '<table class="w-full whitespace-nowrap">',
'thead_open' =>
'<thead class="text-xs font-semibold text-left uppercase text-skin-muted">',
'thead_open' => '<thead class="text-xs font-semibold text-left uppercase text-skin-muted">',
'heading_cell_start' => '<th class="px-4 py-2">',
'cell_start' => '<td class="px-4 py-2">',
'cell_alt_start' => '<td class="px-4 py-2">',
'cell_start' => '<td class="px-4 py-2">',
'cell_alt_start' => '<td class="px-4 py-2">',
'row_start' => '<tr class="border-t border-subtle hover:bg-base">',
'row_start' => '<tr class="border-t border-subtle hover:bg-base">',
'row_alt_start' => '<tr class="border-t border-subtle hover:bg-base">',
];
@ -91,8 +90,8 @@ if (! function_exists('data_table')) {
$table->addRow([
[
'colspan' => count($tableHeaders),
'class' => 'px-4 py-2 italic font-semibold text-center',
'data' => lang('Common.no_data'),
'class' => 'px-4 py-2 italic font-semibold text-center',
'data' => lang('Common.no_data'),
],
]);
}
@ -114,18 +113,18 @@ if (! function_exists('publication_pill')) {
function publication_pill(?Time $publicationDate, string $publicationStatus, string $customClass = ''): string
{
$class = match ($publicationStatus) {
'published' => 'text-pine-500 border-pine-500 bg-pine-50',
'scheduled' => 'text-red-600 border-red-600 bg-red-50',
'with_podcast' => 'text-blue-600 border-blue-600 bg-blue-50',
'published' => 'text-pine-500 border-pine-500 bg-pine-50',
'scheduled' => 'text-red-600 border-red-600 bg-red-50',
'with_podcast' => 'text-blue-600 border-blue-600 bg-blue-50',
'not_published' => 'text-gray-600 border-gray-600 bg-gray-50',
default => 'text-gray-600 border-gray-600 bg-gray-50',
default => 'text-gray-600 border-gray-600 bg-gray-50',
};
$title = match ($publicationStatus) {
'published', 'scheduled' => (string) $publicationDate,
'with_podcast' => lang('Episode.with_podcast_hint'),
'with_podcast' => lang('Episode.with_podcast_hint'),
'not_published' => '',
default => '',
default => '',
};
$label = lang('Episode.publication_status.' . $publicationStatus);
@ -300,11 +299,10 @@ if (! function_exists('location_link')) {
$location->url,
icon('map-pin', 'mr-2 flex-shrink-0') . '<span class="truncate">' . esc($location->name) . '</span>',
[
'class' =>
'w-full overflow-hidden inline-flex items-baseline hover:underline focus:ring-accent' .
'class' => 'w-full overflow-hidden inline-flex items-baseline hover:underline focus:ring-accent' .
($class === '' ? '' : " {$class}"),
'target' => '_blank',
'rel' => 'noreferrer noopener',
'rel' => 'noreferrer noopener',
],
);
}
@ -460,15 +458,15 @@ if (! function_exists('downloads_abbr')) {
$option = match (true) {
$downloads < 1_000_000 => [
'divider' => 1_000,
'suffix' => 'K',
'suffix' => 'K',
],
$downloads < 1_000_000_000 => [
'divider' => 1_000_000,
'suffix' => 'M',
'suffix' => 'M',
],
default => [
'divider' => 1_000_000_000,
'suffix' => 'B',
'suffix' => 'B',
],
};
$formatter = new NumberFormatter(service('request')->getLocale(), NumberFormatter::DECIMAL);

View File

@ -43,19 +43,19 @@ if (! function_exists('write_audio_file_tags')) {
// populate data array
$TagData = [
'title' => [esc($episode->title)],
'title' => [esc($episode->title)],
'artist' => [
$episode->podcast->publisher === null
? esc($episode->podcast->owner_name)
: $episode->podcast->publisher,
],
'album' => [esc($episode->podcast->title)],
'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''],
'genre' => ['Podcast'],
'comment' => [$episode->description],
'track_number' => [(string) $episode->number],
'album' => [esc($episode->podcast->title)],
'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''],
'genre' => ['Podcast'],
'comment' => [$episode->description],
'track_number' => [(string) $episode->number],
'copyright_message' => [$episode->podcast->copyright],
'publisher' => [
'publisher' => [
$episode->podcast->publisher === null
? esc($episode->podcast->owner_name)
: $episode->podcast->publisher,
@ -73,9 +73,9 @@ if (! function_exists('write_audio_file_tags')) {
$TagData['attached_picture'][] = [
// picturetypeid == Cover. More: module.tag.id3v2.php
'picturetypeid' => 2,
'data' => $APICdata,
'description' => 'cover',
'mime' => $episode->cover->file_mimetype,
'data' => $APICdata,
'description' => 'cover',
'mime' => $episode->cover->file_mimetype,
];
$tagwriter->tag_data = $TagData;

View File

@ -37,9 +37,9 @@ if (! function_exists('render_page_links')) {
// if set in .env, add legal notice link at the end of page links
if (config('App')->legalNoticeURL !== null) {
$links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [
'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent',
'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent',
'target' => '_blank',
'rel' => 'noopener noreferrer',
'rel' => 'noopener noreferrer',
]);
}

View File

@ -32,20 +32,20 @@ if (! function_exists('get_podcast_metatags')) {
$schema = new Schema(
new Thing('PodcastSeries', [
'name' => $podcast->title,
'headline' => $podcast->title,
'url' => current_url(),
'sameAs' => $podcast->link,
'identifier' => $podcast->guid,
'image' => $podcast->cover->feed_url,
'name' => $podcast->title,
'headline' => $podcast->title,
'url' => current_url(),
'sameAs' => $podcast->link,
'identifier' => $podcast->guid,
'image' => $podcast->cover->feed_url,
'description' => $podcast->description,
'webFeed' => $podcast->feed_url,
'accessMode' => 'auditory',
'author' => $podcast->owner_name,
'creator' => $podcast->owner_name,
'publisher' => $podcast->publisher,
'inLanguage' => $podcast->language_code,
'genre' => $category,
'webFeed' => $podcast->feed_url,
'accessMode' => 'auditory',
'author' => $podcast->owner_name,
'creator' => $podcast->owner_name,
'publisher' => $podcast->publisher,
'inLanguage' => $podcast->language_code,
'genre' => $category,
])
);
@ -61,7 +61,7 @@ if (! function_exists('get_podcast_metatags')) {
->og('locale', $podcast->language_code)
->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [
'rel' => 'alternate',
'rel' => 'alternate',
'type' => 'application/activity+json',
'href' => url_to('podcast-activity', esc($podcast->handle)),
]);
@ -81,19 +81,19 @@ if (! function_exists('get_episode_metatags')) {
{
$schema = new Schema(
new Thing('PodcastEpisode', [
'url' => url_to('episode', esc($episode->podcast->handle), $episode->slug),
'name' => $episode->title,
'image' => $episode->cover->feed_url,
'description' => $episode->description,
'datePublished' => $episode->published_at->format(DATE_ISO8601),
'timeRequired' => iso8601_duration($episode->audio->duration),
'duration' => iso8601_duration($episode->audio->duration),
'url' => url_to('episode', esc($episode->podcast->handle), $episode->slug),
'name' => $episode->title,
'image' => $episode->cover->feed_url,
'description' => $episode->description,
'datePublished' => $episode->published_at->format(DATE_ISO8601),
'timeRequired' => iso8601_duration($episode->audio->duration),
'duration' => iso8601_duration($episode->audio->duration),
'associatedMedia' => new Thing('MediaObject', [
'contentUrl' => $episode->audio_url,
]),
'partOfSeries' => new Thing('PodcastSeries', [
'name' => $episode->podcast->title,
'url' => $episode->podcast->link,
'url' => $episode->podcast->link,
]),
])
);
@ -119,7 +119,7 @@ if (! function_exists('get_episode_metatags')) {
->twitter('player:width', (string) config('Embed')->width)
->twitter('player:height', (string) config('Embed')->height)
->push('link', [
'rel' => 'alternate',
'rel' => 'alternate',
'type' => 'application/activity+json',
'href' => url_to('episode', $episode->podcast->handle, $episode->slug),
]);
@ -142,11 +142,11 @@ if (! function_exists('get_post_metatags')) {
function get_post_metatags(Post $post): string
{
$socialMediaPosting = new Thing('SocialMediaPosting', [
'@id' => url_to('post', esc($post->actor->username), $post->id),
'@id' => url_to('post', esc($post->actor->username), $post->id),
'datePublished' => $post->published_at->format(DATE_ISO8601),
'author' => new Thing('Person', [
'author' => new Thing('Person', [
'name' => $post->actor->display_name,
'url' => $post->actor->uri,
'url' => $post->actor->uri,
]),
'text' => $post->message,
]);
@ -154,16 +154,16 @@ if (! function_exists('get_post_metatags')) {
if ($post->episode_id !== null) {
$socialMediaPosting->__set('sharedContent', new Thing('Audio', [
'headline' => $post->episode->title,
'url' => $post->episode->link,
'author' => new Thing('Person', [
'url' => $post->episode->link,
'author' => new Thing('Person', [
'name' => $post->episode->podcast->owner_name,
]),
]));
} elseif ($post->preview_card instanceof PreviewCard) {
$socialMediaPosting->__set('sharedContent', new Thing('WebPage', [
'headline' => $post->preview_card->title,
'url' => $post->preview_card->url,
'author' => new Thing('Person', [
'url' => $post->preview_card->url,
'author' => new Thing('Person', [
'name' => $post->preview_card->author_name,
]),
]));
@ -181,7 +181,7 @@ if (! function_exists('get_post_metatags')) {
->canonical((string) current_url())
->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [
'rel' => 'alternate',
'rel' => 'alternate',
'type' => 'application/activity+json',
'href' => url_to('post', esc($post->actor->username), $post->id),
]);
@ -201,11 +201,11 @@ if (! function_exists('get_episode_comment_metatags')) {
$episodeComment->id
),
'datePublished' => $episodeComment->created_at->format(DATE_ISO8601),
'author' => new Thing('Person', [
'author' => new Thing('Person', [
'name' => $episodeComment->actor->display_name,
'url' => $episodeComment->actor->uri,
'url' => $episodeComment->actor->uri,
]),
'text' => $episodeComment->message,
'text' => $episodeComment->message,
'upvoteCount' => $episodeComment->likes_count,
]));
@ -213,14 +213,14 @@ if (! function_exists('get_episode_comment_metatags')) {
$metatags
->title(lang('Comment.title', [
'actorDisplayName' => $episodeComment->actor->display_name,
'episodeTitle' => $episodeComment->episode->title,
'episodeTitle' => $episodeComment->episode->title,
]))
->description($episodeComment->message)
->image($episodeComment->actor->avatar_image_url)
->canonical((string) current_url())
->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [
'rel' => 'alternate',
'rel' => 'alternate',
'type' => 'application/activity+json',
'href' => url_to(
'episode-comment',

View File

@ -74,7 +74,7 @@ if (! function_exists('extract_params_from_episode_uri')) {
return [
'podcastHandle' => $matches['podcastHandle'],
'episodeSlug' => $matches['episodeSlug'],
'episodeSlug' => $matches['episodeSlug'],
];
}
}

View File

@ -21,205 +21,205 @@ class MediaClipper extends BaseConfig
*/
public array $formats = [
'landscape' => [
'width' => 1920,
'width' => 1920,
'height' => 1080,
'cover' => [
'width' => 480,
'cover' => [
'width' => 480,
'height' => 480,
'radius' => 24,
'x' => 150,
'y' => 120,
'x' => 150,
'y' => 120,
],
'quotes' => [
'width' => 192,
'width' => 192,
'height' => 192,
'x' => 810,
'y' => 210,
'x' => 810,
'y' => 210,
],
'podcastTitle' => [
'fontsize' => 20,
'x' => 150,
'y' => 620,
'fontsize' => 20,
'x' => 150,
'y' => 620,
'lineWidth' => 510,
],
'episodeTitle' => [
'fontsize' => 32,
'x' => 150,
'y' => 660,
'lines' => 3,
'lineWidth' => 510,
'fontsize' => 32,
'x' => 150,
'y' => 660,
'lines' => 3,
'lineWidth' => 510,
'lineHeight' => 1.5,
],
'episodeNumbering' => [
'fontsize' => 18,
'paddingX' => 10,
'paddingY' => 5,
'fontsize' => 18,
'paddingX' => 10,
'paddingY' => 5,
'marginRight' => 10,
],
'timestamp' => [
'fontsize' => 32,
'padding' => 10,
'x' => 1620,
'y' => 985,
'padding' => 10,
'x' => 1620,
'y' => 985,
],
'watermark' => [
'width' => 90,
'width' => 90,
'height' => 72,
'x' => 140,
'y' => 960,
'x' => 140,
'y' => 960,
],
'progressbar' => [
'height' => 10,
],
'soundwaves' => [
'width' => 192,
'height' => 108,
'rescaleWidth' => 1920,
'width' => 192,
'height' => 108,
'rescaleWidth' => 1920,
'rescaleHeight' => 540,
'x' => 0,
'y' => 810,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-landscape.png',
'x' => 0,
'y' => 810,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-landscape.png',
],
'subtitles' => [
'fontsize' => 18,
'marginL' => 180,
'marginR' => 20,
'marginV' => 85,
'marginL' => 180,
'marginR' => 20,
'marginV' => 85,
],
],
'portrait' => [
'width' => 1080,
'width' => 1080,
'height' => 1920,
'cover' => [
'width' => 280,
'cover' => [
'width' => 280,
'height' => 280,
'radius' => 16,
'x' => 50,
'y' => 50,
'x' => 50,
'y' => 50,
],
'quotes' => [
'width' => 256,
'width' => 256,
'height' => 256,
'x' => 40,
'y' => 520,
'x' => 40,
'y' => 520,
],
'podcastTitle' => [
'fontsize' => 32,
'x' => 360,
'y' => 55,
'fontsize' => 32,
'x' => 360,
'y' => 55,
'lineWidth' => 670,
],
'episodeTitle' => [
'fontsize' => 42,
'x' => 360,
'y' => 110,
'lines' => 3,
'lineWidth' => 670,
'fontsize' => 42,
'x' => 360,
'y' => 110,
'lines' => 3,
'lineWidth' => 670,
'lineHeight' => 1.5,
],
'episodeNumbering' => [
'fontsize' => 28,
'paddingX' => 10,
'paddingY' => 10,
'fontsize' => 28,
'paddingX' => 10,
'paddingY' => 10,
'marginRight' => 10,
],
'timestamp' => [
'fontsize' => 48,
'padding' => 14,
'x' => 734,
'y' => 1800,
'padding' => 14,
'x' => 734,
'y' => 1800,
],
'watermark' => [
'width' => 120,
'width' => 120,
'height' => 96,
'x' => 130,
'y' => 1770,
'x' => 130,
'y' => 1770,
],
'progressbar' => [
'height' => 10,
],
'soundwaves' => [
'width' => 54,
'height' => 96,
'rescaleWidth' => 1080,
'width' => 54,
'height' => 96,
'rescaleWidth' => 1080,
'rescaleHeight' => 1920,
'x' => 0,
'y' => 960,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-portrait.png',
'x' => 0,
'y' => 960,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-portrait.png',
],
'subtitles' => [
'fontsize' => 16,
'marginL' => 40,
'marginR' => 25,
'marginV' => 97,
'marginL' => 40,
'marginR' => 25,
'marginV' => 97,
],
],
'squared' => [
'width' => 1200,
'width' => 1200,
'height' => 1200,
'cover' => [
'width' => 200,
'cover' => [
'width' => 200,
'height' => 200,
'radius' => 16,
'x' => 40,
'y' => 40,
'x' => 40,
'y' => 40,
],
'quotes' => [
'width' => 200,
'width' => 200,
'height' => 200,
'x' => 85,
'y' => 320,
'x' => 85,
'y' => 320,
],
'podcastTitle' => [
'fontsize' => 28,
'x' => 260,
'y' => 50,
'lines' => 1,
'fontsize' => 28,
'x' => 260,
'y' => 50,
'lines' => 1,
'lineWidth' => 800,
],
'episodeTitle' => [
'fontsize' => 36,
'x' => 260,
'y' => 90,
'lines' => 2,
'lineWidth' => 850,
'fontsize' => 36,
'x' => 260,
'y' => 90,
'lines' => 2,
'lineWidth' => 850,
'lineHeight' => 1.5,
],
'episodeNumbering' => [
'fontsize' => 24,
'paddingX' => 10,
'paddingY' => 5,
'fontsize' => 24,
'paddingX' => 10,
'paddingY' => 5,
'marginRight' => 10,
],
'timestamp' => [
'fontsize' => 48,
'padding' => 10,
'x' => 855,
'y' => 1070,
'padding' => 10,
'x' => 855,
'y' => 1070,
],
'watermark' => [
'width' => 120,
'width' => 120,
'height' => 96,
'x' => 130,
'y' => 1040,
'x' => 130,
'y' => 1040,
],
'progressbar' => [
'height' => 10,
],
'soundwaves' => [
'width' => 60,
'height' => 60,
'rescaleWidth' => 1200,
'width' => 60,
'height' => 60,
'rescaleWidth' => 1200,
'rescaleHeight' => 1200,
'x' => 0,
'y' => 600,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-squared.png',
'x' => 0,
'y' => 600,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-squared.png',
],
'subtitles' => [
'fontsize' => 20,
'marginL' => 60,
'marginR' => 20,
'marginV' => 98,
'marginL' => 60,
'marginR' => 20,
'marginV' => 98,
],
],
];
@ -230,117 +230,117 @@ class MediaClipper extends BaseConfig
public array $themes = [
'pine' => [
// Previews must be a HSL colorscheme string
'preview' => '174 100% 29%',
'preview' => '174 100% 29%',
'preview-background' => '172 100% 17%',
// arrays are rgb
'background' => [0, 86, 74],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [0, 148, 134],
'episodeNumberingBg' => [0, 61, 11],
'quotes' => [0, 148, 134],
'episodeNumberingBg' => [0, 61, 11],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => '009486',
'timestampBg' => '00564A',
'timestampText' => 'FFFFFF',
'watermarkBg' => '00564A',
'soundwaves' => [231, 249, 228],
'progressbar' => '009486',
'timestampBg' => '00564A',
'timestampText' => 'FFFFFF',
'watermarkBg' => '00564A',
'soundwaves' => [231, 249, 228],
],
'crimson' => [
// Preview must be a HSL colorscheme string
'preview' => '350 87% 61%',
'preview' => '350 87% 61%',
'preview-background' => '348 75% 40%',
// arrays are rgb
'background' => [179, 31, 57],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [242, 70, 100],
'episodeNumberingBg' => [152, 16, 43],
'quotes' => [242, 70, 100],
'episodeNumberingBg' => [152, 16, 43],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'F24664',
'timestampBg' => 'B31F39',
'timestampText' => 'FFFFFF',
'watermarkBg' => 'B31F39',
'soundwaves' => [253, 206, 215],
'progressbar' => 'F24664',
'timestampBg' => 'B31F39',
'timestampText' => 'FFFFFF',
'watermarkBg' => 'B31F39',
'soundwaves' => [253, 206, 215],
],
'lake' => [
// Preview must be a HSL colorscheme string
'preview' => '194 100% 44%',
'preview' => '194 100% 44%',
'preview-background' => '194 100% 22%',
// arrays are rgb
'background' => [0, 86, 113],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [0, 171, 225],
'episodeNumberingBg' => [0, 43, 57],
'quotes' => [0, 171, 225],
'episodeNumberingBg' => [0, 43, 57],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => '00ABE1',
'timestampBg' => '005671',
'timestampText' => 'FFFFFF',
'watermarkBg' => '005671',
'soundwaves' => [214, 245, 255],
'progressbar' => '00ABE1',
'timestampBg' => '005671',
'timestampText' => 'FFFFFF',
'watermarkBg' => '005671',
'soundwaves' => [214, 245, 255],
],
'amber' => [
// Preview must be a HSL colorscheme string
'preview' => '17 100% 57%',
'preview' => '17 100% 57%',
'preview-background' => '17 100% 35%',
// arrays are rgb
'background' => [177, 50, 0],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [255, 96, 34],
'episodeNumberingBg' => [121, 34, 0],
'quotes' => [255, 96, 34],
'episodeNumberingBg' => [121, 34, 0],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'FF6022',
'timestampBg' => 'B13200',
'timestampText' => 'FFFFFF',
'watermarkBg' => 'B13200',
'soundwaves' => [255, 213, 197],
'progressbar' => 'FF6022',
'timestampBg' => 'B13200',
'timestampText' => 'FFFFFF',
'watermarkBg' => 'B13200',
'soundwaves' => [255, 213, 197],
],
'jacaranda' => [
// Preview must be a HSL colorscheme string
'preview' => '254 72% 52%',
'preview' => '254 72% 52%',
'preview-background' => '254 73% 30%',
// arrays are rgb
'background' => [47, 21, 132],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [86, 45, 221],
'episodeNumberingBg' => [30, 14, 84],
'quotes' => [86, 45, 221],
'episodeNumberingBg' => [30, 14, 84],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => '562DDD',
'timestampBg' => '2F1584',
'timestampText' => 'FFFFFF',
'watermarkBg' => '2F1584',
'soundwaves' => [199, 185, 244],
'progressbar' => '562DDD',
'timestampBg' => '2F1584',
'timestampText' => 'FFFFFF',
'watermarkBg' => '2F1584',
'soundwaves' => [199, 185, 244],
],
'onyx' => [
// Preview must be a HSL colorscheme string
'preview' => '240 17% 2%',
'preview' => '240 17% 2%',
'preview-background' => '240 17% 2%',
// arrays are rgb
'background' => [5, 5, 7],
'text' => [255, 255, 255],
'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF',
// quotes image MUST BE black
'quotes' => [38, 38, 49],
'episodeNumberingBg' => [0, 0, 0],
'quotes' => [38, 38, 49],
'episodeNumberingBg' => [0, 0, 0],
'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'D5D5E1',
'timestampBg' => '050507',
'timestampText' => 'FFFFFF',
'watermarkBg' => '050507',
'soundwaves' => [213, 213, 225],
'progressbar' => 'D5D5E1',
'timestampBg' => '050507',
'timestampText' => 'FFFFFF',
'watermarkBg' => '050507',
'soundwaves' => [213, 213, 225],
],
];
}

View File

@ -26,11 +26,11 @@ class VideoClipper
* @var array<string, string>
*/
final public const FONTS = [
'episodeTitle' => 'Rubik-Bold.ttf',
'podcastTitle' => 'Inter-Regular.otf',
'subtitles' => 'Inter-SemiBold',
'episodeTitle' => 'Rubik-Bold.ttf',
'podcastTitle' => 'Inter-Regular.otf',
'subtitles' => 'Inter-SemiBold',
'episodeNumbering' => 'Inter-SemiBold.otf',
'timestamp' => 'NotoSansMono-Regular.ttf',
'timestamp' => 'NotoSansMono-Regular.ttf',
];
public ?string $logs = null;
@ -505,8 +505,8 @@ class VideoClipper
{
return match ($this->episode->cover->file_mimetype) {
'image/jpeg' => imagecreatefromjpeg($this->episodeCoverPath),
'image/png' => imagecreatefrompng($this->episodeCoverPath),
default => imagecreate(1400, 1400),
'image/png' => imagecreatefrompng($this->episodeCoverPath),
default => imagecreate(1400, 1400),
};
}
@ -677,11 +677,11 @@ class VideoClipper
$maxY = max([$bbox[1], $bbox[3], $bbox[5], $bbox[7]]);
return [
'left' => abs($minX) - 1,
'top' => abs($minY),
'width' => $maxX - $minX,
'left' => abs($minX) - 1,
'top' => abs($minY),
'width' => $maxX - $minX,
'height' => $maxY - $minY,
'box' => $bbox,
'box' => $bbox,
];
}

View File

@ -46,30 +46,30 @@ class PodcastEpisode extends ObjectType
$this->id = $episode->link;
$this->description = [
'type' => 'Note',
'mediaType' => 'text/markdown',
'content' => $episode->description_markdown,
'type' => 'Note',
'mediaType' => 'text/markdown',
'content' => $episode->description_markdown,
'contentMap' => [
$episode->podcast->language_code => $episode->description_html,
],
];
$this->image = [
'type' => 'Image',
'type' => 'Image',
'mediaType' => $episode->cover->file_mimetype,
'url' => $episode->cover->feed_url,
'url' => $episode->cover->feed_url,
];
// add audio file
$this->audio = [
'id' => $episode->audio_url,
'type' => 'Audio',
'name' => esc($episode->title),
'size' => $episode->audio->file_size,
'id' => $episode->audio_url,
'type' => 'Audio',
'name' => esc($episode->title),
'size' => $episode->audio->file_size,
'duration' => $episode->audio->duration,
'url' => [
'href' => $episode->audio_url,
'type' => 'Link',
'url' => [
'href' => $episode->audio_url,
'type' => 'Link',
'mediaType' => $episode->audio->file_mimetype,
],
];

View File

@ -16,9 +16,9 @@ class Themes extends BaseConfig
* @var array<string, string>
*/
public array $themes = [
'app' => 'cp_app',
'admin' => 'cp_admin',
'app' => 'cp_app',
'admin' => 'cp_admin',
'install' => 'cp_install',
'auth' => 'cp_auth',
'auth' => 'cp_auth',
];
}

View File

@ -116,7 +116,7 @@ class CategoryModel extends Model
$categoriesIds,
static function (array $result, int $categoryId) use ($podcastId): array {
$result[] = [
'podcast_id' => $podcastId,
'podcast_id' => $podcastId,
'category_id' => $categoryId,
];
return $result;

View File

@ -113,7 +113,7 @@ class ClipModel extends Model
public function getScheduledVideoClips(): array
{
$found = $this->where([
'type' => 'video',
'type' => 'video',
'status' => 'queued',
])
->orderBy('created_at')
@ -131,7 +131,7 @@ class ClipModel extends Model
$result = $this->builder()
->select('COUNT(*) as `running_count`')
->where([
'type' => 'video',
'type' => 'video',
'status' => 'running',
])
->get()
@ -148,7 +148,7 @@ class ClipModel extends Model
'podcast_id' => $videoClip->podcast_id,
'episode_id' => $videoClip->episode_id,
'start_time' => $videoClip->start_time,
'duration' => $videoClip->duration,
'duration' => $videoClip->duration,
])
->where('JSON_EXTRACT(`metadata`, "$.format")', $videoClip->format)
->where('JSON_EXTRACT(`metadata`, "$.theme.name")', $videoClip->theme['name'])
@ -169,7 +169,7 @@ class ClipModel extends Model
return $this->delete([
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'id' => $clipId,
'id' => $clipId,
]);
}
@ -211,7 +211,7 @@ class ClipModel extends Model
$found = $this->where([
'episode_id' => $episodeId,
'podcast_id' => $podcastId,
'type' => 'audio',
'type' => 'audio',
])
->orderBy('start_time')
->findAll();
@ -234,7 +234,7 @@ class ClipModel extends Model
return $this->delete([
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'id' => $clipId,
'id' => $clipId,
]);
}

View File

@ -202,7 +202,7 @@ class EpisodeCommentModel extends UuidModel
$episodeCommentsBuilder = $this->builder();
$episodeComments = $episodeCommentsBuilder->select('*, 0 as is_from_post')
->where([
'episode_id' => $episodeId,
'episode_id' => $episodeId,
'in_reply_to_id' => null,
])
->getCompiledSelect();
@ -216,7 +216,7 @@ class EpisodeCommentModel extends UuidModel
return $builder->select('id')
->from(config('Fediverse')->tablesPrefix . 'posts')
->where([
'episode_id' => $episodeId,
'episode_id' => $episodeId,
'in_reply_to_id' => null,
]);
})

View File

@ -24,30 +24,28 @@ class EpisodeModel extends Model
*/
public static $themes = [
'light-transparent' => [
'style' =>
'background-color: #fff; background-image: linear-gradient(45deg, #ccc 12.5%, transparent 12.5%, transparent 50%, #ccc 50%, #ccc 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'style' => 'background-color: #fff; background-image: linear-gradient(45deg, #ccc 12.5%, transparent 12.5%, transparent 50%, #ccc 50%, #ccc 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background' => 'transparent',
'text' => '#000',
'inverted' => '#fff',
'text' => '#000',
'inverted' => '#fff',
],
'light' => [
'style' => 'background-color: #fff;',
'style' => 'background-color: #fff;',
'background' => '#fff',
'text' => '#000',
'inverted' => '#fff',
'text' => '#000',
'inverted' => '#fff',
],
'dark-transparent' => [
'style' =>
'background-color: #001f1a; background-image: linear-gradient(45deg, #888 12.5%, transparent 12.5%, transparent 50%, #888 50%, #888 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'style' => 'background-color: #001f1a; background-image: linear-gradient(45deg, #888 12.5%, transparent 12.5%, transparent 50%, #888 50%, #888 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background' => 'transparent',
'text' => '#fff',
'inverted' => '#000',
'text' => '#fff',
'inverted' => '#000',
],
'dark' => [
'style' => 'background-color: #001f1a;',
'style' => 'background-color: #001f1a;',
'background' => '#313131',
'text' => '#fff',
'inverted' => '#000',
'text' => '#fff',
'inverted' => '#000',
],
];
@ -105,19 +103,19 @@ class EpisodeModel extends Model
* @var array<string, string>
*/
protected $validationRules = [
'podcast_id' => 'required',
'title' => 'required',
'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]',
'audio_id' => 'required',
'description_markdown' => 'required',
'number' => 'is_natural_no_zero|permit_empty',
'season_number' => 'is_natural_no_zero|permit_empty',
'type' => 'required',
'podcast_id' => 'required',
'title' => 'required',
'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]',
'audio_id' => 'required',
'description_markdown' => 'required',
'number' => 'is_natural_no_zero|permit_empty',
'season_number' => 'is_natural_no_zero|permit_empty',
'type' => 'required',
'transcript_remote_url' => 'valid_url_strict|permit_empty',
'chapters_remote_url' => 'valid_url_strict|permit_empty',
'published_at' => 'valid_date|permit_empty',
'created_by' => 'required',
'updated_by' => 'required',
'chapters_remote_url' => 'valid_url_strict|permit_empty',
'published_at' => 'valid_date|permit_empty',
'created_by' => 'required',
'updated_by' => 'required',
];
/**
@ -286,7 +284,7 @@ class EpisodeModel extends Model
$result = $this->builder()
->select('MAX(season_number) as current_season_number')
->where([
'podcast_id' => $podcastId,
'podcast_id' => $podcastId,
'published_at IS NOT' => null,
])
->get()
@ -300,8 +298,8 @@ class EpisodeModel extends Model
$result = $this->builder()
->select('MAX(number) as next_episode_number')
->where([
'podcast_id' => $podcastId,
'season_number' => $seasonNumber,
'podcast_id' => $podcastId,
'season_number' => $seasonNumber,
'published_at IS NOT' => null,
])->get()
->getResultArray();
@ -319,13 +317,13 @@ class EpisodeModel extends Model
'COUNT(DISTINCT season_number) as number_of_seasons, COUNT(*) as number_of_episodes, MIN(published_at) as first_published_at'
)
->where([
'podcast_id' => $podcastId,
'podcast_id' => $podcastId,
'published_at IS NOT' => null,
])->get()
->getResultArray();
$stats = [
'number_of_seasons' => (int) $result[0]['number_of_seasons'],
'number_of_seasons' => (int) $result[0]['number_of_seasons'],
'number_of_episodes' => (int) $result[0]['number_of_episodes'],
];

View File

@ -52,7 +52,7 @@ class LikeModel extends UuidModel
$this->db->transStart();
$this->insert([
'actor_id' => $actor->id,
'actor_id' => $actor->id,
'comment_id' => $comment->id,
]);
@ -96,7 +96,7 @@ class LikeModel extends UuidModel
->decrement('likes_count');
$this->where([
'actor_id' => $actor->id,
'actor_id' => $actor->id,
'comment_id' => service('uuid')
->fromString($comment->id)
->getBytes(),
@ -108,7 +108,7 @@ class LikeModel extends UuidModel
// FIXME: get like activity associated with the deleted like
$activity = model(ActivityModel::class)
->where([
'type' => 'Like',
'type' => 'Like',
'actor_id' => $actor->id,
])
->first();
@ -152,7 +152,7 @@ class LikeModel extends UuidModel
{
if (
$this->where([
'actor_id' => $actor->id,
'actor_id' => $actor->id,
'comment_id' => service('uuid')
->fromString($comment->id)
->getBytes(),

View File

@ -49,9 +49,8 @@ class PageModel extends Model
* @var array<string, string>
*/
protected $validationRules = [
'title' => 'required',
'slug' =>
'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]|is_unique[pages.slug,id,{id}]',
'title' => 'required',
'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]|is_unique[pages.slug,id,{id}]',
'content_markdown' => 'required',
];

View File

@ -57,11 +57,10 @@ class PersonModel extends Model
* @var array<string, string>
*/
protected $validationRules = [
'full_name' => 'required',
'unique_name' =>
'required|regex_match[/^[a-z0-9\-]{1,32}$/]|is_unique[persons.unique_name,id,{id}]',
'created_by' => 'required',
'updated_by' => 'required',
'full_name' => 'required',
'unique_name' => 'required|regex_match[/^[a-z0-9\-]{1,32}$/]|is_unique[persons.unique_name,id,{id}]',
'created_by' => 'required',
'updated_by' => 'required',
];
/**
@ -191,12 +190,12 @@ class PersonModel extends Model
public function addPerson(string $fullName, ?string $informationUrl, string $image): int | bool
{
$person = new Person([
'full_name' => $fullName,
'unique_name' => slugify($fullName),
'full_name' => $fullName,
'unique_name' => slugify($fullName),
'information_url' => $informationUrl,
'image' => download_file($image),
'created_by' => user_id(),
'updated_by' => user_id(),
'image' => download_file($image),
'created_by' => user_id(),
'updated_by' => user_id(),
]);
return $this->insert($person);
@ -257,11 +256,11 @@ class PersonModel extends Model
): bool {
return $this->db->table('episodes_persons')
->insert([
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'person_group' => $groupSlug,
'person_role' => $roleSlug,
'person_role' => $roleSlug,
]);
}
@ -269,10 +268,10 @@ class PersonModel extends Model
{
return $this->db->table('podcasts_persons')
->insert([
'podcast_id' => $podcastId,
'person_id' => $personId,
'podcast_id' => $podcastId,
'person_id' => $personId,
'person_group' => $groupSlug,
'person_role' => $roleSlug,
'person_role' => $roleSlug,
]);
}
@ -301,17 +300,17 @@ class PersonModel extends Model
if ($roles === []) {
$data[] = [
'podcast_id' => $podcastId,
'person_id' => $personId,
'person_id' => $personId,
];
}
foreach ($roles as $role) {
$groupRole = explode(',', $role);
$data[] = [
'podcast_id' => $podcastId,
'person_id' => $personId,
'podcast_id' => $podcastId,
'person_id' => $personId,
'person_group' => $groupRole[0],
'person_role' => $groupRole[1],
'person_role' => $groupRole[1],
];
}
}
@ -338,7 +337,7 @@ class PersonModel extends Model
return $this->db->table('podcasts_persons')
->delete([
'podcast_id' => $podcastId,
'person_id' => $personId,
'person_id' => $personId,
]);
}
@ -369,18 +368,18 @@ class PersonModel extends Model
foreach ($groupsRoles as $groupRole) {
$groupRole = explode(',', $groupRole);
$data[] = [
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'person_group' => $groupRole[0],
'person_role' => $groupRole[1],
'person_role' => $groupRole[1],
];
}
} else {
$data[] = [
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'person_id' => $personId,
];
}
}
@ -406,7 +405,7 @@ class PersonModel extends Model
->delete([
'podcast_id' => $podcastId,
'episode_id' => $episodeId,
'person_id' => $personId,
'person_id' => $personId,
]);
}

View File

@ -85,10 +85,10 @@ class PlatformModel extends Model
string $submitUrl = null
): int | false {
$data = [
'slug' => $slug,
'type' => $type,
'label' => $label,
'home_url' => $homeUrl,
'slug' => $slug,
'type' => $type,
'label' => $label,
'home_url' => $homeUrl,
'submit_url' => $submitUrl,
];
@ -195,7 +195,7 @@ class PlatformModel extends Model
return $this->db->table('podcasts_platforms')
->delete([
'podcast_id' => $podcastId,
'podcast_id' => $podcastId,
'platform_slug' => $platformSlug,
]);
}

View File

@ -84,19 +84,18 @@ class PodcastModel extends Model
* @var array<string, string>
*/
protected $validationRules = [
'title' => 'required',
'handle' =>
'required|regex_match[/^[a-zA-Z0-9\_]{1,32}$/]|is_unique[podcasts.handle,id,{id}]',
'title' => 'required',
'handle' => 'required|regex_match[/^[a-zA-Z0-9\_]{1,32}$/]|is_unique[podcasts.handle,id,{id}]',
'description_markdown' => 'required',
'cover_id' => 'required',
'language_code' => 'required',
'category_id' => 'required',
'owner_email' => 'required|valid_email',
'new_feed_url' => 'valid_url_strict|permit_empty',
'type' => 'required',
'published_at' => 'valid_date|permit_empty',
'created_by' => 'required',
'updated_by' => 'required',
'cover_id' => 'required',
'language_code' => 'required',
'category_id' => 'required',
'owner_email' => 'required|valid_email',
'new_feed_url' => 'valid_url_strict|permit_empty',
'type' => 'required',
'published_at' => 'valid_date|permit_empty',
'created_by' => 'required',
'updated_by' => 'required',
];
/**
@ -249,8 +248,8 @@ class PodcastModel extends Model
->builder()
->select('YEAR(published_at) as year, count(*) as number_of_episodes')
->where([
'podcast_id' => $podcastId,
'season_number' => null,
'podcast_id' => $podcastId,
'season_number' => null,
'published_at IS NOT' => null,
])
->where('`published_at` <= UTC_TIMESTAMP()', null, false)
@ -286,9 +285,9 @@ class PodcastModel extends Model
->builder()
->select('season_number, count(*) as number_of_episodes')
->where([
'podcast_id' => $podcastId,
'podcast_id' => $podcastId,
'season_number is not' => null,
'published_at IS NOT' => null,
'published_at IS NOT' => null,
])
->where('`published_at` <= UTC_TIMESTAMP()', null, false)
->groupBy('season_number')
@ -409,15 +408,15 @@ class PodcastModel extends Model
$actorId = (new ActorModel())->insert(
[
'uri' => url_to('actor', $username),
'username' => $username,
'domain' => $domain,
'private_key' => $privatekey,
'public_key' => $publickey,
'display_name' => $data['data']['title'],
'summary' => $data['data']['description_html'],
'inbox_url' => url_to('inbox', $username),
'outbox_url' => url_to('outbox', $username),
'uri' => url_to('actor', $username),
'username' => $username,
'domain' => $domain,
'private_key' => $privatekey,
'public_key' => $publickey,
'display_name' => $data['data']['title'],
'summary' => $data['data']['description_html'],
'inbox_url' => url_to('inbox', $username),
'outbox_url' => url_to('outbox', $username),
'followers_url' => url_to('followers', $username),
],
true,

View File

@ -63,8 +63,8 @@ class PostModel extends FediversePostModel
->select('p2.id, p1.episode_id')
->where([
'p2.in_reply_to_id IS NOT' => null,
'p2.episode_id' => null,
'p1.episode_id IS NOT' => null,
'p2.episode_id' => null,
'p1.episode_id IS NOT' => null,
])
->get()
->getResultArray();

View File

@ -31,37 +31,37 @@ class Button extends Component
'gap-x-2 flex-shrink-0 inline-flex items-center justify-center font-semibold shadow-xs rounded-full focus:ring-accent';
$variantClass = [
'default' => 'text-black bg-gray-300 hover:bg-gray-400',
'primary' => 'text-accent-contrast bg-accent-base hover:bg-accent-hover',
'default' => 'text-black bg-gray-300 hover:bg-gray-400',
'primary' => 'text-accent-contrast bg-accent-base hover:bg-accent-hover',
'secondary' => 'border-2 border-accent-base text-accent-base bg-white hover:border-accent-hover hover:text-accent-hover',
'success' => 'text-white bg-pine-500 hover:bg-pine-800',
'danger' => 'text-white bg-red-600 hover:bg-red-700',
'warning' => 'text-black bg-yellow-500 hover:bg-yellow-600',
'info' => 'text-white bg-blue-500 hover:bg-blue-600',
'disabled' => 'text-black bg-gray-300 cursor-not-allowed',
'success' => 'text-white bg-pine-500 hover:bg-pine-800',
'danger' => 'text-white bg-red-600 hover:bg-red-700',
'warning' => 'text-black bg-yellow-500 hover:bg-yellow-600',
'info' => 'text-white bg-blue-500 hover:bg-blue-600',
'disabled' => 'text-black bg-gray-300 cursor-not-allowed',
];
$sizeClass = [
'small' => 'text-xs leading-6',
'base' => 'text-sm leading-5',
'base' => 'text-sm leading-5',
'large' => 'text-base leading-6',
];
$iconSize = [
'small' => 'text-sm',
'base' => 'text-lg',
'base' => 'text-lg',
'large' => 'text-2xl',
];
$basePaddings = [
'small' => 'px-3 py-1',
'base' => 'px-3 py-2',
'base' => 'px-3 py-2',
'large' => 'px-4 py-2',
];
$squaredPaddings = [
'small' => 'p-1',
'base' => 'p-2',
'base' => 'p-2',
'large' => 'p-3',
];
@ -84,14 +84,14 @@ class Button extends Component
if ($this->iconLeft !== '') {
$this->slot = (new Icon([
'glyph' => $this->iconLeft,
'class' => 'opacity-75' . ' ' . $iconSize[$this->size],
'class' => 'opacity-75 ' . $iconSize[$this->size],
]))->render() . $this->slot;
}
if ($this->iconRight !== '') {
$this->slot .= (new Icon([
'glyph' => $this->iconRight,
'class' => 'opacity-75' . ' ' . $iconSize[$this->size],
'class' => 'opacity-75 ' . $iconSize[$this->size],
]))->render();
}

View File

@ -18,8 +18,8 @@ class Checkbox extends FormComponent
public function render(): string
{
$attributes = [
'id' => $this->value,
'name' => $this->name,
'id' => $this->value,
'name' => $this->name,
'class' => 'form-checkbox bg-elevated text-accent-base border-contrast border-3 focus:ring-accent w-6 h-6',
];
if ($this->required) {

View File

@ -18,8 +18,8 @@ class ColorRadioButton extends FormComponent
public function render(): string
{
$data = [
'id' => $this->value,
'name' => $this->name,
'id' => $this->value,
'name' => $this->name,
'class' => 'color-radio-btn',
];

View File

@ -24,7 +24,7 @@ class Field extends FormComponent
}
$labelAttributes = [
'for' => $this->id,
'for' => $this->id,
'isOptional' => $this->required ? 'false' : 'true',
];
if ($this->hint) {

View File

@ -29,55 +29,55 @@ class MarkdownEditor extends FormComponent
'mr-1 text-lg opacity-40'
);
$translations = [
'write' => lang('Common.forms.editor.write'),
'write' => lang('Common.forms.editor.write'),
'preview' => lang('Common.forms.editor.preview'),
'help' => lang('Common.forms.editor.help'),
'help' => lang('Common.forms.editor.help'),
];
$toolbarGroups = [
[
[
'name' => 'header',
'tag' => 'md-header',
'tag' => 'md-header',
'icon' => icon('heading'),
],
[
'name' => 'bold',
'tag' => 'md-bold',
'tag' => 'md-bold',
'icon' => icon('bold'),
],
[
'name' => 'italic',
'tag' => 'md-italic',
'tag' => 'md-italic',
'icon' => icon('italic'),
],
],
[
[
'name' => 'unordered-list',
'tag' => 'md-unordered-list',
'tag' => 'md-unordered-list',
'icon' => icon('list-unordered'),
],
[
'name' => 'ordered-list',
'tag' => 'md-ordered-list ',
'tag' => 'md-ordered-list ',
'icon' => icon('list-ordered'),
],
],
[
[
'name' => 'quote',
'tag' => 'md-quote',
'tag' => 'md-quote',
'icon' => icon('quote'),
],
[
'name' => 'link',
'tag' => 'md-link',
'tag' => 'md-link',
'icon' => icon('link'),
],
[
'name' => 'image',
'tag' => 'md-image',
'tag' => 'md-image',
'icon' => icon('image-add'),
],
],

View File

@ -29,13 +29,13 @@ class MultiSelect extends FormComponent
public function render(): string
{
$defaultAttributes = [
'data-class' => $this->attributes['class'],
'multiple' => 'multiple',
'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'data-class' => $this->attributes['class'],
'multiple' => 'multiple',
'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'),
'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
];
$this->attributes['class'] .= ' bg-elevated border-3 border-contrast rounded-lg';
$extra = array_merge($defaultAttributes, $this->attributes);

View File

@ -17,8 +17,8 @@ class Radio extends FormComponent
{
$radioInput = form_radio(
[
'id' => $this->value,
'name' => $this->name,
'id' => $this->value,
'name' => $this->name,
'class' => 'text-accent-base bg-elevated border-contrast border-3 focus:ring-accent w-6 h-6',
],
$this->value,

View File

@ -18,8 +18,8 @@ class RadioButton extends FormComponent
public function render(): string
{
$data = [
'id' => $this->value,
'name' => $this->name,
'id' => $this->value,
'name' => $this->name,
'class' => 'form-radio-btn bg-elevated',
];

View File

@ -21,13 +21,13 @@ class Select extends FormComponent
public function render(): string
{
$defaultAttributes = [
'class' => 'focus:border-contrast focus:ring-accent border-3 rounded-lg bg-elevated border-contrast ' . $this->class,
'data-class' => $this->class,
'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'class' => 'focus:border-contrast focus:ring-accent border-3 rounded-lg bg-elevated border-contrast ' . $this->class,
'data-class' => $this->class,
'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'),
'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
];
$extra = array_merge($this->attributes, $defaultAttributes);

View File

@ -30,7 +30,7 @@ class Toggler extends FormComponent
unset($this->attributes['class']);
$sizeClass = [
'base' => 'form-switch-slider',
'base' => 'form-switch-slider',
'small' => 'form-switch-slider form-switch-slider--small',
];

View File

@ -10,7 +10,7 @@ class XMLEditor extends FormComponent
* @var array<string, string>
*/
protected array $attributes = [
'rows' => '5',
'rows' => '5',
'class' => 'textarea',
];

View File

@ -19,7 +19,7 @@ class Heading extends Component
{
$sizeClasses = [
'small' => 'tracking-wide text-base',
'base' => 'text-xl',
'base' => 'text-xl',
'large' => 'text-3xl',
];

View File

@ -11,14 +11,14 @@ class IconButton extends Button
public function __construct(array $attributes)
{
$iconButtonAttributes = [
'isSquared' => 'true',
'title' => $attributes['slot'],
'isSquared' => 'true',
'title' => $attributes['slot'],
'data-tooltip' => 'bottom',
];
$glyphSize = [
'small' => 'text-sm',
'base' => 'text-lg',
'base' => 'text-lg',
'large' => 'text-2xl',
];

View File

@ -27,7 +27,7 @@ class Pill extends Component
'default' => 'text-gray-800 bg-gray-100 border-gray-300',
'primary' => 'text-accent-contrast bg-accent-base border-accent-base',
'success' => 'text-pine-900 bg-pine-100 border-pine-300',
'danger' => 'text-red-900 bg-red-100 border-red-300',
'danger' => 'text-red-900 bg-red-100 border-red-300',
'warning' => 'text-yellow-900 bg-yellow-100 border-yellow-300',
];

2
builds
View File

@ -53,7 +53,7 @@ if (is_file($file)) {
if (! $found) {
$array['repositories'][] = [
'type' => 'vcs',
'url' => GITHUB_URL,
'url' => GITHUB_URL,
];
}

View File

@ -19,20 +19,20 @@
"adaures/podcast-persons-taxonomy": "^v1.0.0",
"phpseclib/phpseclib": "~2.0.42",
"michalsn/codeigniter4-uuid": "dev-develop",
"codeigniter4/settings": "^v2.1.0",
"codeigniter4/settings": "v2.1.2",
"chrisjean/php-ico": "^1.0.4",
"melbahja/seo": "^v2.1.1",
"codeigniter4/shield": "v1.0.0-beta.3",
"aws/aws-sdk-php": "^3.269.7",
"mpratt/embera": "^2.0.32"
"aws/aws-sdk-php": "^3.272.1",
"mpratt/embera": "^2.0.33"
},
"require-dev": {
"mikey179/vfsstream": "^v1.6.11",
"phpunit/phpunit": "^10.1.2",
"phpunit/phpunit": "^10.2.2",
"captainhook/captainhook": "^5.16.4",
"symplify/easy-coding-standard": "^11.3.2",
"phpstan/phpstan": "^1.10.13",
"rector/rector": "^0.16.0",
"symplify/easy-coding-standard": "^11.3.4",
"phpstan/phpstan": "^1.10.18",
"rector/rector": "^0.17.0",
"symplify/coding-standard": "^11.3.0"
},
"autoload": {

374
composer.lock generated

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More