From 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 17 Nov 2019 20:45:02 +0100 Subject: initial checking of customized version 1.0rc9 --- scripts/pm.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 scripts/pm.php (limited to 'scripts/pm.php') diff --git a/scripts/pm.php b/scripts/pm.php new file mode 100644 index 0000000..c9884e8 --- /dev/null +++ b/scripts/pm.php @@ -0,0 +1,61 @@ +perms('manage_project') || !$proj->id) { + Flyspray::show_error(16); +} + +switch ($area = Req::val('area', 'prefs')) { + case 'pendingreq': + $sql = $db->query("SELECT * + FROM {admin_requests} ar + LEFT JOIN {tasks} t ON ar.task_id = t.task_id + LEFT JOIN {users} u ON ar.submitted_by = u.user_id + WHERE ar.project_id = ? AND resolved_by = 0 + ORDER BY ar.time_submitted ASC", array($proj->id)); + + $page->assign('pendings', $db->fetchAllArray($sql)); + + case 'prefs': + case 'groups': + $page->assign('globalgroups', Flyspray::listGroups(0)); # global user groups + $page->assign('groups', Flyspray::listGroups($proj->id)); # project specific user groups + case 'editgroup': + // yeah, utterly stupid, is changed in 1.0 already + if (Req::val('area') == 'editgroup') { + $group_details = Flyspray::getGroupDetails(Req::num('id')); + if (!$group_details || $group_details['project_id'] != $proj->id) { + Flyspray::show_error(L('groupnotexist')); + Flyspray::redirect(createURL('pm', 'groups', $proj->id)); + } + $page->uses('group_details'); + } + case 'tasktype': + case 'tag': + case 'resolution': + case 'os': + case 'version': + case 'cat': + case 'status': + case 'newgroup': + + $page->setTitle($fs->prefs['page_title'] . L('pmtoolbox')); + $page->pushTpl('pm.menu.tpl'); + $page->pushTpl('pm.'.$area.'.tpl'); + break; + + default: + Flyspray::show_error(17); +} +?> -- cgit v1.2.3-54-g00ecf