Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] ManagedSynonyms language determination #1

Merged
merged 2 commits into from
Jul 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/Facet/SimpleFacetRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function getFacetProperties() {

if ($facet['count'] > $this->solrConfiguration['search.']['faceting.']['limit']) {
$showAllLink = '<a href="#" class="tx-solr-facet-show-all">###LLL:faceting_showMore###</a>';
$showAllLink = tslib_cObj::wrap($showAllLink, $this->solrConfiguration['search.']['faceting.']['showAllLink.']['wrap']);
$showAllLink = $GLOBALS['TSFE']->cObj->wrap($showAllLink, $this->solrConfiguration['search.']['faceting.']['showAllLink.']['wrap']);
$facet['show_all_link'] = $showAllLink;
}

Expand All @@ -92,4 +92,4 @@ public function getFacetProperties() {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/solr/Classes/Facet/SimpleFacetRenderer.php']);
}

?>
?>
2 changes: 1 addition & 1 deletion Classes/SolrService.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ protected function getManagedLanguage() {
if (is_object($schema) && isset($schema->fieldTypes)) {
foreach ($schema->fieldTypes as $fieldType) {
if ($fieldType->name === 'text') {
foreach ($fieldType->indexAnalyzer->filters as $filter) {
foreach ($fieldType->queryAnalyzer->filters as $filter) {
if ($filter->class === 'solr.ManagedSynonymFilterFactory') {
$language = $filter->managed;
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/SpellChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getSpellCheckingSuggestions() {

$suggestions = $this->getSuggestions();
if($suggestions && !$suggestions['correctlySpelled'] && !empty($suggestions['collation'])) {
$suggestionsLink = tslib_cObj::noTrimWrap(
$suggestionsLink = $GLOBALS['TSFE']->cObj->noTrimWrap(
$this->getSuggestionQueryLink(),
$this->configuration['search.']['spellchecking.']['wrap']
);
Expand All @@ -153,4 +153,4 @@ public function getSpellCheckingSuggestions() {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/solr/Classes/SpellChecker.php']);
}

?>
?>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
],
"require": {
"php": ">5.3.0,~5.5.0"
"php": ">5.3.0,~5.6.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason for this change, you're not using any 5.6 specific features, are you? The other thing is to try to keep this in line with the TYPO3 LTS requirements.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought about it: This is fine with me, we actually should raise the minimum PHP version to at least 5.4, maybe even 5.6. Definitely for EXT:solr 3.1.

We shouldn't support EOL PHP versions, even if CMS might say otherwise.
http://php.net/supported-versions.php

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu 12.04 LTS (Precise Pangolin) has PHP 5.3.10 and has support untill 2017.
Ubuntu 14.04 LTS (Trusty Tahr) has PHP 5.5.12 and has support until 2019.
See: https://launchpad.net/ubuntu/+source/php5

I would suggest to stick our Ubuntu reference installation with 5.3 to 5.5 for the moment.

},
"require-dev": {
"typo3-ci/typo3cms": "dev-master"
Expand Down