History log of /dokuwiki/inc/fulltext.php (Results 1 – 25 of 137)
Revision Date Author Comments
# 882e464d 04-Nov-2025 Anna Dabrowska <dabrowska@cosmocode.de>

eliminate warnings in OR search


# 5dccc923 19-Nov-2024 Andreas Gohr <andi@splitbrain.org>

fix error on phrase search with no results. fixes #4355

When no pages for a phrase can be found, eg. because the index is still
empty, end($stack) returns false instead of an array, breaking the
fol

fix error on phrase search with no results. fixes #4355

When no pages for a phrase can be found, eg. because the index is still
empty, end($stack) returns false instead of an array, breaking the
following loop.

show more ...


# 8b267e5e 06-Feb-2024 splitbrain <splitbrain@users.noreply.github.com>

�� Rector and PHPCS fixes


# e08e2789 04-Feb-2024 Bheesham Persaud <171007+bheesham@users.noreply.github.com>

inc/fulltext Result from splice could be empty

The code for `AND` and `OR` assumes the call to splice will always
return 2 elements, which isn't the case if no terms are found.

Example log messages

inc/fulltext Result from splice could be empty

The code for `AND` and `OR` assumes the call to splice will always
return 2 elements, which isn't the case if no terms are found.

Example log messages:

PHP Warning: Undefined array key 0 in .../dokuwiki/inc/fulltext.php on line 134
PHP Warning: Undefined array key 1 in .../dokuwiki/inc/fulltext.php on line 134
PHP Warning: foreach() argument must be of type array|object, null given in .../dokuwiki/inc/fulltext.php on line 614

Simplified example, via `php -a`:

php > $arr = [];
php > [$a, $b] = array_splice($arr, -2);
PHP Warning: Undefined array key 0 in php shell code on line 1
PHP Warning: Undefined array key 1 in php shell code on line 1

To clear the warning we check if the result is empty and break early,
otherwise we pass the result into `ft_resultCombine` or
`ft_resultUnite`, which both handle the length 1 arrays.

show more ...


# 6c16a3a9 14-Sep-2023 fiwswe <fiwswe@fwml.de>

Use str_starts_with/str_ends_with


# d4f83172 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: line breaks


# 90fb952c 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: operator spacing


# 4b230b99 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: indent fixes


# 7d34963b 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: control flow line breaks


# 177d6836 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: control flow whitespaces


# dccd6b2b 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: function call spacing


# d868eb89 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: function declaration braces/spaces


# c1482d1c 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: function argument spacing


# 24870174 29-Aug-2023 Andreas Gohr <andi@splitbrain.org>

Apply rector fixes to the rest of inc


# 40f2b82e 25-Feb-2023 Andreas Gohr <andi@splitbrain.org>

Fix unititialized string offset access in query parser

The code always tried to access positon 2 of the parsed token, even for
tokens shorter than that (like OR)

fixes #3896


# 7fb26b8e 14-Feb-2023 Andreas Gohr <andi@splitbrain.org>

Properly quick search in titles with UTF-8 chars.

Fixes #3808


# 248d652b 01-Apr-2021 Gerrit Uitslag <klapinklapin@gmail.com>

exclude ns in pagelook ups

Enables excluding namespaces in the quick search of the searchform
https://github.com/Klap-in/dokuwiki-plugin-searchform/issues/7


# 5afd9580 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

fix undefined array warning in fulltext indexer

This was surfaced on PHP8 and might actually have been a bug before.


# 2d85e841 11-Aug-2020 Andreas Gohr <andi@splitbrain.org>

wrap sorting functions into their own class


# 06281c9c 22-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Page sort added in _ft_pageSearch()

_ft_pageLookup() provided sorted results, but _ft_pageSearch() did not.


# efc2a4c4 19-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Functions renamed with "intl" prefix

Better naming of functions to help future maintenance.
- compare() renamed to intl_strcmp()
- sort_pagenames() renamed to intl_sort()
- sort_keys() renamed to in

Functions renamed with "intl" prefix

Better naming of functions to help future maintenance.
- compare() renamed to intl_strcmp()
- sort_pagenames() renamed to intl_sort()
- sort_keys() renamed to intl_ksort()
- new function intl_asort()
- sort_filenames() renamed to intl_asortFN()
Updated documentation.

