This repository has been archived by the owner on Sep 3, 2018. It is now read-only.
/
tiki-user_notifications.php
58 lines (47 loc) · 2.05 KB
/
tiki-user_notifications.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* @package tikiwiki
*/
// (c) Copyright 2002-2015 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
$section = 'mytiki';
require_once ('tiki-setup.php');
$auto_query_args = array('userId', 'view_user');
$access->check_user($user);
$access->check_feature('feature_user_watches');
$headerlib->add_map();
if (isset($_REQUEST['user_calendar_watch_editor']) && $_REQUEST['user_calendar_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_calendar_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_calendar_watch_editor', 'n');
}
if (isset($_REQUEST['user_article_watch_editor']) && $_REQUEST['user_article_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_article_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_article_watch_editor', 'n');
}
if (isset($_REQUEST['user_wiki_watch_editor']) && $_REQUEST['user_wiki_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_wiki_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_wiki_watch_editor', 'n');
}
if (isset($_REQUEST['user_blog_watch_editor']) && $_REQUEST['user_blog_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_blog_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_blog_watch_editor', 'n');
}
if (isset($_REQUEST['user_tracker_watch_editor']) && $_REQUEST['user_tracker_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_tracker_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_tracker_watch_editor', 'n');
}
if (isset($_REQUEST['user_comment_watch_editor']) && $_REQUEST['user_comment_watch_editor'] == true) {
$tikilib->set_user_preference($user, 'user_comment_watch_editor', 'y');
} else {
$tikilib->set_user_preference($user, 'user_comment_watch_editor', 'n');
}
header('Location: tiki-user_watches.php');
die;