Skip to content

Commit

Permalink
[4.x] Fix default language value for taxonomy rows (#43990)
Browse files Browse the repository at this point in the history
* fix default language value for taxonomy rows

* fix default value for other taxonomy methods
  • Loading branch information
SniperSister authored Aug 30, 2024
1 parent ddca6ac commit db5d739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_finder/src/Indexer/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function getTaxonomy($branch = null)
*
* @since 2.5
*/
public function addTaxonomy($branch, $title, $state = 1, $access = 1, $language = '')
public function addTaxonomy($branch, $title, $state = 1, $access = 1, $language = '*')
{
// We can't add taxonomies with empty titles
if (!trim($title)) {
Expand Down Expand Up @@ -427,7 +427,7 @@ public function addTaxonomy($branch, $title, $state = 1, $access = 1, $language
*
* @since 4.0.0
*/
public function addNestedTaxonomy($branch, ImmutableNodeInterface $contentNode, $state = 1, $access = 1, $language = '')
public function addNestedTaxonomy($branch, ImmutableNodeInterface $contentNode, $state = 1, $access = 1, $language = '*')
{
// We can't add taxonomies with empty titles
if (!trim($contentNode->title)) {
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_finder/src/Indexer/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function addBranch($title, $state = 1, $access = 1)
$node->state = $state;
$node->access = $access;
$node->parent_id = 1;
$node->language = '';
$node->language = '*';

return self::storeNode($node, 1);
}
Expand All @@ -87,7 +87,7 @@ public static function addBranch($title, $state = 1, $access = 1)
* @since 2.5
* @throws \RuntimeException on database error.
*/
public static function addNode($branch, $title, $state = 1, $access = 1, $language = '')
public static function addNode($branch, $title, $state = 1, $access = 1, $language = '*')
{
// Get the branch id, insert it if it does not exist.
$branchId = static::addBranch($branch);
Expand Down Expand Up @@ -116,7 +116,7 @@ public static function addNode($branch, $title, $state = 1, $access = 1, $langua
*
* @since 4.0.0
*/
public static function addNestedNode($branch, NodeInterface $node, $state = 1, $access = 1, $language = '', $branchId = null)
public static function addNestedNode($branch, NodeInterface $node, $state = 1, $access = 1, $language = '*', $branchId = null)
{
if (!$branchId) {
// Get the branch id, insert it if it does not exist.
Expand Down

0 comments on commit db5d739

Please sign in to comment.