Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 507875f2 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

test rainloop namespace

parent 28a5d603
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -83,17 +83,17 @@ if (\class_exists('RainLoop\Api'))
			{
				\define('APP_API_STARTED', true);

				\RainLoop\Api::Handle();
			\RainLoopOld\Api::Handle();
			}
		}
		else if (!\defined('APP_STARTED'))
		{
			\define('APP_STARTED', true);

			\RainLoop\Api::Handle();
			\RainLoop\Service::Handle();
		\RainLoopOld\Api::Handle();
		\RainLoopOld\Service::Handle();

			\RainLoop\Api::ExitOnEnd();
		\RainLoopOld\Api::ExitOnEnd();
		}
	}
}
+445 −445

File changed and moved.

Preview size limit exceeded, changes collapsed.

+23 −23
Original line number Diff line number Diff line
@@ -31,9 +31,9 @@ class Api
			$bOne = \class_exists('MailSo\Version');
			if ($bOne)
			{
				\RainLoop\Api::SetupDefaultMailSoConfig();
			\RainLoopOld\Api::SetupDefaultMailSoConfig();

				$bOne = \RainLoop\Api::RunResult();
				$bOne =\RainLoopOld\Api::RunResult();
			}
		}

@@ -41,25 +41,25 @@ class Api
	}

	/**
	 * @return \RainLoop\Actions
	 * @return\RainLoopOld\Actions
	 */
	public static function Actions()
	{
		static $oActions = null;
		if (null === $oActions)
		{
			$oActions = \RainLoop\Actions::NewInstance();
			$oActions =\RainLoopOld\Actions::NewInstance();
		}

		return $oActions;
	}

	/**
	 * @return \RainLoop\Application
	 * @return\RainLoopOld\Application
	 */
	public static function Config()
	{
		return \RainLoop\Api::Actions()->Config();
		return\RainLoopOld\Api::Actions()->Config();
	}

	/**
@@ -67,7 +67,7 @@ class Api
	 */
	public static function Logger()
	{
		return \RainLoop\Api::Actions()->Logger();
		return\RainLoopOld\Api::Actions()->Logger();
	}

	/**
@@ -87,10 +87,10 @@ class Api
				!!\RainLoop\Api::Config()->Get('labs', 'imap_message_list_fast_simple_search', true);

			\MailSo\Config::$MessageListCountLimitTrigger =
				(int) \RainLoop\Api::Config()->Get('labs', 'imap_message_list_count_limit_trigger', 0);
				(int)\RainLoopOld\Api::Config()->Get('labs', 'imap_message_list_count_limit_trigger', 0);

			\MailSo\Config::$MessageListDateFilter =
				(int) \RainLoop\Api::Config()->Get('labs', 'imap_message_list_date_filter', 0);
				(int)\RainLoopOld\Api::Config()->Get('labs', 'imap_message_list_date_filter', 0);

			\MailSo\Config::$MessageListPermanentFilter =
				\trim(\RainLoop\Api::Config()->Get('labs', 'imap_message_list_permanent_filter', ''));
@@ -99,22 +99,22 @@ class Api
				!!\RainLoop\Api::Config()->Get('labs', 'imap_message_all_headers', false);

			\MailSo\Config::$LargeThreadLimit =
				(int) \RainLoop\Api::Config()->Get('labs', 'imap_large_thread_limit', 50);
				(int)\RainLoopOld\Api::Config()->Get('labs', 'imap_large_thread_limit', 50);

			\MailSo\Config::$ImapTimeout =
				(int) \RainLoop\Api::Config()->Get('labs', 'imap_timeout', 300);
				(int)\RainLoopOld\Api::Config()->Get('labs', 'imap_timeout', 300);

			\MailSo\Config::$BoundaryPrefix = '_RainLoop_';

			\MailSo\Config::$SystemLogger = \RainLoop\Api::Logger();
			\MailSo\Config::$SystemLogger =\RainLoopOld\Api::Logger();

			$sSslCafile = \RainLoop\Api::Config()->Get('ssl', 'cafile', '');
			$sSslCapath = \RainLoop\Api::Config()->Get('ssl', 'capath', '');
			$sSslCafile =\RainLoopOld\Api::Config()->Get('ssl', 'cafile', '');
			$sSslCapath =\RainLoopOld\Api::Config()->Get('ssl', 'capath', '');

			\RainLoop\Utils::$CookieDefaultPath = \RainLoop\Api::Config()->Get('labs', 'cookie_default_path', '');
		\RainLoopOld\Utils::$CookieDefaultPath =\RainLoopOld\Api::Config()->Get('labs', 'cookie_default_path', '');
			if (\RainLoop\Api::Config()->Get('labs', 'cookie_default_secure', false))
			{
				\RainLoop\Utils::$CookieDefaultSecure = true;
			\RainLoopOld\Utils::$CookieDefaultSecure = true;
			}

			if (!empty($sSslCafile) || !empty($sSslCapath))
@@ -205,8 +205,8 @@ class Api
	{
		$sSsoHash = \MailSo\Base\Utils::Sha1Rand(\md5($sEmail).\md5($sPassword));

		return \RainLoop\Api::Actions()->Cacher()->Set(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash),
			\RainLoop\Utils::EncodeKeyValuesQ(array(
		return\RainLoopOld\Api::Actions()->Cacher()->Set(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash),
		\RainLoopOld\Utils::EncodeKeyValuesQ(array(
				'Email' => $sEmail,
				'Password' => $sPassword,
				'AdditionalOptions' => $aAdditionalOptions,
@@ -221,7 +221,7 @@ class Api
	 */
	public static function ClearUserSsoHash($sSsoHash)
	{
		return \RainLoop\Api::Actions()->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
		return\RainLoopOld\Api::Actions()->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
	}

	/**
@@ -235,16 +235,16 @@ class Api
		{
			$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail);

			$oStorageProvider = \RainLoop\Api::Actions()->StorageProvider();
			$oStorageProvider =\RainLoopOld\Api::Actions()->StorageProvider();
			if ($oStorageProvider && $oStorageProvider->IsActive())
			{
				$oStorageProvider->DeleteStorage($sEmail);
			}

			if (\RainLoop\Api::Actions()->AddressBookProvider() &&
				\RainLoop\Api::Actions()->AddressBookProvider()->IsActive())
			\RainLoopOld\Api::Actions()->AddressBookProvider()->IsActive())
			{
				\RainLoop\Api::Actions()->AddressBookProvider()->DeleteAllContacts($sEmail);
			\RainLoopOld\Api::Actions()->AddressBookProvider()->DeleteAllContacts($sEmail);
			}

			return true;
@@ -258,7 +258,7 @@ class Api
	 */
	public static function LogoutCurrentLogginedUser()
	{
		\RainLoop\Utils::ClearCookie('rlsession');
	\RainLoopOld\Utils::ClearCookie('rlsession');
		return true;
	}

+0 −0

File moved.

+4 −4
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ class FacebookRainLoopPersistentDataHandler implements \Facebook\PersistentData\
		{
			return $this->rlStorageProvaider->Get(
				$this->rlAccount ? $this->rlAccount : null,
				$this->rlAccount ? \RainLoop\Providers\Storage\Enumerations\StorageType::USER :
					\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
				$this->rlAccount ?\RainLoopOld\Providers\Storage\Enumerations\StorageType::USER :
				\RainLoopOld\Providers\Storage\Enumerations\StorageType::NOBODY,
				$this->generateSessionVariableName($key), false);
		}

@@ -64,8 +64,8 @@ class FacebookRainLoopPersistentDataHandler implements \Facebook\PersistentData\
		{
			$this->rlStorageProvaider->Put(
				$this->rlAccount ? $this->rlAccount : null,
				$this->rlAccount ? \RainLoop\Providers\Storage\Enumerations\StorageType::USER :
					\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY,
				$this->rlAccount ?\RainLoopOld\Providers\Storage\Enumerations\StorageType::USER :
				\RainLoopOld\Providers\Storage\Enumerations\StorageType::NOBODY,
				$this->generateSessionVariableName($key), $value);
		}
	}
Loading