diff --git a/plugins.php b/plugins.php index f1d540cee6..1d62e554f2 100644 --- a/plugins.php +++ b/plugins.php @@ -863,6 +863,11 @@ function update_show_current() { 'filter' => FILTER_VALIDATE_INT, 'default' => '1' ), + 'type' => array( + 'filter' => FILTER_VALIDATE_INT, + 'pageset' => true, + 'default' => '-1' + ), 'filter' => array( 'filter' => FILTER_DEFAULT, 'pageset' => true, @@ -932,6 +937,20 @@ function update_show_current() { + + + + + + + + + + @@ -962,12 +981,13 @@ function update_show_current() { function applyFilter() { if ($('#state').val() == 6) { - strURL = 'plugins.php?action=avail'; + strURL = 'plugins.php?action=avail'; } else { - strURL = 'plugins.php?action=list'; + strURL = 'plugins.php?action=list'; } strURL += '&filter='+$('#filter').val(); + strURL += '&type='+$('#type').val(); strURL += '&rows='+$('#rows').val(); strURL += '&state='+$('#state').val(); loadUrl({url:strURL}) @@ -1206,8 +1226,14 @@ function displayFileDialog(url, dialogTitle, height, width) { switch (get_request_var('state')) { case 6: /* show all matching plugins */ - if (read_config_option('github_allow_unsafe') != 'on') { + if (read_config_option('github_allow_unsafe') == '') { $sql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . ' pa.tag_name != "develop"'; + } else { + if (get_request_var('type') == '1') { + $sql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . ' pa.tag_name != "develop"'; + } elseif (get_request_var('type') == '2') { + $sql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . ' pa.tag_name = "develop"'; + } } break;