show more ...


# 7d8012ca 15-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Cleanup of function sort_pagenames() [name changed]

Name changed from sort_pages() to sort_pagenames().
Fixed behavior without collator: sort() with flags SORT_NATURAL and SORT_FLAG_CASE.

Fix of ft

Cleanup of function sort_pagenames() [name changed]

Name changed from sort_pages() to sort_pagenames().
Fixed behavior without collator: sort() with flags SORT_NATURAL and SORT_FLAG_CASE.

Fix of ft_backlinks() and ft_mediause() function in "fulltext.php".

Functions that call ft_backlinks() and now have the expected results:
html.php:1085, html_backlinks(): display backlinks
Remote\ApiCore.php:456, listBackLinks(): Return a list of backlinks

Functions that call ft_mediause() and now have the expected results:
media.php:222, media_inuse(): Convenience function to check if a media file is still in use
media.php:1199, media_details(): Prints mediafile tags

Screens fixed:
- Backlinks
- List of pages that references a media file (View tab in the 3rd column of Media Manager)

Fix of callSuggestions() function in "Ajax.php".

Screens fixed:
- OpenSearch suggestions: /lib/exe/ajax.php?call=suggestions&q={query}

show more ...


# 15a1d63c 15-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Cleanup of function compare() [name changed]

Name changed from strcompare() to compare().

Fix of ft_pagesorter() function in "fulltext.php".
ft_pagesorter() is used by _ft_pageLookup(), which is us

Cleanup of function compare() [name changed]

Name changed from strcompare() to compare().

Fix of ft_pagesorter() function in "fulltext.php".
ft_pagesorter() is used by _ft_pageLookup(), which is used by ft_pageLookup().

Functions that call ft_pageLookup() and now have the expected results:
Action\Search.php:69, execute(): run the search
Ajax.php:50, callQsearch(): Searches for matching pagenames
Ajax.php:352, callLinkwiz(): List matching namespaces and pages for the link wizard

Screens fixed:
- Search (list of matching pagenames)
- Quick search (when typing)
- Internal link suggestion when editing a page (when nothing was typed)

Fix of menuSort() function in "Ui/Admin.php".

Screens fixed:
- Administration

Fix of sort_search_fulltext() function in "search.php".
This function does not seem to be used anywhere.

show more ...


# 6dbc2719 03-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Reimplementation of sort()

Reimplementation of sort() using collator.
Fix of ft_backlinks() and ft_mediause() function in "fulltext.php".

Functions that call ft_backlinks() and now have the expecte

Reimplementation of sort()

Reimplementation of sort() using collator.
Fix of ft_backlinks() and ft_mediause() function in "fulltext.php".

Functions that call ft_backlinks() and now have the expected results:
html.php:1085, html_backlinks(): display backlinks
Remote\ApiCore.php:456, listBackLinks(): Return a list of backlinks

Functions that call ft_mediause() and now have the expected results:
media.php:222, media_inuse(): Convenience function to check if a media file is still in use
media.php:1199, media_details(): Prints mediafile tags

Screens fixed:
- Backlinks
- List of pages that references a media file (View tab in the 3rd column of Media Manager)

show more ...


# 45d5cd9d 03-May-2020 Moisés Braga Ribeiro <moisesbr@gmail.com>

Reimplementation of strcmp()

Reimplementation of strcmp() using collator.
Fix of ft_pagesorter() function in "fulltext.php".
ft_pagesorter() is used by _ft_pageLookup(), which is used by ft_pageLook

Reimplementation of strcmp()

Reimplementation of strcmp() using collator.
Fix of ft_pagesorter() function in "fulltext.php".
ft_pagesorter() is used by _ft_pageLookup(), which is used by ft_pageLookup().

Functions that call ft_pageLookup() and now have the expected results:
Action\Search.php:69, execute(): run the search
Ajax.php:50, callQsearch(): Searches for matching pagenames
Ajax.php:352, callLinkwiz(): List matching namespaces and pages for the link wizard

Screens fixed:
- Search (list of Matching pagenames)
- Quick search (when typing)
- Internal link suggestion when editing a page (when nothing was typed)

show more ...


123456