From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- scripts/myprofile.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/myprofile.php (limited to 'scripts/myprofile.php') diff --git a/scripts/myprofile.php b/scripts/myprofile.php new file mode 100644 index 0000000..bd9bd22 --- /dev/null +++ b/scripts/myprofile.php @@ -0,0 +1,41 @@ +isAnon()) { + Flyspray::show_error(13); +} + +# maybe add some checks for output if a task or project or user changed permissions +# for example the user is moved from developer to basic +# or a task is changed to private modus +# or a task is closed now +# maybe add 'AND t.is_closed<>1' if we want only show votes of active tasks, that are taken for the votes limit. +# How can a user unvote such now unvisible tasks to get back under his voting limit for the project? +$votes=$db->query(' + SELECT v.*, t.project_id, t.item_summary, t.task_type, t.is_closed, p.project_title + FROM {votes} v + JOIN {tasks} t ON t.task_id=v.task_id + LEFT JOIN {projects} p ON p.project_id=t.project_id + WHERE user_id = ? + ORDER BY t.project_id, t.task_id', + $user->id +); +$votes=$db->fetchAllArray($votes); + +$page->assign('votes', $votes); +$page->assign('groups', Flyspray::listGroups()); +$page->assign('project_groups', Flyspray::listGroups($proj->id)); +$page->assign('theuser', $user); + +$page->setTitle($fs->prefs['page_title'] . L('editmydetails')); +$page->pushTpl('myprofile.tpl'); + +?> -- cgit v1.2.3-70-g09d2