1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-02 17:29:20 +02:00

Improves theme configuration and RSS metadata

Sets default themes for light and dark modes if not provided.
Switches theme configuration from POST to REQUEST for consistency.
Updates RSS feed's explicit flag to use a boolean value for clarity.

https://github.com/WWBN/AVideo/issues/9988
This commit is contained in:
Daniel Neto 2025-04-21 18:45:54 -03:00
parent eaeefc4d94
commit 88b15d6ba6
2 changed files with 13 additions and 4 deletions

View file

@ -9,10 +9,19 @@ if (!User::isAdmin()) {
forbiddenPage('Admin Only');
}
if(empty($_REQUEST['themeLight'])){
$_REQUEST['themeLight'] = 'default';
}
if(empty($_REQUEST['themeDark'])){
$_REQUEST['themeDark'] = 'netflix';
}
$config = new AVideoConf();
if(!empty($_POST['theme'])){
$config->setTheme($_POST['theme'], @$_REQUEST["defaultTheme"]);
}else if(!empty($_POST['themeLight'])){
if(!empty($_REQUEST['theme'])){
$config->setTheme($_REQUEST['theme'], @$_REQUEST["defaultTheme"]);
}else if(!empty($_REQUEST['themeLight'])){
$config->setThemes($_REQUEST["themeLight"], $_REQUEST["themeDark"], $_REQUEST["defaultTheme"]);
}

View file

@ -27,7 +27,7 @@ if (empty($feed)) {
<sy:updateFrequency>1</sy:updateFrequency>
<language>en</language>
<itunes:category text="Technology" />
<itunes:explicit>no</itunes:explicit>
<itunes:explicit>false</itunes:explicit>
<itunes:author>
<![CDATA[ <?php echo $author; ?> ]]>
</itunes:author>