mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
v1.2.12.435
This commit is contained in:
parent
513936e5f7
commit
93e620e3de
399 changed files with 765 additions and 687 deletions
1442
rainloop/v/1.2.12.435/app/libraries/facebook/base_facebook.php
Normal file
1442
rainloop/v/1.2.12.435/app/libraries/facebook/base_facebook.php
Normal file
File diff suppressed because it is too large
Load diff
119
rainloop/v/1.2.12.435/app/libraries/facebook/facebook.php
Normal file
119
rainloop/v/1.2.12.435/app/libraries/facebook/facebook.php
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/base_facebook.php';
|
||||
|
||||
class RainLoopFacebook extends BaseFacebook
|
||||
{
|
||||
private $rlUserHash;
|
||||
|
||||
private $rlAccount;
|
||||
|
||||
private $rlStorageProvaider;
|
||||
|
||||
protected static $kSupportedKeys = array('state', 'code', 'access_token', 'user_id');
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
$this->rlUserHash = '';
|
||||
$this->rlAccount = null;
|
||||
$this->rlStorageProvaider = null;
|
||||
|
||||
if (!empty($config['rlStorageProvaider']))
|
||||
{
|
||||
$this->rlStorageProvaider = $config['rlStorageProvaider'];
|
||||
}
|
||||
|
||||
if (!empty($config['rlAccount']))
|
||||
{
|
||||
$this->rlAccount = $config['rlAccount'];
|
||||
}
|
||||
|
||||
if (!empty($config['rlUserHash']))
|
||||
{
|
||||
$this->rlUserHash = (string) $config['rlUserHash'];
|
||||
}
|
||||
|
||||
if (!class_exists('\\RainLoop\\Providers\\Storage\\Enumerations\\StorageType') || '' === $this->rlUserHash)
|
||||
{
|
||||
$this->rlStorageProvaider = null;
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function UserLogout()
|
||||
{
|
||||
$this->clearAllPersistentData();
|
||||
}
|
||||
|
||||
protected function setPersistentData($key, $value)
|
||||
{
|
||||
if (!in_array($key, self::$kSupportedKeys))
|
||||
{
|
||||
self::errorLog('Unsupported key passed to setPersistentData.');
|
||||
return;
|
||||
}
|
||||
|
||||
$session_var_name = $this->constructSessionVariableName($key);
|
||||
if ($this->rlStorageProvaider)
|
||||
{
|
||||
$this->rlStorageProvaider->Put(
|
||||
$this->rlAccount ? $this->rlAccount : null,
|
||||
$this->rlAccount ? \RainLoop\Providers\Storage\Enumerations\StorageType::USER :
|
||||
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
|
||||
$session_var_name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getPersistentData($key, $default = false)
|
||||
{
|
||||
if (!in_array($key, self::$kSupportedKeys))
|
||||
{
|
||||
self::errorLog('Unsupported key passed to getPersistentData.');
|
||||
return $default;
|
||||
}
|
||||
|
||||
$session_var_name = $this->constructSessionVariableName($key);
|
||||
if ($this->rlStorageProvaider)
|
||||
{
|
||||
return $this->rlStorageProvaider->Get(
|
||||
$this->rlAccount ? $this->rlAccount : null,
|
||||
$this->rlAccount ? \RainLoop\Providers\Storage\Enumerations\StorageType::USER :
|
||||
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
|
||||
$session_var_name, $default);
|
||||
}
|
||||
}
|
||||
|
||||
protected function clearPersistentData($key)
|
||||
{
|
||||
if (!in_array($key, self::$kSupportedKeys))
|
||||
{
|
||||
self::errorLog('Unsupported key passed to clearPersistentData.');
|
||||
return;
|
||||
}
|
||||
|
||||
$session_var_name = $this->constructSessionVariableName($key);
|
||||
if ($this->rlStorageProvaider)
|
||||
{
|
||||
$this->rlStorageProvaider->Clear(
|
||||
$this->rlAccount ? $this->rlAccount : null,
|
||||
$this->rlAccount ? \RainLoop\Providers\Storage\Enumerations\StorageType::USER :
|
||||
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
|
||||
$session_var_name);
|
||||
}
|
||||
}
|
||||
|
||||
protected function clearAllPersistentData()
|
||||
{
|
||||
foreach (self::$kSupportedKeys as $key)
|
||||
{
|
||||
$this->clearPersistentData($key);
|
||||
}
|
||||
}
|
||||
|
||||
protected function constructSessionVariableName($key)
|
||||
{
|
||||
$parts = array('fb', $this->getAppId(), $key, md5($this->rlUserHash));
|
||||
return implode('_', $parts);
|
||||
}
|
||||
}
|
||||
3920
rainloop/v/1.2.12.435/app/libraries/facebook/fb_ca_chain_bundle.crt
Normal file
3920
rainloop/v/1.2.12.435/app/libraries/facebook/fb_ca_chain_bundle.crt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue