Merge HEAD, branch 'master' of github.com:dokufreaks/plugin-tag
Merge branch 'lupo49-master'
Improvements and many corrections for the syntaxes

Count syntax:
* simplification by using a taglink creation for each tags and not creating all taglinks at once causing an empty list when tags have a coma.
Tag syntax:
* transfering the taglist to the render part where it is really used
* direct use of the taglist to update the metadata
* direct use of the resolve_pageid to update the relation reference metadata
Topic syntax:
* commenting the relation reference metadata update, causing issue with backlinks of the pointed pages when tags are removed from them.
Helper:
* Creating a taglink function
* rewrite of the _updateTagIndex function
* simplification of the _generateTagIndex using less ressources
Merge pull request #57 from YoBoY/master

Improvements and many corrections
Refactor and rewrite of helper.php + correction

/!\ can be broken on old Dokuwiki versions, needs testing!!!
Detailled changes:
- new _loadTagIndex() function to load the index.idx file from indexdir and generate it from metadatas if missing
- rewrite of the _generateTagIndex() function
- adding a _getSubjectMetadata($id) function to load this metadata, and always return an array where needed
- rewrite of the _saveIndex() function to add some cleaning on the topic_idx array first
- use of the _getSubjectMetadata() in td() function to simplify it
- refactoring of the getTopic() function
- adding _notVisible() function to test the visibility of a page
- rewrite of the tagOccurences() function
- refactoring of the _updateTagIndex() function
- added comment "(!! not used in the plugin)" on functions that seem useless, need confirmation before deletion (_refreshTagIndex, _importTagIndex, _numToID, _notEmpty)
- on tag metadata rendering, separation by page ID of the 'tags memory' permeting more than one line of tags to fix border effects with the topic page list generation when it renders lot of pages metadata at once.
Added missing $this-> in the helper
First attempt to use the metadata index of DokuWiki

The old index is still there, the old code will be removed as next step.
Removed old code and language strings connected with the old index

The index of the plugin can now be rebuilt by rebuilding the index of
DokuWiki.
Removed unused tags variable and unnecessary check in the tag syntax
Always skip tags without pages in tagOccurences()
Major rewrite of the count syntax, this should fix issue #48
Refactoring of tagOccurences(), respect ACLs and hidden pages

tagOccurences does now only return pages that are visible and readable
for the current user. If there is any use for getting all pages (i.e.
also invisible/unreadable ones) this choice might be added as parameter.

The code has been rewritten in order to make it easier to understand and
the matching of recursive namespaces has been fixed.
Disable caching for the count syntax, load occurrences only in xhtml mode

As the count syntax does respect ACLs now, its output needs to be
adjusted for the current user. As no caching logic for new/changed pages
or changes in the permissions of the user that affect the output of the
count syntax has been implemented yet, the cache has been simply
deactivated.
Add a new (optional) recursive parameter to getOccurences

This allows the cloud plugin to use its own setting if subnamespaces
should be included or not.
Correct spelling of "occur_r_ences", document tagOccurrences as public function
Only valid IDs for subject + check pages for topic

Clean the tags to only register valid ID as tags for the subject index and metadata.
Check the pages returned by the subject metadat index to keep only valid results for the getTopic function.
makes sure each tag is printed only once on topic view
Merge pull request #61 from cosmocode/master

tags are sometimes listet multiple times on topic view
only return valid IDs for tags in the _parseTagList function
Merge pull request #60 from YoBoY/metaindex

All tags are cleaned so they are valid page ids now, queries are cleaned, too.