Small fixes (Release commit)

This commit is contained in:
RainLoop Team 2014-11-05 23:40:20 +04:00
parent 8747ea59ac
commit eb30a1fe27
16 changed files with 155 additions and 55 deletions

View file

@ -244,6 +244,7 @@
}
else
{
// ko.components.register('Checkbox', require('Component/Classic/Checkbox'));
ko.components.register('Checkbox', require('Component/Checkbox'));
}

View file

@ -16,7 +16,8 @@
this.sBase = '#/';
this.sServer = './?';
this.sSubQuery = '&/s/=/';
this.sSubQuery = '&s=/';
this.sSubSubQuery = '&ss=/';
this.sVersion = Settings.settingsGet('Version');
this.sSpecSuffix = Settings.settingsGet('AuthAccountHash') || '0';
this.sStaticPrefix = Settings.settingsGet('StaticPrefix') || 'rainloop/v/' + this.sVersion + '/static/';
@ -44,7 +45,7 @@
*/
Links.prototype.attachmentDownload = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + this.sSubSubQuery + sDownload;
};
/**
@ -53,7 +54,7 @@
*/
Links.prototype.attachmentPreview = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/View/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/View/' + this.sSubSubQuery + sDownload;
};
/**
@ -62,7 +63,7 @@
*/
Links.prototype.attachmentPreviewAsPlain = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + this.sSubSubQuery + sDownload;
};
/**
@ -71,7 +72,7 @@
*/
Links.prototype.attachmentFramed = function (sDownload)
{
return this.sServer + '/Raw' + this.sSubQuery + this.sSpecSuffix + '/FramedView/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/FramedView/' + this.sSubSubQuery + sDownload;
};
/**
@ -130,7 +131,7 @@
*/
Links.prototype.messageViewLink = function (sRequestHash)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + sRequestHash;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + this.sSubSubQuery + sRequestHash;
};
/**
@ -139,7 +140,7 @@
*/
Links.prototype.messageDownloadLink = function (sRequestHash)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + sRequestHash;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + this.sSubSubQuery + sRequestHash;
};
/**

View file

@ -0,0 +1,29 @@
(function () {
'use strict';
var
_ = require('_'),
AbstracCheckbox = require('Component/AbstracCheckbox')
;
/**
* @constructor
*
* @param {Object} oParams
*
* @extends AbstracCheckbox
*/
function ClassicCheckboxComponent(oParams)
{
AbstracCheckbox.call(this, oParams);
}
_.extend(ClassicCheckboxComponent.prototype, AbstracCheckbox.prototype);
module.exports = AbstracCheckbox.componentExportHelper(
ClassicCheckboxComponent, 'CheckboxClassicComponent');
}());

View file

@ -81,7 +81,7 @@
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
}
if (Settings.settingsGet('AllowGoogleSocial') ||
if ((Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) ||
Settings.settingsGet('AllowFacebookSocial') ||
Settings.settingsGet('AllowTwitterSocial'))
{

View file

@ -54,3 +54,8 @@ select:focus {
html.mobile * {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
input::-ms-clear,
input::-ms-reveal {
display: none;
}

View file

@ -10,6 +10,7 @@
Enums = require('Common/Enums'),
Utils = require('Common/Utils'),
Settings = require('Storage/Settings'),
Remote = require('Storage/Admin/Remote'),
kn = require('Knoin/Knoin'),
@ -24,6 +25,8 @@
{
AbstractView.call(this, 'Center', 'AdminLogin');
this.logoPowered = !!Settings.settingsGet('LoginPowered');
this.login = ko.observable('');
this.password = ko.observable('');

View file

@ -1,8 +1,8 @@
{
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.10",
"release": "190",
"version": "1.6.11",
"release": "191",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "gulpfile.js",

View file

@ -63,7 +63,7 @@ class FolderCollection extends \MailSo\Base\Collection
*
* @return \MailSo\Mail\Folder|null
*/
public function &GetByFullNameRaw($sFullNameRaw)
public function GetByFullNameRaw($sFullNameRaw)
{
$mResult = null;
foreach ($this->aItems as /* @var $oFolder \MailSo\Mail\Folder */ $oFolder)
@ -73,6 +73,18 @@ class FolderCollection extends \MailSo\Base\Collection
$mResult = $oFolder;
break;
}
else if ($oFolder->HasSubFolders())
{
$mResult = $oFolder->SubFolders(true)->GetByFullNameRaw($sFullNameRaw);
if ($mResult)
{
break;
}
else
{
$mResult = null;
}
}
}
return $mResult;

View file

@ -2095,24 +2095,27 @@ class MailClient
}
/**
* @param string $sFolderNameInUtf
* @param string $sFolderNameInUtf8
* @param string $sFolderParentFullNameRaw = ''
* @param bool $bSubscribeOnCreation = true
* @param string $sDelimiter = ''
*
* @return \MailSo\Mail\MailClient
*
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
*/
public function FolderCreate($sFolderNameInUtf, $sFolderParentFullNameRaw = '', $bSubscribeOnCreation = true)
public function FolderCreate($sFolderNameInUtf8, $sFolderParentFullNameRaw = '', $bSubscribeOnCreation = true, $sDelimiter = '')
{
if (!\MailSo\Base\Validator::NotEmptyString($sFolderNameInUtf, true) ||
if (!\MailSo\Base\Validator::NotEmptyString($sFolderNameInUtf8, true) ||
!\is_string($sFolderParentFullNameRaw))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
}
$sFolderNameInUtf = trim($sFolderNameInUtf);
$sFolderNameInUtf8 = \trim($sFolderNameInUtf8);
if (0 === \strlen($sDelimiter) || 0 < \strlen(\trim($sFolderParentFullNameRaw)))
{
$aFolders = $this->oImapClient->FolderList('', 0 === \strlen(\trim($sFolderParentFullNameRaw)) ? 'INBOX' : $sFolderParentFullNameRaw);
if (!\is_array($aFolders) || !isset($aFolders[0]))
{
@ -2128,8 +2131,9 @@ class MailClient
{
$sFolderParentFullNameRaw .= $sDelimiter;
}
}
$sFullNameRawToCreate = \MailSo\Base\Utils::ConvertEncoding($sFolderNameInUtf,
$sFullNameRawToCreate = \MailSo\Base\Utils::ConvertEncoding($sFolderNameInUtf8,
\MailSo\Base\Enumerations\Charset::UTF_8,
\MailSo\Base\Enumerations\Charset::UTF_7_IMAP);

View file

@ -326,8 +326,11 @@ class Actions
$sQuery = \trim(\trim($sQuery), ' /');
$sSubQuerty = \trim(\trim($this->Http()->GetQuery('/s/', '')), ' /');
$sSubQuerty = \trim(\trim($this->Http()->GetQuery('s', '')), ' /');
$sSubSubQuerty = \trim(\trim($this->Http()->GetQuery('ss', '')), ' /');
$sQuery .= 0 < \strlen($sSubQuerty) ? '/'.$sSubQuerty : '';
$sQuery .= 0 < \strlen($sSubSubQuerty) ? '/'.$sSubSubQuerty : '';
if ('' === $this->GetSpecAuthToken())
{
@ -773,16 +776,22 @@ class Actions
$oHttp = $this->Http();
$this->oLogger->Write('[DATE:'.\gmdate('d.m.y').'][RL:'.APP_VERSION.'][PHP:'.PHP_VERSION.'][IP:'.
$oHttp->GetClientIp().'][PID:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? \getmypid() : 'unknown').
'][GUID:'.\MailSo\Log\Logger::Guid().']');
$this->oLogger->Write(
'[APC:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('apc_fetch') ? 'on' : 'off').']'.
'[MB:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('mb_convert_encoding') ? 'on' : 'off').']'.
'[PDO:'.(\class_exists('PDO') ? \implode(',', \PDO::getAvailableDrivers()) : 'off').']'.
'['.\implode(',', \stream_get_transports()).']'
$oHttp->GetClientIp().'][PID:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? \getmypid() : 'unknown').']['.
$oHttp->GetServer('SERVER_SOFTWARE', '~').']['.
(\MailSo\Base\Utils::FunctionExistsAndEnabled('php_sapi_name') ? \php_sapi_name() : '~' ).']'
);
$sPdo = (\class_exists('PDO') ? \implode(',', \PDO::getAvailableDrivers()) : 'off');
$sPdo = empty($sPdo) ? '~' : $sPdo;
$this->oLogger->Write('['.
'Suhosin:'.(\extension_loaded('suhosin') || @\ini_get('suhosin.get.max_value_length') ? 'on' : 'off').
'][APC:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('apc_fetch') ? 'on' : 'off').
'][MB:'.(\MailSo\Base\Utils::FunctionExistsAndEnabled('mb_convert_encoding') ? 'on' : 'off').
'][PDO:'.$sPdo.
'][Streams:'.\implode(',', \stream_get_transports()).
']');
$this->oLogger->Write(
'['.$oHttp->GetMethod().'] '.$oHttp->GetScheme().'://'.$oHttp->GetHost(false, false).$oHttp->GetServer('REQUEST_URI', ''),
\MailSo\Log\Enumerations\Type::NOTE, 'REQUEST');
@ -977,7 +986,7 @@ class Actions
static $bResult = null;
if (null === $bResult)
{
$bResult = $this->licenseParser($this->licenseHelper(false, true));
// $bResult = $this->licenseParser($this->licenseHelper(false, true));
$bResult = true;
}
@ -4009,7 +4018,7 @@ class Actions
$aFolders =& $oFolders->GetAsArray();
if (\is_array($aFolders) && 0 < \count($aFolders))
{
if ($bListFolderTypes && false)
if ($bListFolderTypes)
{
foreach ($aFolders as $oFolder)
{
@ -4042,7 +4051,7 @@ class Actions
$sName = $oFolder->Name();
$sFullName = $oFolder->FullName();
if (isset($aMap[$sName], $aMap[$sFullName]))
if (isset($aMap[$sName]) || isset($aMap[$sFullName]))
{
$iFolderType = isset($aMap[$sName]) ? $aMap[$sName] : $aMap[$sFullName];
if (!isset($aResult[$iFolderType]) && \in_array($iFolderType, array(
@ -4159,9 +4168,19 @@ class Actions
}
}
$sFullNameToCheck = \MailSo\Base\Utils::ConvertEncoding($mFolderNameToCreate,
\MailSo\Base\Enumerations\Charset::UTF_8, \MailSo\Base\Enumerations\Charset::UTF_7_IMAP);
if (0 < \strlen(\trim($sParent)))
{
$sFullNameToCheck = $sParent.$sDelimiter.$sFullNameToCheck;
}
if (!$oFolderCollection->GetByFullNameRaw($sFullNameToCheck))
{
try
{
if ($this->MailClient()->FolderCreate($mFolderNameToCreate, $sParent))
if ($this->MailClient()->FolderCreate($mFolderNameToCreate, $sParent, true, $sDelimiter))
{
$bDoItAgain = true;
}
@ -4173,6 +4192,7 @@ class Actions
}
}
}
}
if ($bDoItAgain)
{
@ -6492,8 +6512,9 @@ class Actions
$aParams[2] = 'View';
\array_shift($aParams);
$sLast = \array_pop($aParams);
$sUrl = $this->Http()->GetFullUrl().'?/Raw/&/s/=/'.implode('/', $aParams);
$sUrl = $this->Http()->GetFullUrl().'?/Raw/&s=/'.implode('/', $aParams).'/&ss=/'.$sLast;
$sFullUrl = 'http://docs.google.com/viewer?embedded=true&url='.urlencode($sUrl);
@\header('Content-Type: text/html; charset=utf-8');

View file

@ -55,6 +55,7 @@ class Application extends \RainLoop\Config\AbstractConfig
protected function defaultValues()
{
return array(
'webmail' => array(
'title' => array('RainLoop Webmail', 'Text displayed as page title'),
@ -188,9 +189,9 @@ Examples:
),
'social' => array(
'google_enable' => array(false, 'Google'),
'google_enable_auth' => array(true),
'google_enable_drive' => array(true),
'google_enable' => array(true, 'Google'),
'google_enable_auth' => array(false),
'google_enable_drive' => array(false),
'google_enable_preview' => array(true),
'google_client_id' => array(''),
'google_client_secret' => array(''),

View file

@ -408,6 +408,14 @@ class ServiceActions
$sRawError = '';
}
}
else
{
$sRawError = 'Unknown action "'.$sAction.'"';
}
}
else
{
$sRawError = 'Empty action';
}
}
catch (\RainLoop\Exceptions\ClientException $oException)
@ -428,6 +436,7 @@ class ServiceActions
if (0 < \strlen($sRawError))
{
$this->oActions->Logger()->Write($sRawError, \MailSo\Log\Enumerations\Type::ERROR);
$this->oActions->Logger()->WriteDump($this->aPaths, \MailSo\Log\Enumerations\Type::ERROR, 'PATHS');
}
if ($oException)

View file

@ -33,6 +33,9 @@
</button>
</div>
</form>
<!-- <div class="e-powered thm-powered" data-bind="visible: logoPowered">
Powered by <a href="http://rainloop.net" target="_blank">RainLoop</a>
</div>-->
</center>
</div>
<div class="loginAfter"></div>

View file

@ -0,0 +1,7 @@
<label class="e-component e-checkbox" data-bind="css: {'inline': inline, 'disabled': disable() || !enable() }">
<input type="checkbox" data-bind="checked: value, disable: disable() || !enable()" />
<!-- ko if: labeled -->
&nbsp;&nbsp;
<span class="sub-label i18n" data-bind="attr: {'data-i18n-text': label}"></span>
<!-- /ko -->
</label>

View file

@ -84,9 +84,9 @@
</div>
</div>
</form>
<div class="e-powered thm-powered" data-bind="visible: logoPowered">
<!-- <div class="e-powered thm-powered" data-bind="visible: logoPowered">
Powered by <a href="http://rainloop.net" target="_blank">RainLoop</a>
</div>
</div>-->
<div class="e-languages thm-languages" data-bind="visible: allowLanguagesOnLogin() && socialLoginEnabled()">
<label class="flag-selector">
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>

View file

@ -7,6 +7,10 @@
@ini_set('magic_quotes_gpc', 0);
@ini_set('magic_quotes_runtime', 0);
@ini_set('suhosin.session.encrypt', 0);
@ini_set('suhosin.get.max_name_length', 2014);
@ini_set('suhosin.get.max_value_length', 2014);
define('APP_DEFAULT_DENY_ALL_HTACCESS', 'Deny from all
<IfModule mod_autoindex.c>
Options -Indexes