Selaa lähdekoodia

! "enableThemes" is the new "knownThemes"...

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 vuotta sitten
vanhempi
commit
835e066d5e
2 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 2 2
      Sources/Load.php
  2. 2 1
      Sources/Profile-Modify.php

+ 2 - 2
Sources/Load.php

@@ -1446,9 +1446,9 @@ function loadTheme($id_theme = 0, $initialize = true)
 	// If they have specified a particular theme to use with SSI allow it to be used.
 	elseif (!empty($ssi_theme) && $id_theme == $ssi_theme)
 		$id_theme = (int) $id_theme;
-	elseif (!empty($modSettings['knownThemes']) && !allowedTo('admin_forum'))
+	elseif (!empty($modSettings['enableThemes']) && !allowedTo('admin_forum'))
 	{
-		$themes = explode(',', $modSettings['knownThemes']);
+		$themes = explode(',', $modSettings['enableThemes']);
 		if (!in_array($id_theme, $themes))
 			$id_theme = $modSettings['theme_guests'];
 		else

+ 2 - 1
Sources/Profile-Modify.php

@@ -1124,7 +1124,8 @@ function makeThemeChanges($memID, $id_theme)
 			);
 		}
 
-		$themes = explode(',', $modSettings['knownThemes']);
+		// Admins can choose any theme, even if it's not enabled...
+		$themes = allowedTo('admin_forum') ? explode(',', $modSettings['knownThemes']) : explode(',', $modSettings['enableThemes']);
 		foreach ($themes as $t)
 			cache_put_data('theme_settings-' . $t . ':' . $memID, null, 60);
 	}