Commit Graph

20 Commits

Author SHA1 Message Date
Andreas Gohr 413313a155 Merge branch 'logging'
* logging:
  added JavaScript based filter mechanism
  added logging configuration
  replaced out calls to dbglog with new Logger calls
  added convenience methods to log to our default facilities
  added logviwer admin plugin
  added log dir to git
  central logging mechanism
2020-12-03 20:01:57 +01:00
Andreas Gohr 70cc2cbf41 added logviwer admin plugin
This allows for easy viewing of the available logs.

The log format was sligthly adjusted again for easier parsing.
2020-08-13 19:48:45 +02:00
Andreas Gohr 2d85e84158 wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
Moisés Braga Ribeiro efc2a4c4ab 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.
2020-05-19 09:55:05 -03:00
Moisés Braga Ribeiro 15a1d63cf1 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.
2020-05-15 06:40:04 -03:00
Moisés Braga Ribeiro 49097b7b07 Reimplementation of strcasecmp()
Reimplementation of strcasecmp() using collator.
It uses the same implementation already made for strcmp().
Fix of menuSort() function in "Ui/Admin.php".

Screens fixed:
- Administration
2020-05-10 21:49:04 -03:00
Andreas Gohr e1d9dcc8b4 First go at moving the plugin classes into their own namespace 2019-04-20 21:33:23 +02:00
Andreas Gohr e24a74c008 PSR2 style fixes
These are some simple whitespace/arrangement things that apparantly
can't be fixed automatically
2019-02-24 09:29:27 +01:00
Michael Große 923e149a1f
Merge branch 'master' into psr2 2019-02-15 01:05:01 +01:00
Andreas Gohr 64cdf7793c add event to check access to admin plugins
This adds a new method that capsulates the access check that has to be
done to decide if an admin plugin's page should be shown to the user.
The default implementation is the same as before, relying only on the
forAdminOnly() method and the users' isadmin or ismanager status.

Admin plugins themselves can override the method to do additional
checks. In this patch, I added that to the usermanager plugin which will
only return true if the current auth backend can list users.

However the real idea behind this change is that the new method emits a
new event called ADMINPLUGIN_ACCESS_CHECK which would allow plugins to
overwrite it. This way it could be possible to give certain user groups
access to certain admin plugins without giving them admin or manager
permissions.

Note: this does not change how the "Admin" link is shown, it still
depends on ismanager or isadmin. A plugin as mentioned above would need
to influence the display via the MENU_ITEMS_ASSEMBLY event.

Note: this only covers the basic access check. Admin plugins may need
further adjustments for access to other parts of the plugin (like AJAX
components). An additional commit will update this for the bundled
plugins.
2018-10-30 14:07:15 +01:00
Andreas Gohr 64159a61e9 line lengths shortened
This makes sure all files use line lenghts shorter than 120 characters.

This is a quick fix. It might not always be the nicest change.
2018-04-27 19:07:43 +02:00
DeathCamel57 3cd8376204 Make security.png more descriptive
Access attempts to security.png are normally denied, so the name of the file will be more self-descriptive
2017-12-06 00:15:21 -05:00
Andreas Gohr 4cd2074f30 fixed typo in function name 2017-02-05 11:06:20 +01:00
Andreas Gohr 71de557260 changed embedSVG to inlineSVG and make it return contents
This makes it more flexible to use on the expense of needing one echo
more.
2017-02-05 04:42:37 +01:00
Andreas Gohr d1a3148a1a removed unneeded clearer 2017-01-31 19:14:41 +01:00
Andreas Gohr 5d2e38cbc3 use lower case class names 2017-01-31 19:11:07 +01:00
Andreas Gohr 220b8a2086 improve admin styling
* use inline-block instead of flexbox
* fix RTL alignments
2017-01-31 19:06:29 +01:00
Andreas Gohr eb8a8555eb fixed access to wrong variable 2017-01-21 15:07:13 +01:00
Andreas Gohr 713faa941b Adds proper styling for new Admin UI 2017-01-21 14:27:16 +01:00
Andreas Gohr 0470c28f15 refactor Admin UI
This introduces a new dokuwiki\Ui namespace and refactors the Admin
screen into a Ui class. The ultimate goal is to split up the big,
complex functions in inc\html.php in better maintainable classes in the
Ui namespace. This is the first go at it. Others function->class
conversions should follow.

This also switches the icons for our base admin plugins to inline SVG.
(files and styling not included, yet).
2017-01-21 13:48:54 +01:00