X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_theme.php;h=af640e883b915f30f86348804f2aeb85334ce8e9;hb=69fde1eed360af911850c868e86fb2f63700195b;hp=fb9fad7a1c02e17897d2a8d00d0604069ece168a;hpb=ce9317d4366e4e6413ea12bd8ca91adc9eb7a0b4;p=fa-stable.git diff --git a/admin/inst_theme.php b/admin/inst_theme.php index fb9fad7a..af640e88 100644 --- a/admin/inst_theme.php +++ b/admin/inst_theme.php @@ -14,7 +14,10 @@ $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root."/includes/packages.inc"); -page(_($help_context = "Install Themes")); +if ($use_popup_windows) { + $js = get_js_open_window(900, 500); +} +page(_($help_context = "Install Themes"), false, false, '', $js); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/admin/db/company_db.inc"); @@ -29,15 +32,16 @@ function clean_user_themes($id) global $db_connections, $db, $installed_extensions; $theme = $installed_extensions[$id]['package']; - $db_sav = $db; + $comp = user_company(); foreach ($db_connections as $n => $conn) { - $db = $_SESSION["wa_current_user"]->get_db_connection($n); + $db = $_SESSION["wa_current_user"]->set_db_connection($n); $sql = "UPDATE {$conn['tbpref']}users SET theme='default' WHERE theme='$theme'"; if (!db_query($sql, 'Cannot update user theme settings')) return false; } - $db = $db_sav; + $db = $_SESSION["wa_current_user"]->set_db_connection($comp); + $_SESSION['wa_current_user']->prefs->theme = 'default'; return true; }