If a package base is unmaintained, there is no need to file an orphan
request. Hide the option from the front-end in this case.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/template/pkgreq_form.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/web/template/pkgreq_form.php b/web/template/pkgreq_form.php
index 5bd2bfe..4fd7851 100644
--- a/web/template/pkgreq_form.php
+++ b/web/template/pkgreq_form.php
@@ -19,7 +19,9 @@
                                <select name="type" id="id_type" 
onchange="showHideMergeSection()">
                                        <option value="deletion"><?= 
__('Deletion') ?></option>
                                        <option value="merge"><?= __('Merge') 
?></option>
+                                       <?php if 
(pkgbase_maintainer_uid($base_id)): ?>
                                        <option value="orphan"><?= __('Orphan') 
?></option>
+                                       <?php endif; ?>
                                </select>
                        </p>
                        <script type="text/javascript" 
src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js";></script>
-- 
2.7.1

Reply via email to