* Added label for includeSpam input element in $Site#referrers skin
* Enabled Site.search_action() for GET requests
This commit is contained in:
parent
8ecba3b16e
commit
c63789a82a
2 changed files with 9 additions and 4 deletions
|
@ -71,9 +71,9 @@ size="30" />
|
||||||
<input type="button" onclick="document.location='<% site.href
|
<input type="button" onclick="document.location='<% site.href
|
||||||
action="referrers" %>';" value="Reset" />
|
action="referrers" %>';" value="Reset" />
|
||||||
<div class="small">
|
<div class="small">
|
||||||
<input type="checkbox" name="includeSpam" value="checked"
|
<input type="checkbox" id="includeSpam" name="includeSpam" value="checked"
|
||||||
<% request.includeSpam prefix='checked="' suffix='"' encoding="form" %> />
|
<% request.includeSpam prefix='checked="' suffix='"' encoding="form" %> />
|
||||||
include referrer spam
|
<label for="includeSpam">include referrer spam</label>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<table border="0" cellspacing="0" cellpadding="2">
|
<table border="0" cellspacing="0" cellpadding="2">
|
||||||
|
|
|
@ -424,9 +424,14 @@ Site.prototype.referrers_action = function() {
|
||||||
|
|
||||||
Site.prototype.search_action = function() {
|
Site.prototype.search_action = function() {
|
||||||
var search;
|
var search;
|
||||||
if (!(search = req.postParams.q) || !stripTags(search)) {
|
if (!(search = req.data.q) || !stripTags(search)) {
|
||||||
res.message = gettext("Please enter a query in the search form.");
|
res.message = gettext("Please enter a query in the search form.");
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: Trying to prepare search string for encoded metadata
|
||||||
|
/*var source = String(search).toSource();
|
||||||
|
search = source.substring(source.indexOf('"') + 1,
|
||||||
|
source.lastIndexOf('"'));
|
||||||
|
res.debug(search)*/
|
||||||
var title = '%title:"%' + search + '%"%';
|
var title = '%title:"%' + search + '%"%';
|
||||||
var text = '%text:"%' + search + '%"%';
|
var text = '%text:"%' + search + '%"%';
|
||||||
var sql = new Sql();
|
var sql = new Sql();
|
||||||
|
|
Loading…
Add table
Reference in a new issue