mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add ability to search for non-out-of-date packages (fixes FS#17896).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
4b2b8afb8a
commit
c39183c3ee
2 changed files with 20 additions and 6 deletions
|
@ -491,8 +491,13 @@ function pkg_search_page($SID="") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['outdated'])) {
|
if (isset($_GET['outdated'])) {
|
||||||
|
if ($_GET['outdated'] == 'on') {
|
||||||
$q .= "AND OutOfDateTS IS NOT NULL ";
|
$q .= "AND OutOfDateTS IS NOT NULL ";
|
||||||
}
|
}
|
||||||
|
elseif ($_GET['outdated'] == 'off') {
|
||||||
|
$q .= "AND OutOfDateTS IS NULL ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$order = $_GET["SO"] == 'd' ? 'DESC' : 'ASC';
|
$order = $_GET["SO"] == 'd' ? 'DESC' : 'ASC';
|
||||||
|
|
||||||
|
|
|
@ -105,11 +105,20 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label><?php echo __('Out of Date'); ?></label>
|
<label><?php echo __('Out of Date'); ?></label>
|
||||||
<?php if (isset($_GET['outdated'])): ?>
|
<select name='outdated'>
|
||||||
<input type="checkbox" name="outdated" checked />
|
<?php
|
||||||
|
$outdated_flags = array('' => __('All'), 'on' => __('Flagged'), 'off' => __('Not Flagged'));
|
||||||
|
foreach ($outdated_flags as $k => $v):
|
||||||
|
if ($_REQUEST['outdated'] == $k):
|
||||||
|
?>
|
||||||
|
<option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<input type="checkbox" name="outdated" />
|
<option value='<?php print $k; ?>'><?php print $v; ?></option>
|
||||||
<?php endif; ?>
|
<?php
|
||||||
|
endif;
|
||||||
|
endforeach;
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue