Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 0b7afb5

Browse files
committed
+ Multiple identities (#9)
- animation settings * minor fixes
1 parent b2dafe9 commit 0b7afb5

File tree

438 files changed

+6048
-5202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+6048
-5202
lines changed

data/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.9.485
1+
1.3.10.490

index.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<?php
22

33
define('APP_INDEX_ROOT_PATH', rtrim(dirname(__FILE__), '\\/').'/');
4-
define('APP_INDEX_FILE_NAME', !empty($_SERVER['PHP_SELF']) ? basename($_SERVER['PHP_SELF']) : 'index.php');
54

65
$sCustomDataPath = '';
76
if (file_exists(APP_INDEX_ROOT_PATH.'include.php'))
87
{
98
include_once APP_INDEX_ROOT_PATH.'include.php';
10-
$sCustomDataPath = function_exists('__get_custom_data_full_path') ? trim(trim(__get_custom_data_full_path()), '\\/') : '';
9+
$sCustomDataPath = function_exists('__get_custom_data_full_path') ? rtrim(trim(__get_custom_data_full_path()), '\\/') : '';
1110
}
1211

1312
define('APP_DATA_FOLDER_PATH', 0 === strlen($sCustomDataPath) ? APP_INDEX_ROOT_PATH.'data/' : $sCustomDataPath.'/');
@@ -16,27 +15,19 @@
1615
if (false !== $sVersion)
1716
{
1817
$sVersion = trim(preg_replace('/[\.]+/', '.', preg_replace('/[^a-zA-Z0-9\.\-_]/', '', $sVersion)));
19-
if (0 < strlen($sVersion))
18+
if (0 < strlen($sVersion) && file_exists(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sVersion.'/index.php'))
2019
{
2120
define('APP_VERSION', $sVersion);
22-
if (file_exists(APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/index.php'))
23-
{
24-
include APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/index.php';
25-
}
26-
else
27-
{
28-
echo 'Can\'t find startup file (Error Code: 103)';
29-
exit(103);
30-
}
21+
include APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/index.php';
3122
}
3223
else
3324
{
34-
echo 'Version file content error (Error Code: 102)';
25+
echo '[102] Version file content error';
3526
exit(102);
3627
}
3728
}
3829
else
3930
{
40-
echo 'Can\'t read version file (Error Code: 101)';
31+
echo '[101] Can\'t read version file';
4132
exit(101);
4233
}
File renamed without changes.

rainloop/v/1.3.10.490/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3.10.490

rainloop/v/1.3.9.485/app/libraries/MailSo/Base/Http.php renamed to rainloop/v/1.3.10.490/app/libraries/MailSo/Base/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public function GetHost($bWithRemoteUserData = false, $bRemoveWWW = true)
301301

302302
if ($bRemoveWWW)
303303
{
304-
$sHost = 'www.' === \substr(\strtolower($sHost), 0, 4) ? \substr($sHost, 0, 4) : $sHost;
304+
$sHost = 'www.' === \substr(\strtolower($sHost), 0, 4) ? \substr($sHost, 4) : $sHost;
305305
}
306306

307307
if ($bWithRemoteUserData)

rainloop/v/1.3.9.485/app/libraries/MailSo/Base/Loader.php renamed to rainloop/v/1.3.10.490/app/libraries/MailSo/Base/Loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static function Statistic()
8787
{
8888
$aResult = array(
8989
'php' => array(
90-
'phpversion' => \phpversion(),
90+
'phpversion' => PHP_VERSION,
9191
'ssl' => (int) \function_exists('openssl_open'),
9292
'iconv' => (int) \function_exists('iconv')
9393
));
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,126 @@
1-
<?php
2-
3-
namespace MailSo\Cache\Drivers;
4-
5-
/**
6-
* @category MailSo
7-
* @package Cache
8-
* @subpackage Drivers
9-
*/
10-
class File implements \MailSo\Cache\DriverInterface
11-
{
12-
/**
13-
* @var string
14-
*/
15-
private $sCacheFolder;
16-
17-
/**
18-
* @access private
19-
*
20-
* @param string $sCacheFolder
21-
*/
22-
private function __construct($sCacheFolder)
23-
{
24-
$this->sCacheFolder = $sCacheFolder;
25-
$this->sCacheFolder = rtrim(trim($this->sCacheFolder), '\\/').'/';
26-
if (!\is_dir($this->sCacheFolder))
27-
{
28-
@\mkdir($this->sCacheFolder, 0777);
29-
}
30-
}
31-
32-
/**
33-
* @param string $sCacheFolder
34-
*
35-
* @return \MailSo\Cache\Drivers\File
36-
*/
37-
public static function NewInstance($sCacheFolder)
38-
{
39-
return new self($sCacheFolder);
40-
}
41-
42-
/**
43-
* @param string $sKey
44-
* @param string $sValue
45-
*
46-
* @return bool
47-
*/
48-
public function Set($sKey, $sValue)
49-
{
50-
return false !== \file_put_contents($sPath = $this->generateCachedFileName($sKey, true), $sValue);
51-
}
52-
53-
/**
54-
* @param string $sKey
55-
*
56-
* @return string
57-
*/
58-
public function Get($sKey)
59-
{
60-
$sValue = '';
61-
$sPath = $this->generateCachedFileName($sKey);
62-
if (\file_exists($sPath))
63-
{
64-
$sValue = \file_get_contents($sPath);
65-
}
66-
67-
return \is_string($sValue) ? $sValue : '';
68-
}
69-
70-
/**
71-
* @param string $sKey
72-
*
73-
* @return void
74-
*/
75-
public function Delete($sKey)
76-
{
77-
$sPath = $this->generateCachedFileName($sKey);
78-
if (\file_exists($sPath))
79-
{
80-
\unlink($sPath);
81-
}
82-
}
83-
84-
/**
85-
* @param int $iTimeToClearInHours = 24
86-
*
87-
* @return bool
88-
*/
89-
public function GC($iTimeToClearInHours = 24)
90-
{
91-
if (0 < $iTimeToClearInHours)
92-
{
93-
\MailSo\Base\Utils::RecTimeDirRemove($this->sCacheFolder, 60 * 60 * $iTimeToClearInHours, \time());
94-
return true;
95-
}
96-
97-
return false;
98-
}
99-
100-
/**
101-
* @param string $sKey
102-
* @param bool $bMkDir = false
103-
*
104-
* @return string
105-
*/
106-
private function generateCachedFileName($sKey, $bMkDir = false)
107-
{
108-
$sFilePath = '';
109-
if (3 < \strlen($sKey))
110-
{
111-
$sKeyPath = \sha1($sKey);
112-
$sKeyPath = \substr($sKeyPath, 0, 2).'/'.\substr($sKeyPath, 2, 2).'/'.$sKeyPath;
113-
114-
$sFilePath = $this->sCacheFolder.'/'.$sKeyPath;
115-
if ($bMkDir && !\is_dir(\dirname($sFilePath)))
116-
{
117-
if (!\mkdir(\dirname($sFilePath), 0777, true))
118-
{
119-
$sFilePath = '';
120-
}
121-
}
122-
}
123-
124-
return $sFilePath;
125-
}
126-
}
1+
<?php
2+
3+
namespace MailSo\Cache\Drivers;
4+
5+
/**
6+
* @category MailSo
7+
* @package Cache
8+
* @subpackage Drivers
9+
*/
10+
class File implements \MailSo\Cache\DriverInterface
11+
{
12+
/**
13+
* @var string
14+
*/
15+
private $sCacheFolder;
16+
17+
/**
18+
* @access private
19+
*
20+
* @param string $sCacheFolder
21+
*/
22+
private function __construct($sCacheFolder)
23+
{
24+
$this->sCacheFolder = $sCacheFolder;
25+
$this->sCacheFolder = rtrim(trim($this->sCacheFolder), '\\/').'/';
26+
if (!\is_dir($this->sCacheFolder))
27+
{
28+
@\mkdir($this->sCacheFolder, 0755);
29+
}
30+
}
31+
32+
/**
33+
* @param string $sCacheFolder
34+
*
35+
* @return \MailSo\Cache\Drivers\File
36+
*/
37+
public static function NewInstance($sCacheFolder)
38+
{
39+
return new self($sCacheFolder);
40+
}
41+
42+
/**
43+
* @param string $sKey
44+
* @param string $sValue
45+
*
46+
* @return bool
47+
*/
48+
public function Set($sKey, $sValue)
49+
{
50+
return false !== \file_put_contents($sPath = $this->generateCachedFileName($sKey, true), $sValue);
51+
}
52+
53+
/**
54+
* @param string $sKey
55+
*
56+
* @return string
57+
*/
58+
public function Get($sKey)
59+
{
60+
$sValue = '';
61+
$sPath = $this->generateCachedFileName($sKey);
62+
if (\file_exists($sPath))
63+
{
64+
$sValue = \file_get_contents($sPath);
65+
}
66+
67+
return \is_string($sValue) ? $sValue : '';
68+
}
69+
70+
/**
71+
* @param string $sKey
72+
*
73+
* @return void
74+
*/
75+
public function Delete($sKey)
76+
{
77+
$sPath = $this->generateCachedFileName($sKey);
78+
if (\file_exists($sPath))
79+
{
80+
\unlink($sPath);
81+
}
82+
}
83+
84+
/**
85+
* @param int $iTimeToClearInHours = 24
86+
*
87+
* @return bool
88+
*/
89+
public function GC($iTimeToClearInHours = 24)
90+
{
91+
if (0 < $iTimeToClearInHours)
92+
{
93+
\MailSo\Base\Utils::RecTimeDirRemove($this->sCacheFolder, 60 * 60 * $iTimeToClearInHours, \time());
94+
return true;
95+
}
96+
97+
return false;
98+
}
99+
100+
/**
101+
* @param string $sKey
102+
* @param bool $bMkDir = false
103+
*
104+
* @return string
105+
*/
106+
private function generateCachedFileName($sKey, $bMkDir = false)
107+
{
108+
$sFilePath = '';
109+
if (3 < \strlen($sKey))
110+
{
111+
$sKeyPath = \sha1($sKey);
112+
$sKeyPath = \substr($sKeyPath, 0, 2).'/'.\substr($sKeyPath, 2, 2).'/'.$sKeyPath;
113+
114+
$sFilePath = $this->sCacheFolder.'/'.$sKeyPath;
115+
if ($bMkDir && !\is_dir(\dirname($sFilePath)))
116+
{
117+
if (!\mkdir(\dirname($sFilePath), 0755, true))
118+
{
119+
$sFilePath = '';
120+
}
121+
}
122+
}
123+
124+
return $sFilePath;
125+
}
126+
}

rainloop/v/1.3.9.485/app/libraries/MailSo/Imap/ImapClient.php renamed to rainloop/v/1.3.10.490/app/libraries/MailSo/Imap/ImapClient.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,19 +1272,26 @@ public function MessageStoreFlag($sIndexRange, $bIndexIsUid, $aInputStoreItems,
12721272
* @param int $iStreamSize
12731273
* @param array $aAppendFlags = null
12741274
* @param int $iUid = null
1275+
* @param int $sDateTime = 0
12751276
*
12761277
* @return \MailSo\Imap\ImapClient
12771278
*
12781279
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
12791280
* @throws \MailSo\Net\Exceptions\Exception
12801281
* @throws \MailSo\Imap\Exceptions\Exception
12811282
*/
1282-
public function MessageAppendStream($sFolderName, $rMessageAppendStream, $iStreamSize, $aAppendFlags = null, &$iUid = null)
1283+
public function MessageAppendStream($sFolderName, $rMessageAppendStream, $iStreamSize, $aAppendFlags = null, &$iUid = null, $sDateTime = 0)
12831284
{
1284-
$this->SendRequest('APPEND',
1285-
array($this->EscapeString($sFolderName), $aAppendFlags, '{'.$iStreamSize.'}'));
1285+
$aData = array($this->EscapeString($sFolderName), $aAppendFlags);
1286+
if (0 < $sDateTime)
1287+
{
1288+
$aData[] = $this->EscapeString(\gmdate('d-M-Y H:i:s', $sDateTime).' +0000');
1289+
}
12861290

1287-
$this->parseResponseWithValidation('+');
1291+
$aData[] = '{'.$iStreamSize.'}';
1292+
1293+
$this->SendRequest('APPEND', $aData);
1294+
$this->parseResponseWithValidation();
12881295

12891296
$this->writeLog('Write to connection stream', \MailSo\Log\Enumerations\Type::NOTE);
12901297

rainloop/v/1.3.9.485/app/libraries/RainLoop/Account.php renamed to rainloop/v/1.3.10.490/app/libraries/RainLoop/Account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function GetAuthToken()
175175
'0', // PasswordIsXOAuth2
176176
$this->sSignMeToken,
177177
$this->sParentEmail,
178-
\microtime(true).\rand(1000, 9999)
178+
\RainLoop\Utils::GetShortToken()
179179
));
180180
}
181181
}

0 commit comments

Comments
 (0)