mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 20:59:02 +00:00
Empty commit
This commit is contained in:
parent
c52d1a6c9e
commit
07bac85278
@ -138,16 +138,16 @@ public function register_query($QueryString, $QueryProcessTime) {
|
||||
class SPHINXQL_QUERY {
|
||||
private $SphinxQL;
|
||||
|
||||
private $Expressions = array();
|
||||
private $Filters = array();
|
||||
private $GroupBy = '';
|
||||
private $Indexes = '';
|
||||
private $Limits = array();
|
||||
private $Options = array();
|
||||
private $QueryString = '';
|
||||
private $Select = '*';
|
||||
private $SortBy = array();
|
||||
private $SortGroupBy = '';
|
||||
private $Expressions;
|
||||
private $Filters;
|
||||
private $GroupBy;
|
||||
private $Indexes;
|
||||
private $Limits;
|
||||
private $Options;
|
||||
private $QueryString;
|
||||
private $Select;
|
||||
private $SortBy;
|
||||
private $SortGroupBy;
|
||||
|
||||
/**
|
||||
* Initialize SphinxQL object
|
||||
@ -158,6 +158,7 @@ class SPHINXQL_QUERY {
|
||||
*/
|
||||
public function __construct($Server = SPHINXQL_HOST, $Port = SPHINXQL_PORT, $Socket = SPHINXQL_SOCK) {
|
||||
$this->SphinxQL = SPHINXQL::init_connection($Server, $Port, $Socket);
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -167,7 +168,6 @@ public function __construct($Server = SPHINXQL_HOST, $Port = SPHINXQL_PORT, $Soc
|
||||
* @return current SphinxQL query object
|
||||
*/
|
||||
public function select($Fields) {
|
||||
$this->reset_query();
|
||||
$this->Select = $Fields;
|
||||
return $this;
|
||||
}
|
||||
@ -316,8 +316,6 @@ private function build_options() {
|
||||
|
||||
/**
|
||||
* Combine the query conditions into a valid Sphinx query segment
|
||||
*
|
||||
* @return SphinxQL query string
|
||||
*/
|
||||
private function build_query() {
|
||||
if(!$this->Indexes) {
|
||||
@ -325,7 +323,7 @@ private function build_query() {
|
||||
}
|
||||
$this->QueryString = "SELECT $this->Select FROM $this->Indexes";
|
||||
if(!empty($this->Expressions)) {
|
||||
$this->Filters[] = "MATCH('".implode(" ", $this->Expressions)."')";
|
||||
$this->Filters['expr'] = "MATCH('".implode(" ", $this->Expressions)."')";
|
||||
}
|
||||
if(!empty($this->Filters)) {
|
||||
$this->QueryString .= "\nWHERE ".implode("\n\tAND ", $this->Filters);
|
||||
@ -401,7 +399,7 @@ private function send_query($GetMeta) {
|
||||
/**
|
||||
* Reset all query options and conditions
|
||||
*/
|
||||
private function reset_query() {
|
||||
public function reset() {
|
||||
$this->Expressions = array();
|
||||
$this->Filters = array();
|
||||
$this->GroupBy = '';
|
||||
|
@ -49,7 +49,7 @@
|
||||
<td class="label">Tags</td>
|
||||
<td><input type="text" name="tags" size="60" value="<?=$TagList?>" /></td>
|
||||
</tr>
|
||||
<? if($CategoryID == 0) { ?> // CategoryID==0 is "Personal" collages
|
||||
<? if($CategoryID == 0) { // CategoryID==0 is "Personal" collages ?>
|
||||
<tr>
|
||||
<td class="label"><span title="A "featured" personal collage will be listed first on your profile.">Featured</span></td>
|
||||
<td><input type="checkbox" name="featured" <?=($Featured?'checked':'')?> /></td>
|
||||
|
@ -78,10 +78,12 @@
|
||||
<h3>Search this forum:</h3>
|
||||
<form class="search_form" name="forum" action="forums.php" method="get">
|
||||
<table cellpadding="6" cellspacing="1" border="0" class="layout border">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<input type="hidden" name="forums[]" value="<?=$ForumID?>" />
|
||||
<tr>
|
||||
<td><strong>Search for:</strong></td><td><input type="text" id="searchbox" name="search" size="70" /></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<input type="hidden" name="forums[]" value="<?=$ForumID?>" />
|
||||
<strong>Search for:</strong></td><td><input type="text" id="searchbox" name="search" size="70" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Search in:</strong></td>
|
||||
@ -91,10 +93,13 @@
|
||||
<input type="radio" name="type" id="type_body" value="body" />
|
||||
<label for="type_body">Post bodies</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Username:</strong></td><td><input type="text" id="username" name="user" size="70" /></td>
|
||||
</tr>
|
||||
<tr><td colspan="2" style="text-align: center"><input type="submit" name="submit" value="Search" /></td></tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center"><input type="submit" name="submit" value="Search" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
|
Loading…
Reference in New Issue
Block a user