Skip to content

Commit

Permalink
fix #65 forum advanced search is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
RedDragonWebDesign committed Feb 7, 2024
1 parent b119625 commit 591ca9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/forum/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function check_filter_boards() {
$breadcrumbObj->addCrumb("Forum", $MAIN_ROOT."forum");
$breadcrumbObj->addCrumb("Search Forum");

// $_POST is the method for doing advanced searches. But there is also a limited $_GET search for searching all of a user's posts. If using $_GET search, set the $_POST variables here.
// $_POST is the method for doing advanced searches. But there is also a limited $_GET search for searching all of a user's posts. If using $_GET search, set the $_POST variables here, basically imitating an advanced search.
if (count($_GET) > 0) {
$_POST['fakesearchuser'] = $_GET['searchuser'];
$_POST['checkCSRF'] = $_SESSION['csrfKey'];
Expand All @@ -98,7 +98,7 @@ function check_filter_boards() {
$_POST['sortresults_ascdesc'] = 0;

if (count($_GET['filterboards']) == 0) {
$_POST['filterboards'][] = 0;
$_POST['filterboards'][] = 0; // 0 means search all boards
}

foreach ($_GET as $key => $value) {
Expand All @@ -115,13 +115,11 @@ function check_filter_boards() {

require_once($prevFolder."include/breadcrumb.php");


$arrMemberList = [];
$result = $mysqli->query("SELECT * FROM ".$dbprefix."members WHERE disabled = '0' AND rank_id != '1' ORDER BY username");
while ($row = $result->fetch_assoc()) {
$arrMemberList[] = ["id" => $row['member_id'], "value" => filterText($row['username'])];
}

$memberList = json_encode($arrMemberList);

// Populate the $filterBoardOptions variable, which contains the list of boards to include in the Filter Boards <select> element
Expand Down
4 changes: 2 additions & 2 deletions src/installer/cs4.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2488,8 +2488,8 @@ INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(39, 'forum_
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(40, 'forum_rankheight', '75');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(41, 'forum_rankwidthunit', 'px');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(42, 'forum_rankheightunit', 'px');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(43, 'forum_postsperpage', '0');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(44, 'forum_topicsperpage', '0');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(43, 'forum_postsperpage', '20');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(44, 'forum_topicsperpage', '20');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(45, 'forum_imagewidth', '500');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(46, 'forum_imageheight', '500');
INSERT INTO `websiteinfo` (`websiteinfo_id`, `name`, `value`) VALUES(47, 'forum_sigwidth', '500');
Expand Down

0 comments on commit 591ca9c

Please sign in to comment.