diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-26 18:08:49 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-26 18:08:49 +0200 |
commit | 2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9 (patch) | |
tree | f25b463c90992764887416c3082098fed6ecac65 /apps/files_sharing/ajax | |
parent | 40f95ffdf3edf9ab45c15bd5b9018d7f4d92baa9 (diff) | |
parent | 127796218314c6b1f19ba86f74caa913375aac8d (diff) | |
download | nextcloud-server-2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9.tar.gz nextcloud-server-2b10371bdeb2c8a3d5cc2617ada5cf8195c264c9.zip |
fix merge conflicts
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r-- | apps/files_sharing/ajax/email.php | 15 | ||||
-rw-r--r-- | apps/files_sharing/ajax/toggleresharing.php | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/apps/files_sharing/ajax/email.php b/apps/files_sharing/ajax/email.php new file mode 100644 index 00000000000..d6d53c49bff --- /dev/null +++ b/apps/files_sharing/ajax/email.php @@ -0,0 +1,15 @@ +<?php + +require_once('../../../lib/base.php'); + +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('files_sharing'); +$user = OC_User::getUser(); +// TODO translations +$subject = $user + ' ' + 'shared a file with you'; +$link = $_POST['link'] + '&f=' + $_POST['f']; +$text = $user + ' ' + 'shared the file' + ' ' + $_POST['f'] + ' ' + 'with you.' + ' ' + 'It is available for download here:' + ' ' + $link; +$fromaddress = OC_Preferences::getValue($user, 'settings', 'email', 'owncloud.org'); +OC_Mail::send($_POST['toaddress'], $_POST['toaddress'], $subject, $text, $fromaddress, $user); + +?>
\ No newline at end of file diff --git a/apps/files_sharing/ajax/toggleresharing.php b/apps/files_sharing/ajax/toggleresharing.php new file mode 100644 index 00000000000..72af1eedec1 --- /dev/null +++ b/apps/files_sharing/ajax/toggleresharing.php @@ -0,0 +1,13 @@ +<?php + +require_once('../../../lib/base.php'); + +OC_JSON::checkAppEnabled('files_sharing'); +OC_JSON::checkAdminUser(); +if ($_POST['resharing'] == true) { + OC_Appconfig::setValue('files_sharing', 'resharing', 'yes'); +} else { + OC_Appconfig::setValue('files_sharing', 'resharing', 'no'); +} + +?> |