Release commit (1.7)

This commit is contained in:
RainLoop Team 2014-11-15 00:23:46 +04:00
parent d5c68d1761
commit 7b97a9f85d
25 changed files with 118 additions and 74 deletions

View file

@ -587,10 +587,10 @@ class Http
if ($oLogger)
{
$oLogger->Write('cUrl: URL: '.$sUrl);
if (isset($aOptions[CURLOPT_HTTPHEADER]) && \is_array($aOptions[CURLOPT_HTTPHEADER]) && 0 < \count($aOptions[CURLOPT_HTTPHEADER]))
{
$oLogger->Write('cUrl: Headers: '.\print_r($aOptions[CURLOPT_HTTPHEADER], true));
}
// if (isset($aOptions[CURLOPT_HTTPHEADER]) && \is_array($aOptions[CURLOPT_HTTPHEADER]) && 0 < \count($aOptions[CURLOPT_HTTPHEADER]))
// {
// $oLogger->Write('cUrl: Headers: '.\print_r($aOptions[CURLOPT_HTTPHEADER], true));
// }
}
\MailSo\Base\Http::DetectAndHackFollowLocationUrl($sUrl, $aOptions, $oLogger);

View file

@ -986,8 +986,7 @@ class Actions
static $bResult = null;
if (null === $bResult)
{
// $bResult = $this->licenseParser($this->licenseHelper(false, true));
$bResult = true;
$bResult = $this->licenseParser($this->licenseHelper(false, true));
}
return $bResult;
@ -2645,7 +2644,7 @@ class Actions
/**
* @return string
*/
public function licenseHelper($sForce = false, $bLongCache = false, $iFastCacheTimeInMin = 5, $iLongCacheTimeInDays = 2)
public function licenseHelper($sForce = false, $bLongCache = false, $iFastCacheTimeInMin = 10, $iLongCacheTimeInDays = 3)
{
$sDomain = APP_SITE;
@ -2713,16 +2712,17 @@ class Actions
/**
* @param string $sInput
* @param int $iExpired = 0
*
* @return bool
*/
public function licenseParser($sInput)
public function licenseParser($sInput, &$iExpired = 0)
{
$aMatch = array();
if (\preg_match('/^EXPIRED:([\d]+)$/', $sInput, $aMatch))
{
$iTime = (int) $aMatch[1];
return \time() < $iTime;
$iExpired = (int) $aMatch[1];
return \time() < $iExpired;
}
return false;
@ -2750,15 +2750,15 @@ class Actions
\sleep(1);
}
$aMatch = array();
if (\preg_match('/^EXPIRED:([\d]+)$/', $sValue, $aMatch))
$iExpired = 0;
if ($this->licenseParser($sValue, $iExpired))
{
$mResult = array(
'Banned' => false,
'Expired' => (int) $aMatch[1],
'Expired' => $iExpired,
);
}
else if ($sValue === 'NO')
else if ($sValue === 'NO' || \preg_match('/^EXPIRED:[\d]+$/', $sValue))
{
$iErrorCode = -1;
}

View file

@ -34,24 +34,24 @@ class ChangePassword extends \RainLoop\Providers\AbstractProvider
}
/**
* @param \RainLoop\Model\Account $oAccount
* @param \RainLoop\Account $oAccount
*
* @return bool
*/
public function PasswordChangePossibility($oAccount)
{
return $this->IsActive() &&
$oAccount instanceof \RainLoop\Model\Account &&
$oAccount instanceof \RainLoop\Account &&
$this->oDriver && $this->oDriver->PasswordChangePossibility($oAccount)
;
}
/**
* @param \RainLoop\Model\Account $oAccount
* @param \RainLoop\Account $oAccount
* @param string $sPrevPassword
* @param string $sNewPassword
*/
public function ChangePassword(\RainLoop\Model\Account $oAccount, $sPrevPassword, $sNewPassword)
public function ChangePassword(\RainLoop\Account $oAccount, $sPrevPassword, $sNewPassword)
{
if ($this->oDriver instanceof \RainLoop\Providers\ChangePassword\ChangePasswordInterface &&
$this->PasswordChangePossibility($oAccount))

View file

@ -5,18 +5,18 @@ namespace RainLoop\Providers\ChangePassword;
interface ChangePasswordInterface
{
/**
* @param \RainLoop\Model\Account $oAccount
* @param \RainLoop\Account $oAccount
*
* @return bool
*/
public function PasswordChangePossibility($oAccount);
/**
* @param \RainLoop\Model\Account $oAccount
* @param \RainLoop\Account $oAccount
* @param string $sPrevPassword
* @param string $sNewPassword
*
* @return bool
*/
public function ChangePassword(\RainLoop\Model\Account $oAccount, $sPrevPassword, $sNewPassword);
public function ChangePassword(\RainLoop\Account $oAccount, $sPrevPassword, $sNewPassword);
}

View file

@ -20,12 +20,12 @@ class Suggestions extends \RainLoop\Providers\AbstractProvider
}
/**
* @param \RainLoop\Model\Account $oAccount
* @param \RainLoop\Account $oAccount
* @param string $sQuery
*
* @return array
*/
public function Process(\RainLoop\Model\Account $oAccount, $sQuery)
public function Process(\RainLoop\Account $oAccount, $sQuery)
{
return $this->oDriver && $this->IsActive() && 0 < \strlen($sQuery) ? $this->oDriver->Process($oAccount, $sQuery) : array();
}

