Small fixes

This commit is contained in:
RainLoop Team 2014-10-18 19:19:37 +04:00
parent adb92ba3ef
commit d17f249f45
5 changed files with 18 additions and 11 deletions

View file

@ -1050,6 +1050,8 @@
oData.determineUserLanguage = ko.observable(false);
oData.determineUserDomain = ko.observable(false);
oData.weakPassword = ko.observable(false);
oData.messagesPerPage = ko.observable(Consts.Defaults.MessagesPerPage);//.extend({'throttle': 200});
oData.mainMessagesPerPage = oData.messagesPerPage;
@ -2055,7 +2057,7 @@
Utils.__themeTimer = 0;
Utils.__themeAjax = null;
Utils.changeTheme = function (sValue, themeTrigger)
{
var

View file

@ -32,14 +32,14 @@
this.capaAdditionalAccounts = Data.capaAdditionalAccounts;
this.capaAdditionalIdentities = Data.capaAdditionalIdentities;
this.weakPassword = Data.weakPassword;
this.mainAttachmentLimit = ko.observable(Utils.pInt(Settings.settingsGet('AttachmentLimit')) / (1024 * 1024)).extend({'posInterer': 25});
this.uploadData = Settings.settingsGet('PhpUploadSizes');
this.uploadDataDesc = this.uploadData && (this.uploadData['upload_max_filesize'] || this.uploadData['post_max_size']) ?
[
this.uploadData['upload_max_filesize'] ? 'upload_max_filesize = ' + this.uploadData['upload_max_filesize'] + '; ' : '',
this.uploadData['post_max_size'] ? 'post_max_size = ' + this.uploadData['post_max_size'] : ''
].join('')
: '';
this.uploadDataDesc = this.uploadData && (this.uploadData['upload_max_filesize'] || this.uploadData['post_max_size']) ? [
this.uploadData['upload_max_filesize'] ? 'upload_max_filesize = ' + this.uploadData['upload_max_filesize'] + '; ' : '',
this.uploadData['post_max_size'] ? 'post_max_size = ' + this.uploadData['post_max_size'] : ''
].join('') : '';
this.themesOptions = ko.computed(function () {
return _.map(Data.themes(), function (sTheme) {
@ -54,8 +54,6 @@
return Utils.convertLangName(this.mainLanguage());
}, this);
this.weakPassword = !!Settings.settingsGet('WeakPassword');
this.attachmentLimitTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
this.languageTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
this.themeTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
@ -89,7 +87,7 @@
});
self.theme.subscribe(function (sValue) {
Utils.changeTheme(sValue, self.themeTrigger);
Remote.saveAdminConfig(f3, {

View file

@ -23,6 +23,8 @@
{
this.useLocalProxyForExternalImages = Data.useLocalProxyForExternalImages;
this.weakPassword = Data.weakPassword;
this.capaOpenPGP = ko.observable(Settings.capa(Enums.Capa.OpenPGP));
this.capaTwoFactorAuth = ko.observable(Settings.capa(Enums.Capa.TwoFactor));
@ -96,6 +98,8 @@
this.adminPasswordNew2('');
this.adminPasswordUpdateSuccess(true);
this.weakPassword(!!oData.Result.Weak);
}
else
{

View file

@ -46,6 +46,8 @@
this.determineUserLanguage(!!Settings.settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
this.capaThemes(Settings.capa(Enums.Capa.Themes));
this.allowLanguagesOnLogin(!!Settings.settingsGet('AllowLanguagesOnLogin'));
this.allowLanguagesOnSettings(!!Settings.settingsGet('AllowLanguagesOnSettings'));

View file

@ -2728,7 +2728,8 @@ class Actions
$bResult = true;
}
return $this->DefaultResponse(__FUNCTION__, $bResult ? $oConfig->Save() : false);
return $this->DefaultResponse(__FUNCTION__, $bResult ?
($oConfig->Save() ? array('Weak' => $oConfig->ValidatePassword('12345')) : false) : false);
}
/**