mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Fix sentbox search
Incorrect hash used in RSS news feed links JS ctrl+f-ish search on upload rules page
This commit is contained in:
parent
c58f94a36f
commit
7a64bf0d36
@ -65,7 +65,7 @@
|
||||
if (strtotime($NewsTime) >= time()) {
|
||||
continue;
|
||||
}
|
||||
echo $Feed->item($Title, $Text->strip_bbcode($Body), 'index.php#'.$NewsID, SITE_NAME.' Staff','','',$NewsTime);
|
||||
echo $Feed->item($Title, $Text->strip_bbcode($Body), 'index.php#news'.$NewsID, SITE_NAME.' Staff','','',$NewsTime);
|
||||
if (++$Count > 4) {
|
||||
break;
|
||||
}
|
||||
|
@ -58,16 +58,16 @@
|
||||
}
|
||||
$sql .= " WHERE ";
|
||||
if(!empty($_GET['search'])) {
|
||||
$Search = db_string($_GET['search']);
|
||||
if($_GET['searchtype'] == "user") {
|
||||
$sql .= "um.Username LIKE '".$Search."' AND ";
|
||||
} elseif($_GET['searchtype'] == "subject") {
|
||||
$Words = explode(' ', $Search);
|
||||
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
|
||||
} elseif($_GET['searchtype'] == "message") {
|
||||
$Search = db_string($_GET['search']);
|
||||
if($_GET['searchtype'] == "user") {
|
||||
$sql .= "um.Username LIKE '".$Search."' AND ";
|
||||
} elseif($_GET['searchtype'] == "subject") {
|
||||
$Words = explode(' ', $Search);
|
||||
$sql .= "c.Subject LIKE '%".implode("%' AND c.Subject LIKE '%", $Words)."%' AND ";
|
||||
} elseif($_GET['searchtype'] == "message") {
|
||||
$Words = explode(' ', $Search);
|
||||
$sql .= "m.Body LIKE '%".implode("%' AND m.Body LIKE '%", $Words)."%' AND ";
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql .= ($Section == 'sentbox')? ' cu.InSentbox' : ' cu.InInbox';
|
||||
$sql .="='1'";
|
||||
@ -95,25 +95,26 @@
|
||||
<? if($DB->record_count()==0) { ?>
|
||||
<h2>Your <?= ($Section == 'sentbox') ? 'sentbox' : 'inbox' ?> is currently empty</h2>
|
||||
<? } else { ?>
|
||||
<form action="inbox.php" method="get" id="searchbox">
|
||||
<div>
|
||||
<input type="radio" name="searchtype" value="user" checked="checked" /> User
|
||||
<input type="radio" name="searchtype" value="subject" /> Subject
|
||||
<input type="radio" name="searchtype" value="message" /> Message
|
||||
<span style="float: right;">
|
||||
<form action="inbox.php" method="get" id="searchbox">
|
||||
<div>
|
||||
<input type="hidden" name="action" value="<?=$Section?>" />
|
||||
<input type="radio" name="searchtype" value="user" checked="checked" /> User
|
||||
<input type="radio" name="searchtype" value="subject" /> Subject
|
||||
<input type="radio" name="searchtype" value="message" /> Message
|
||||
<span style="float: right;">
|
||||
<? if(empty($_GET['sort']) || $_GET['sort'] != "unread") { ?>
|
||||
<a href="<?=$CurURL?>sort=unread">List unread first</a>
|
||||
<a href="<?=$CurURL?>sort=unread">List unread first</a>
|
||||
<? } else { ?>
|
||||
<a href="<?=$CurURL?>">List latest first</a>
|
||||
<a href="<?=$CurURL?>">List latest first</a>
|
||||
<? } ?>
|
||||
</span>
|
||||
<br />
|
||||
<input type="text" name="search" value="Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>" style="width: 98%;"
|
||||
onfocus="if (this.value == 'Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>';"
|
||||
/>
|
||||
</span>
|
||||
<br />
|
||||
<input type="text" name="search" value="Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>" style="width: 98%;"
|
||||
onfocus="if (this.value == 'Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>') this.value='';"
|
||||
onblur="if (this.value == '') this.value='Search <?= ($Section == 'sentbox') ? 'Sentbox' : 'Inbox' ?>';"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<form action="inbox.php" method="post" id="messageform">
|
||||
<input type="hidden" name="action" value="masschange" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user