aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2012-07-26 16:55:11 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-07-26 16:55:11 +0530
commiteb4298c646d2b41a46dfef5ad2a72ea520b13539 (patch)
tree3cea75fa371786a753aa1b23645fe2ffcba9af40
parent747af894a0b8d47079e704c66dcfce8ce00a7251 (diff)
downloadforums-eb4298c646d2b41a46dfef5ad2a72ea520b13539.tar
forums-eb4298c646d2b41a46dfef5ad2a72ea520b13539.tar.gz
forums-eb4298c646d2b41a46dfef5ad2a72ea520b13539.tar.bz2
forums-eb4298c646d2b41a46dfef5ad2a72ea520b13539.tar.xz
forums-eb4298c646d2b41a46dfef5ad2a72ea520b13539.zip
[feature/sphinx-fulltext-search] coding changes acc to phbb conventions
Add a new line after break. Change docblocks to be more informative. PHPBB3-10946
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index 9319a57236..303b6feae8 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -103,7 +103,7 @@ class phpbb_search_fulltext_sphinx
/**
* Checks permissions and paths, if everything is correct it generates the config file
*
- * @return string|bool Language key of the error/incompatiblity occured
+ * @return string|bool Language key of the error/incompatiblity encountered, or false if successful
*
* @access public
*/
@@ -381,14 +381,19 @@ class phpbb_search_fulltext_sphinx
case 'a':
$this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'poster_id ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
break;
+
case 'f':
$this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'forum_id ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
break;
+
case 'i':
+
case 's':
$this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'post_subject ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
break;
+
case 't':
+
default:
$this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'topic_last_post_time ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
break;
@@ -401,14 +406,19 @@ class phpbb_search_fulltext_sphinx
case 'a':
$this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'poster_id');
break;
+
case 'f':
$this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'forum_id');
break;
+
case 'i':
+
case 's':
$this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'post_subject');
break;
+
case 't':
+
default:
$this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'post_time');
break;
@@ -619,7 +629,7 @@ class phpbb_search_fulltext_sphinx
}
/**
- * Destroy old cache entries
+ * Nothing needs to be destroyed
*
* @access public
*/