Revision e01e164c
Added by NewEraCracker over 8 years ago
src/etc/inc/auth.inc | ||
---|---|---|
1551 | 1551 |
return $settings; |
1552 | 1552 |
} |
1553 | 1553 |
|
1554 |
function save_widget_settings($username, $settings) { |
|
1554 |
function save_widget_settings($username, $settings, $message = "") {
|
|
1555 | 1555 |
global $config, $userindex; |
1556 | 1556 |
$user = getUserEntry($username); |
1557 |
|
|
1558 |
if (strlen($message) > 0) { |
|
1559 |
$msgout = $message; |
|
1560 |
} else { |
|
1561 |
$msgout = gettext("Widget configuration has been changed."); |
|
1562 |
} |
|
1563 |
|
|
1557 | 1564 |
if (isset($user['customsettings'])) { |
1558 | 1565 |
$config['system']['user'][$userindex[$username]]['widgets'] = $settings; |
1559 |
write_config(sprintf(gettext("Widget configuration has been changed for user %s."), $username));
|
|
1566 |
write_config($msgout . " " . sprintf(gettext("(User %s)"), $username));
|
|
1560 | 1567 |
} else { |
1561 | 1568 |
$config['widgets'] = $settings; |
1562 |
write_config(gettext("Widget configuration has been changed."));
|
|
1569 |
write_config($msgout);
|
|
1563 | 1570 |
} |
1564 | 1571 |
} |
1565 | 1572 |
|
Also available in: Unified diff
Backport save_widget_settings with 3 arguments from RELENG_2_3
Commit 6f1410582412fe771f51bd8b67bcbb952da97db6 introduced code relying on this