mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Suggestion Provider
OwnCloud Suggestion Driver
This commit is contained in:
parent
d30292d500
commit
000711086a
15 changed files with 194 additions and 190 deletions
|
|
@ -17,32 +17,20 @@ $sUrl = '';
|
|||
$sPath = '';
|
||||
$bAutologin = false;
|
||||
|
||||
$bInstalledLocaly = file_exists(__DIR__.'/../app/index.php');
|
||||
|
||||
if (isset($_POST['appname']) && 'rainloop' === $_POST['appname'] &&
|
||||
($bInstalledLocaly ? true : isset($_POST['rainloop-url'], $_POST['rainloop-path'])))
|
||||
if (isset($_POST['appname']) && 'rainloop' === $_POST['appname'])
|
||||
{
|
||||
OCP\Config::setAppValue('rainloop', 'rainloop-autologin', isset($_POST['rainloop-autologin']) ?
|
||||
'1' === $_POST['rainloop-autologin'] : false);
|
||||
|
||||
if (!$bInstalledLocaly)
|
||||
{
|
||||
OCP\Config::setAppValue('rainloop', 'rainloop-url', $_POST['rainloop-url']);
|
||||
OCP\Config::setAppValue('rainloop', 'rainloop-path', $_POST['rainloop-path']);
|
||||
|
||||
$sUrl = OCP\Config::getAppValue('rainloop', 'rainloop-url', '');
|
||||
$sPath = OCP\Config::getAppValue('rainloop', 'rainloop-path', '');
|
||||
}
|
||||
|
||||
$bAutologin = OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sleep(1);
|
||||
OC_JSON::error(array('Message' => 'Invalid Argument(s)', 'Url' => $sUrl, 'Path' => $sPath));
|
||||
OC_JSON::error(array('Message' => 'Invalid Argument(s)'));
|
||||
return false;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
OCP\JSON::success(array('Message' => 'Saved successfully', 'Url' => $sUrl, 'Path' => $sPath));
|
||||
OCP\JSON::success(array('Message' => 'Saved successfully'));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue