Module: appdb Branch: master Commit: 03ac68731c1305bdd786184bb6472c20669be1e8 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=03ac68731c1305bdd786184bb...
Author: Alexander Nicolaysen Sørnes <alexander@linux-xqqm.(none)> Date: Sun Nov 15 20:00:56 2009 +0100
testData: Don't show non-admins the option of showing unmaintained entries, as it has no effect for them
---
include/testData.php | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/testData.php b/include/testData.php index 879e363..e565bee 100644 --- a/include/testData.php +++ b/include/testData.php @@ -1174,11 +1174,14 @@ class testData{ public function objectGetFilterInfo() { $oFilter = new FilterInterface(); + + /* The following filters are only useful for admins */ + if(!$_SESSION['current']->hasPriv('admin')) + return null; + $oFilter->AddFilterInfo('onlyWithoutMaintainers', 'Only show test data for versions without maintainers', array(FILTER_OPTION_BOOL), FILTER_VALUES_OPTION_BOOL, array('false','true'));
- /* Allow admins to only show entries for apps they maintain */ - if($_SESSION['current']->hasPriv('admin')) - $oFilter->AddFilterInfo('onlyMyMaintainedEntries', 'Only show test data for versions you maintain', array(FILTER_OPTION_BOOL), FILTER_VALUES_OPTION_BOOL, array('false','true')); + $oFilter->AddFilterInfo('onlyMyMaintainedEntries', 'Only show test data for versions you maintain', array(FILTER_OPTION_BOOL), FILTER_VALUES_OPTION_BOOL, array('false','true'));
return $oFilter; }