Update ownCloud package

This commit is contained in:
RainLoop Team 2014-07-26 22:51:34 +04:00
parent 1d39879765
commit ba1f0403f7
6 changed files with 142 additions and 139 deletions

View file

@ -1,26 +1,26 @@
************************************************************************
*
* ownCloud - RainLoop Webmail mail plugin
*
* @author RainLoop Team
* @copyright 2014 RainLoop Team
*
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
*
************************************************************************
REQUIREMENTS:
- Installed and configured RainLoop Webmail (standalone)
- ownCloud version 6 or higher
- Both apps (RainLoop & ownCloud) running on the same domain
INSTALL:
- Unpack the RainLoop Webmail application package in the apps directory of your OwnCloud instance
CONFIGURATION:
- ownCloud:
1) In the Apps > Enable 'RainLoop' plugin
2) In the Settings > Admin > Enter "RainLoop Webmail URL" and "Absolute file path to RainLoop Webmail installation"
3) In the Settings > Personal > Type your mail server email (login) and password
************************************************************************
*
* ownCloud - RainLoop Webmail mail plugin
*
* @author RainLoop Team
* @copyright 2014 RainLoop Team
*
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
*
************************************************************************
REQUIREMENTS:
- Installed and configured RainLoop Webmail (standalone)
- ownCloud version 6 or higher
- Both apps (RainLoop & ownCloud) running on the same domain
INSTALL:
- Unpack the RainLoop Webmail application package in the apps directory of your OwnCloud instance
CONFIGURATION:
- ownCloud:
1) In the Apps > Enable 'RainLoop' plugin
2) In the Settings > Admin > Enter "RainLoop Webmail URL" and "Absolute (full) path to RainLoop Webmail installation"
3) In the Settings > Personal > Type your mail server email (login) and password

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 478 B

View file

@ -1,71 +1,70 @@
<?php
class OC_RainLoop_Helper
{
/**
* @param string $sPath
* @param string $sEmail
* @param string $sPassword
*
* @return string
*/
public static function getSsoHash($sPath, $sEmail, $sPassword)
{
$SsoHash = '';
$sPath = rtrim(trim($sPath), '\\/').'/index.php';
if (file_exists($sPath))
{
$_ENV['RAINLOOP_INCLUDE_AS_API'] = false;
include $sPath;
if (class_exists($sPath))
{
$SsoHash = \RainLoop\Api::GetUserSsoHash($sEmail, $sPassword);
}
}
return $SsoHash;
}
/**
* @param string $sUrl
*
* @return string
*/
public static function normalizeUrl($sUrl)
{
$sUrl = \rtrim($sUrl, '/\\');
if ('.php' !== \strtolower(\substr($sUrl), -4))
{
$sUrl .= '/';
}
return $sUrl;
}
public static function encodePassword($sPassword, $sSalt)
{
if (function_exists('mcrypt_encrypt') && function_exists('mcrypt_create_iv') && function_exists('mcrypt_get_iv_size') &&
defined('MCRYPT_RIJNDAEL_256') && defined('MCRYPT_MODE_ECB') && defined('MCRYPT_RAND'))
{
return @trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($sSalt), $sPassword,
MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
}
return @trim(base64_encode($sPassword));
}
public static function decodePassword($sPassword, $sSalt)
{
if (function_exists('mcrypt_encrypt') && function_exists('mcrypt_create_iv') && function_exists('mcrypt_get_iv_size') &&
defined('MCRYPT_RIJNDAEL_256') && defined('MCRYPT_MODE_ECB') && defined('MCRYPT_RAND'))
{
return @mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($sSalt), base64_decode(trim($sPassword)),
MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND));
}
return @base64_decode(trim($sPassword));
}
}
<?php
class OC_RainLoop_Helper
{
/**
* @param string $sPath
* @param string $sEmail
* @param string $sPassword
*
* @return string
*/
public static function getSsoHash($sPath, $sEmail, $sPassword)
{
$SsoHash = '';
$sPath = rtrim(trim($sPath), '\\/').'/index.php';
if (file_exists($sPath))
{
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
include $sPath;
if (class_exists('\\RainLoop\\Api'))
{
$SsoHash = \RainLoop\Api::GetUserSsoHash($sEmail, $sPassword);
}
}
return $SsoHash;
}
/**
* @param string $sUrl
*
* @return string
*/
public static function normalizeUrl($sUrl)
{
$sUrl = \rtrim(\trim($sUrl), '/\\');
if ('.php' !== \strtolower(\substr($sUrl, -4)))
{
$sUrl .= '/';
}
return $sUrl;
}
public static function encodePassword($sPassword, $sSalt)
{
if (function_exists('mcrypt_encrypt') && function_exists('mcrypt_create_iv') && function_exists('mcrypt_get_iv_size') &&
defined('MCRYPT_RIJNDAEL_256') && defined('MCRYPT_MODE_ECB') && defined('MCRYPT_RAND'))
{
return @trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($sSalt), $sPassword,
MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
}
return @trim(base64_encode($sPassword));
}
public static function decodePassword($sPassword, $sSalt)
{
if (function_exists('mcrypt_encrypt') && function_exists('mcrypt_create_iv') && function_exists('mcrypt_get_iv_size') &&
defined('MCRYPT_RIJNDAEL_256') && defined('MCRYPT_MODE_ECB') && defined('MCRYPT_RAND'))
{
return @mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($sSalt), base64_decode(trim($sPassword)),
MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND));
}
return @base64_decode(trim($sPassword));
}
}