View file

@ -33,9 +33,9 @@
</button>
</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>
</center>
</div>
<div class="loginAfter"></div>

View file

@ -1,7 +1,7 @@
<div class="b-admin-branding">
<div class="row" data-bind="visible: !capa">
<div class="alert span8" style="margin-top: 10px;">
Full functionality available in <strong><a href="#/licensing">Premium version</a></strong> only.
This functionality is available for <strong><a href="#/licensing">Premium</a></strong> subscribers.
</div>
</div>
<div class="form-horizontal" data-bind="css: {'disabled-form': !capa}">
@ -77,17 +77,18 @@
}"></div>
</div>
</div>
<!-- <div class="control-group">
<div class="control-group">
<div class="controls">
<div data-bind="component: {
name: 'Checkbox',
params: {
label: 'Show &quot;Powered by RainLoop&quot; link',
enable: capa,
label: 'Show &quot;Powered by RainLoop&quot; link (White Labeling)',
value: loginPowered
}
}"></div>
</div>
</div>-->
</div>
<div class="control-group">
<label class="control-label">
Custom CSS

View file

@ -6,17 +6,18 @@
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)</strong> license.
<br />
<br />
You are <strong>free</strong> to use it for your <strong>personal</strong> or <strong>non-profit</strong> projects.
You are <strong>free</strong> to use it for your <strong>personal</strong> projects.
<br />
<br />
Commercial use of <strong>RainLoop Webmail</strong> requires getting a
<a href="http://rainloop.net/purchase/" target="_blank">permission</a>.
Commercial use (with additional features) of <strong>RainLoop Webmail</strong> requires getting a
<a href="http://rainloop.net/purchase/" target="_blank">subscription</a>.
</div>
</div>
<br />
<div class="form-horizontal">
<div class="control-group">
<label class="control-label">
Your Domain
Your domain
</label>
<div class="controls">
<span class="help-inline" style="padding-top: 5px;">
@ -25,29 +26,49 @@
</div>
</div>
<div class="control-group" data-bind="visible: !subscriptionEnabled()">
<label class="control-label" style="padding-top: 20px">
Version
</label>
<div class="controls">
<div class="alert alert-block span8" style="margin-left: 0">
This domain can't be licensed for commercial use.
<h4>
Basic
<span data-bind="visible: licenseIsUnlim()">&nbsp;(Unlim)</span>
</h4>
<br />
<p>
This domain can't be licensed.
</p>
</div>
</div>
</div>
<div class="control-group" data-bind="visible: subscriptionEnabled">
<label class="control-label" style="padding-top: 20px">
Version
</label>
<div class="controls">
<div data-bind="visible: licensingProcess()">
<div data-bind="visible: licensingProcess()" style="padding-top: 20px">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
Checking&hellip;
</div>
<div data-bind="visible: !licensingProcess()">
<div class="alert alert-block span8" style="margin-left: 0" data-bind="visible: !licensing()">
This domain isn't licensed for commercial use.
<div class="alert alert-block span8" style="margin-left: 0; padding-top: 20px" data-bind="visible: !licensing()">
<h4>
Basic
</h4>
<br />
<p>
This domain isn't licensed for commercial use (with additional features).
</p>
</div>
<div data-bind="visible: licensing()">
<div class="alert alert-success span8" style="margin-left: 0" data-bind="visible: licenseValid() && '' === licenseError()">
<p>
This domain is licensed for commercial use
</p>
<p data-bind="visible: 0 < licenseExpired()">
<div class="alert alert-success span8" style="margin-left: 0; padding-top: 20px" data-bind="visible: licenseValid() && '' === licenseError()">
<h4>
<span data-bind="visible: licenseIsUnlim()">Lifetime (Premium)</span>
<span data-bind="visible: !licenseIsUnlim()">Premium</span>
</h4>
<p data-bind="visible: 0 < licenseExpired()" style="padding-top: 10px">
<b>Subscription expires:</b>
&nbsp;
<span data-bind="text: licenseExpiredMomentValue()"></span>

View file

@ -34,7 +34,7 @@
<br />
<div class="alert">
<p>
After activation, commercial subscription for <strong data-bind="text: domain"></strong> will be extended.
After activation, premium subscription for <strong data-bind="text: domain"></strong> will be extended.
<br />
Note that subscription key can be activated for a single domain only.
</p>

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>