mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- resize uploaded image to thumbnail, medium, large, feed, and id3 formats - set image url formats where adapted in views - set format sizes and extensions in Images config file for customization - add validation for image uploads: `min_dims` and `is_image_squared` - update codeigniter4 and myth-auth php packages to latest develop versions - update npm packages to latest versions - update public/.htaccess closes #6
33 lines
788 B
PHP
33 lines
788 B
PHP
<?php
|
|
|
|
/**
|
|
* @copyright 2020 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace App\Validation;
|
|
|
|
class Rules
|
|
{
|
|
/**
|
|
* Value should not be within the array of protected slugs (adminGateway, authGateway or installGateway)
|
|
*
|
|
* @param string $value
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function not_in_protected_slugs(string $value = null): bool
|
|
{
|
|
$appConfig = config('App');
|
|
$protectedSlugs = [
|
|
$appConfig->adminGateway,
|
|
$appConfig->authGateway,
|
|
$appConfig->installGateway,
|
|
];
|
|
return !in_array($value, $protectedSlugs, true);
|
|
}
|
|
|
|
//--------------------------------------------------------------------
|
|
}
|