View file

@ -1,23 +1,25 @@
<form id="mail-rainloop-admin-form" action="#" method="post">
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
<input type="hidden" name="appname" value="rainloop">
<fieldset class="personalblock">
<h2><?php p($l->t('RainLoop Webmail')); ?></h2>
<br />
<p>
<?php p($l->t('RainLoop Webmail URL')); ?>:
<br />
<input type="text" style="width:300px;" id="rainloop-url" name="rainloop-url" value="<?php echo $_['rainloop-url']; ?>" placeholder="https://" />
<br />
<br />
<?php p($l->t('Absolute file path to RainLoop Webmail installation')); ?>:
<br />
<input type="text" style="width:300px;" id="rainloop-path" name="rainloop-path" value="<?php echo $_['rainloop-path']; ?>" />
<br />
<br />
<input type="button" id="rainloop-save-button" name="rainloop-save-button" value="<?php p($l->t('Save')); ?>" />
&nbsp;&nbsp;<span class="rainloop-result-desc"></span>
</p>
</fieldset>
</form>
<div class="section">
<form id="mail-rainloop-admin-form" action="#" method="post">
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
<input type="hidden" name="appname" value="rainloop">
<fieldset class="personalblock">
<h2><?php p($l->t('RainLoop Webmail')); ?></h2>
<br />
<p>
<?php p($l->t('RainLoop Webmail URL')); ?>:
<br />
<input type="text" style="width:300px;" id="rainloop-url" name="rainloop-url" value="<?php echo $_['rainloop-url']; ?>" placeholder="https://" />
<br />
<br />
<?php p($l->t('Absolute (full) path to RainLoop Webmail installation')); ?>:
<br />
<input type="text" style="width:300px;" id="rainloop-path" name="rainloop-path" value="<?php echo $_['rainloop-path']; ?>" />
<br />
<br />
<input type="button" id="rainloop-save-button" name="rainloop-save-button" value="<?php p($l->t('Save')); ?>" />
&nbsp;&nbsp;<span class="rainloop-result-desc"></span>
</p>
</fieldset>
</form>
</div>

View file

@ -1,18 +1,20 @@
<form id="mail-rainloop-personal-form" action="#" method="post">
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
<input type="hidden" name="appname" value="rainloop">
<fieldset class="personalblock">
<h2><?php p($l->t('RainLoop Webmail')); ?></h2>
<p>
<input type="text" id="rainloop-email" name="rainloop-email"
value="<?php echo $_['rainloop-email']; ?>" placeholder="<?php p($l->t('Email')); ?>" />
<input type="password" id="rainloop-password" name="rainloop-password"
value="<?php echo $_['rainloop-password']; ?>" placeholder="<?php p($l->t('Password')); ?>" />
<input type="button" id="rainloop-save-button" name="rainloop-save-button" value="<?php p($l->t('Save')); ?>" />
&nbsp;&nbsp;<span class="rainloop-result-desc"></span>
</p>
</fieldset>
</form>
<div class="section">
<form id="mail-rainloop-personal-form" action="#" method="post">
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
<input type="hidden" name="appname" value="rainloop">
<fieldset class="personalblock">
<h2><?php p($l->t('RainLoop Webmail')); ?></h2>
<p>
<input type="text" id="rainloop-email" name="rainloop-email"
value="<?php echo $_['rainloop-email']; ?>" placeholder="<?php p($l->t('Email')); ?>" />
<input type="password" id="rainloop-password" name="rainloop-password"
value="<?php echo $_['rainloop-password']; ?>" placeholder="<?php p($l->t('Password')); ?>" />
<input type="button" id="rainloop-save-button" name="rainloop-save-button" value="<?php p($l->t('Save')); ?>" />
&nbsp;&nbsp;<span class="rainloop-result-desc"></span>
</p>
</fieldset>
</form>
</div>

View file

@ -36,7 +36,7 @@
"plugins"
],
"readmeFilename": "README.md",
"ownCloudPackageVersion": "1.6",
"ownCloudPackageVersion": "2.0",
"engines": {
"node": ">= 0.10.0"
},