com web/master: Fixed votes search and redirect and URL handling functionality.: manage/user-notes.php
| From: | Sherif Ramadan | Date: | Sat, 15 Dec 2012 13:14:57 +0000 |
| Subject: | com web/master: Fixed votes search and redirect and URL handling functionality.: manage/user-notes.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15095@lists.php.net to get a copy of this message | ||
Commit: 86774530b69041712ab1310220e0c8938c95cf78
Author: Sherif Ramadan <googleguy@php.net> Sat, 15 Dec 2012 08:14:57 -0500
Parents: 2c15ab0c1c51da5678d6f1c398b17c2f239474b6
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=86774530b69041712ab1310220e0c8938c95cf78
Log:
Fixed votes search and redirect and URL handling functionality.
Changed paths:
M manage/user-notes..php
Diff:
diff --git a/manage/user-notes.php b/manage/user-notes..php
index 27b703a..d89ef38 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -127,7 +127,7 @@ if (!$action) {
"WHERE hostip = $searchip OR ip = $searchip ".
"ORDER BY votes.id DESC LIMIT $limit, 10";
} else {
- $sql = "SELECT votes.id, UNIX_TIMESTAMP(note.ts) AS ts, votes.vote, votes.note_id,
note.sect, votes.hostip, votes.ip ".
+ $sql = "SELECT votes.id, UNIX_TIMESTAMP(votes.ts) AS ts, votes.vote, votes.note_id,
note.sect, votes.hostip, votes.ip ".
"FROM votes ".
"JOIN(note) ON (votes.note_id = note.id) ".
"ORDER BY votes.id DESC LIMIT $limit, 10";
@@ -235,10 +235,12 @@ if (!$action) {
"</table>\n".
"<input type=\"submit\" name=\"deletevotes\"
value=\"Delete Selected Votes\" />\n".
"</form>\n".
- "<form method=\"GET\" action=\"" . PHP_SELF .
"?view=notes&type=" . (isset($_GET['type']) ?
urlencode($_GET['type']) : 5) . "\">\n".
+ "<form method=\"GET\" action=\"" . PHP_SELF .
"\">\n".
" <strong>Search for votes by IP address</strong>: <input
type=\"text\" name=\"votesip\" value=\"" .
(isset($_GET['votesip']) ? hscr($_GET['votesip']) :
'') .
"\" /> <input type=\"submit\"
value=\"Search\" />\n".
+ "<input type=\"hidden\" name=\"view\"
value=\"notes\" />\n".
+ "<input type=\"hidden\" name=\"type\"
value=\"" . (isset($_GET['type']) ? hscr($_GET['type']) : 5) .
"\" />\n".
"</form>";
}
if(isset($_REQUEST["view"])) {
@@ -590,7 +592,7 @@ case 'deletevotes':
}
$ids = implode(',',$ids);
if (db_query("DELETE FROM votes WHERE id IN ($ids)")) {
- header('Location: user-notes.php?id=1&was=' . urlencode($action) .
(isset($_GET['type']) ? '&type=' . urlencode($_GET['type']) :
null));
+ header('Location: user-notes.php?id=1&view=notes&was=' . urlencode($action) .
(isset($_GET['type']) ? '&type=' . urlencode($_GET['type']) :
null));
}
exit;
/* falls through */