small fixes (p1)

This commit is contained in:
RainLoop Team 2013-11-19 03:20:30 +04:00
parent 90496a0ff6
commit ea98954394
7 changed files with 30 additions and 13 deletions

View file

@ -10,6 +10,7 @@ module.exports = function (grunt) {
cfg: { cfg: {
devVersion: "0.0.0", devVersion: "0.0.0",
releasesPath: 'releases', releasesPath: 'releases',
releasesSrcPath: '',
releaseFolder: 'rainloop', releaseFolder: 'rainloop',
releaseZipFile: 'rainloop.zip' releaseZipFile: 'rainloop.zip'
}, },
@ -400,14 +401,24 @@ module.exports = function (grunt) {
grunt.file.write(dist + 'data/VERSION', versionFull); grunt.file.write(dist + 'data/VERSION', versionFull);
grunt.file.write(dist + 'rainloop/v/' + versionFull + '/VERSION', versionFull); grunt.file.write(dist + 'rainloop/v/' + versionFull + '/VERSION', versionFull);
grunt.file.delete(dist + 'rainloop/v/' + versionFull + '/static/css/less.css');
grunt.file.write('package.json', grunt.file.write('package.json',
packageJsonContent.replace(/"release":\s?"[\d]+",/, '"release": "' + (1 + parseInt(release, 10)) + '",')); packageJsonContent.replace(/"release":\s?"[\d]+",/, '"release": "' + (1 + parseInt(release, 10)) + '",'));
grunt.config.set('cfg.releaseFolder', versionFull); grunt.config.set('cfg.releaseFolder', versionFull);
grunt.config.set('cfg.releasesSrcPath', dist);
grunt.config.set('cfg.releaseZipFile', 'rainloop-' + versionFull + '.zip'); grunt.config.set('cfg.releaseZipFile', 'rainloop-' + versionFull + '.zip');
}); });
grunt.registerTask('rainloop-clear', 'RainLoop Webmail clear task', function () {
var releasesSrcPath = grunt.config('cfg.releasesSrcPath');
if ('' !== releasesSrcPath)
{
require('wrench').rmdirSyncRecursive(releasesSrcPath);
}
});
// uglify // uglify
grunt.registerTask('rlmin', ['uglify:min_app', 'uglify:min_admin']); grunt.registerTask('rlmin', ['uglify:min_app', 'uglify:min_admin']);
@ -421,7 +432,7 @@ module.exports = function (grunt) {
// --- // ---
grunt.registerTask('default', ['less', 'concat', 'cssmin', 'jshint', 'rlmin']); grunt.registerTask('default', ['less', 'concat', 'cssmin', 'jshint', 'rlmin']);
grunt.registerTask('build', ['default', 'rlmin', 'rainloop', 'compress:build', 'md5:build']); grunt.registerTask('build', ['default', 'rlmin', 'rainloop', 'compress:build', 'md5:build', 'rainloop-clear']);
// aliases // aliases
grunt.registerTask('u', ['uglify']); grunt.registerTask('u', ['uglify']);

View file

@ -18,7 +18,10 @@ function RainLoopApp()
this.quotaDebounce = _.debounce(this.quota, 1000 * 30); this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
$.wakeUp(function (iSleepTime) { $.wakeUp(function (iSleepTime) {
RL.remote().jsInfo(Utils.emptyFunction, {'WakeUpTime': Math.round(iSleepTime / 1000)}, true); RL.remote().jsInfo(Utils.emptyFunction, {
'Version': this.settingsGet('Version'),
'WakeUpTime': Math.round(iSleepTime / 1000)
}, true);
}, {}, 60 * 60 * 1000); }, {}, 60 * 60 * 1000);
} }

View file

@ -2,7 +2,7 @@
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.4.0", "version": "1.4.0",
"release": "507", "release": "511",
"description": "Simple, modern & fast web-based email client", "description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net", "homepage": "http://rainloop.net",
"main": "Gruntfile.js", "main": "Gruntfile.js",

View file

@ -112,9 +112,9 @@ class ServiceActions
try try
{ {
if ($this->oHttp->IsPost() && if ($this->oHttp->IsPost() && !in_array($sAction, array('JsInfo', 'JsError')) &&
$this->Config()->Get('security', 'csrf_protection', false) $this->Config()->Get('security', 'csrf_protection', false) &&
&& $this->oHttp->GetPost('XToken', '') !== \RainLoop\Utils::GetCsrfToken()) $this->oHttp->GetPost('XToken', '') !== \RainLoop\Utils::GetCsrfToken())
{ {
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidToken); throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidToken);
} }

File diff suppressed because one or more lines are too long

View file

@ -15243,7 +15243,10 @@ function RainLoopApp()
this.quotaDebounce = _.debounce(this.quota, 1000 * 30); this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
$.wakeUp(function (iSleepTime) { $.wakeUp(function (iSleepTime) {
RL.remote().jsInfo(Utils.emptyFunction, {'WakeUpTime': Math.round(iSleepTime / 1000)}, true); RL.remote().jsInfo(Utils.emptyFunction, {
'Version': this.settingsGet('Version'),
'WakeUpTime': Math.round(iSleepTime / 1000)
}, true);
}, {}, 60 * 60 * 1000); }, {}, 60 * 60 * 1000);
} }

File diff suppressed because one or more lines are too long