Commit c39183c3 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Add ability to search for non-out-of-date packages (fixes FS#17896).


Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 4b2b8afb
......@@ -491,7 +491,12 @@ function pkg_search_page($SID="") {
}
if (isset($_GET['outdated'])) {
$q .= "AND OutOfDateTS IS NOT NULL ";
if ($_GET['outdated'] == 'on') {
$q .= "AND OutOfDateTS IS NOT NULL ";
}
elseif ($_GET['outdated'] == 'off') {
$q .= "AND OutOfDateTS IS NULL ";
}
}
$order = $_GET["SO"] == 'd' ? 'DESC' : 'ASC';
......
......@@ -105,11 +105,20 @@
</li>
<li>
<label><?php echo __('Out of Date'); ?></label>
<?php if (isset($_GET['outdated'])): ?>
<input type="checkbox" name="outdated" checked />
<?php else: ?>
<input type="checkbox" name="outdated" />
<?php endif; ?>
<select name='outdated'>
<?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: ?>
<option value='<?php print $k; ?>'><?php print $v; ?></option>
<?php
endif;
endforeach;
?>
</select>
</li>
</ul>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment