on load, make sure theme is valid

This commit is contained in:
rolux 2013-02-19 17:18:25 +05:30
parent 9814f02052
commit 9858121b5a

View file

@ -241,6 +241,10 @@ appPanel
}); });
// patch theme ... this can be removed at a later point // patch theme ... this can be removed at a later point
pandora.user.ui.theme = legacyThemes[pandora.user.ui.theme] || pandora.user.ui.theme; pandora.user.ui.theme = legacyThemes[pandora.user.ui.theme] || pandora.user.ui.theme;
// make sure theme is valid
if (!Ox.contains(pandora.site.themes, pandora.user.ui.theme)) {
pandora.user.ui.theme = pandora.site.user.ui.theme;
}
// patch itemView ... this can be removed at a later point // patch itemView ... this can be removed at a later point
if (pandora.user.ui.itemView == 'video') { if (pandora.user.ui.itemView == 'video') {
pandora.user.ui.itemView = 'player'; pandora.user.ui.itemView = 'player';