Merge pull request #4937 from astifter/install_theme_when_set
Install selected theme during settings persistence.
This commit is contained in:
commit
8a7c9d6666
|
@ -1120,6 +1120,7 @@ function admin_page_site_post(App $a)
|
||||||
}
|
}
|
||||||
Config::set('system', 'language', $language);
|
Config::set('system', 'language', $language);
|
||||||
Config::set('system', 'theme', $theme);
|
Config::set('system', 'theme', $theme);
|
||||||
|
Theme::install($theme);
|
||||||
|
|
||||||
if ($theme_mobile == '---') {
|
if ($theme_mobile == '---') {
|
||||||
Config::delete('system', 'mobile-theme');
|
Config::delete('system', 'mobile-theme');
|
||||||
|
|
|
@ -12,6 +12,7 @@ use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
|
use Friendica\Core\Theme;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
|
@ -354,6 +355,7 @@ function settings_post(App $a)
|
||||||
theme_post($a);
|
theme_post($a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Theme::install($theme);
|
||||||
|
|
||||||
$r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d",
|
$r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d",
|
||||||
dbesc($theme),
|
dbesc($theme),
|
||||||
|
|
Loading…
Reference in a new issue