summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
Commit message (Collapse)AuthorAge
* Merge pull request #618 from splitbrain/cache_and_cachetimeAndreas Gohr2014-05-04
|\ | | | | Fix longstanding issue with cache class & cachetime setting
| * adjust logic of caching comments for _nocacheChristopher Smith2014-03-17
| |
* | Fix a couple of issues with PR#571Christopher Smith2014-03-13
|/ | | | | | | | 1. renderer validity checks were too stringent for plugins, format should only need to be checked when mode is 'xhtml' 2. E_USER_WARNING message should now be obsolete, its previous use was to generate a warning when 'xhtml' rendering failed. PR#571 insures 'xhtml' rendering always succeeds.
* resolve scrutinizer issue, is_a type hint doesn't allow nullChristopher Smith2014-03-02
|
* remove rendundant msgChristopher Smith2014-02-28
|
* revert back to trigger errorChristopher Smith2014-02-26
|
* change to an Exception and expect itChristopher Smith2014-02-25
|
* code cleaning - add some bracesChristopher Smith2014-02-25
|
* rework p_get_renderer() for use with autoloading bundled renderersChristopher Smith2014-02-25
|
* add renderers to autoladerChristopher Smith2014-02-25
|
* remove reference operator from p_get_renderer() declaration, not required ↵Christopher Smith2014-02-25
| | | | for php5
* if configured renderer is not found, try to fallback to a bundled rendererChristopher Smith2014-02-25
|
* php doc blockAndreas Gohr2014-01-08
|
* refactor to avoid php notice and match structure of rest of p_get_renderer()Christopher Smith2013-10-16
|
* fix php strict and remove double duplicated code of renderer plugin loaderGerrit Uitslag2013-10-15
|
* removed a bunch of functions which were deprecated in 2005/2006Anika Henke2013-02-18
|
* Merge pull request #121 from splitbrain/strictAndreas Gohr2012-11-04
|\ | | | | fix E_STRICT errors FS#2427
| * fix E_STRICT errors FS#2427Andreas Gohr2012-07-28
| | | | | | | | | | | | | | | | This commit fixes all E_STRICT messages shown when running the test suite. There might be more problems not covered by tests, yet. For compatibility reasons with plugins, E_STRICT errors are still supressed.
* | only execute valid instructions FS#2432Andreas Gohr2012-07-28
| |
* | Be more careful when setting metadata values FS#2514Michael Hamann2012-07-28
|/ | | | | This fixes a warning when setting $meta['relation']['firstimage'] using p_set_metadata.
* Initialize more variables and test if others are set (no functional changes)Michael Hamann2012-07-28
|
* Fixed and extended PHPDoc comments and added additional @var commentsMichael Hamann2012-07-28
|
* Remove unused variablesMichael Hamann2012-07-28
|
* avoid warnings when instructions with no parameters are renderedAndreas Gohr2012-07-28
| | | | see http://irc.dokuwiki.org/index.php?d=2012-07-28#msg403531
* Disable some parser and renderer caches during tests FS#2564Michael Hamann2012-07-25
| | | | | | | | This disables some caches which use static variables in order to prevent parsing or rendering of the same page more than once during a run and also disables the cache of parser modes. This means we can no longer test this behavior but at least it fixes syntax plugin tests and tests which change pages in order to test certain caching behaviors.
* Remove useless condition in p_get_metadata and add explanationMichael Hamann2012-07-08
|
* another input wrapper fixAndreas Gohr2012-06-24
|
* Add check for existing renderer classLucas2011-07-10
|
* Add missing return value to p_set_metadataMichael Hamann2011-06-08
|
* Add more render/cache logic to the metadata codeMichael Hamann2011-05-08
| | | | | | | | | | | | | | | | | | | | This adds a new rendering limit of currently 5 pages to the p_get_metadata function. This means that in one request not more than 3 pages will be parsed/rendered. Pages for which the cache can be used aren't counted. This should make the new cache modes safe to use and should provide backwards compatibility while keeping the advantage of rendering metadata on demand (i.e. imagine one included page out of 10 is updated, then the metadata for that page can be rendered, but when you request a purge of the cache not 10 pages are rendered). In this commit most of the changes to the p_get_first_heading function are reverted and the title index is no longer used. This makes the first heading functionality no longer depends on the search index of DokuWiki. Maybe it can be added again later when the indexer provides a proper API for getting metadata values for all or selected pages. The performance of the p_get_first_heading function should be almost back to the performance in Anteater as the simple cache of p_get_metadata is used and also the limit of p_get_metadata is of course applied.
* Change when metadata is rendered - only when really neededMichael Hamann2011-05-08
| | | | | | | | | | | | | | | | | | | | | | This changes the cache logic for metadata. It introduces a new mode that tries to avoid rendering the page again for simple requests but still updates the metadata when the page has been changed (but not when the cache timeout has been reached or purge is used). It simply compares the time of the last rendering with the last modified time of the page. The old boolean $render parameter has been changed into an int with three possible values. Compatibility for the old parameter is provided using a check with is_numeric using the following mapping: - false is still don't render (0 is the new value for that) - true is using that new render logic which means that many plugins will still work unchanged even if they request a lot of data using $render=true (1 is the new value for that providing full compatibility in the case 1 has been used instead of true) The default value for p_get_first_heading is now that new simple cache logic, the default value for getting metadata is the cache logic which should be used with care but is the only way to request (rendered) metadata that can change because of plugin installations or upgrades.
* Fix p_get_first_heading for when the search index is emptyMichael Hamann2011-04-26
| | | | | | When the search index is empty, there was a warning and no headings were displayed. Now the headings are displayed and there is no warning anymore.
* p_get_metadata: show the save error message only when metadata has been changedMichael Hamann2011-02-06
|
* Allow p_set_metadata during rendering, test cases included. FS#1827Michael Hamann2011-02-06
|
* Add define for metadata usage limit in p_get_first_headingMichael Hamann2011-01-10
| | | | | | | | | This commit introduces a new define P_GET_FIRST_HEADING_METADATA_LIMIT that can be set in preload.php in order to change the limit for how many pages the first heading shall be loaded from metadata in p_get_first_heading. Changing this is probably most interesting for Wikis with a lot of pages where loading the title index costs a significant amount of time and memory.
* Use title index for more than 11 p_first_heading callsMichael Hamann2011-01-10
| | | | | | | | | | | | | | | | | | This change makes p_get_first_heading load the title index when more than 11 requests that caused a call to p_get_metadata have already been done. This means that small pages and the breadcrums won't trigger the loading of the title index but for larger pages or the sitemap the title index will be used. This is necessary because every call to p_get_metadata can trigger the parsing and rendering of a whole page and there can be many calls when useheading is activated and e.g. the index/sitemap page is displayed. Additionally this adds a small title cache that caches titles requested from p_get_metadata. Further tests should be done how this affects memory usage and how often the index loading is triggered in order to see if that parameter should be adjusted.
* Activate the render parameter of p_get_metadataMichael Hamann2011-01-10
| | | | | | | | | | | | | | | p_get_metadata has a $render parameter that has been disabled by the restructuring of metadata rendering. This change reactivates it so rendering metadata can be prevented. This is e.g. used in the search and in some plugins like indexmenu that use p_get_first_heading. The default of the parameter has been changed to true as otherwise the new caching structure won't work as almost all calls to p_get_metadata don't set the $render parameter. The indexer call to p_get_first_heading has been changed to set $render to true as in the indexer only one page will be rendered and the title in the index should really be the current one. This does not fix the problem that rendering pages with lots of links or displaying the index can cause the parsing/rendering of a lot of pages.
* Save metadata only when really changedMichael Hamann2010-12-27
| | | | | | This avoids disk writes when not needed and possibly also xhtml rendering when the metadata needs to be rendered but xhtml doesn't (unless the metadata file is changed).
* Render metadata when neededMichael Hamann2010-11-22
| | | | | | | | | | | | | | | | | | This changes fundamentally when metadata is rendered. This commit introduces a new cache file for every page that just contains a timestamp and is updated whenever the metadata of that page is rendered. Metadata is rendered when p_get_metadata is called and the last rendering has been before a page, metadata, configuration or renderer update or purge is set like in the xhtml renderer cache. Metadata is no longer automatically rendered when the xhtml renderer cache isn't used but will still be rendered when needed as p_get_metadata is called in the cache. Metadata is also no longer rendered in the indexer script when missing as that is already done by pageinfo() before anything else is done so the indexer script won't be called when there is no metadata file.
* improved some metadata commentsDominik Eckelmann2010-11-13
|
* Introduce metadata write wrapper p_save_metadataAdrian Lang2010-11-13
| | | | p_purge_metadata now updates the metadata cache and the INFO array like the other metadata writing functions
* Remove metadata conversion from 0a7e3bce (2006-11-26)Adrian Lang2010-11-13
|
* - spelling fixesElan Ruusamäe2010-10-07
|
* Allow plugins to specify that they have to be instantiatedAdrian Lang2010-03-29
| | | | | | | | Plugins may return false in isSingleton to let plugin_load return a new instance every time it is called. Renderer plugins are not loaded with $new set to true, but instead specify themself that they are not singletons. This behaviour allows the odt renderer to keep working (see #1598).
* Fix and simplify p_get_metadata key loopingAdrian Lang2010-03-26
| | | | | explode converts $string (false) to string ("") and returns it if $delimiter is not found, therefor looking for the key "" in metadata array.
* Rewrite p_get_metadata to not issue a E_NoticeAdrian Lang2010-03-23
|
* Merge branch 'requireall'Andreas Gohr2010-03-12
|\ | | | | | | | | Conflicts: inc/fulltext.php
| * removed more unneeded require_once() callsAndreas Gohr2010-02-01
| |
| * first attempt to centralize all include loadingAndreas Gohr2010-01-31
| | | | | | | | | | | | | | | | Classes are loaded throug PHP5's class autoloader, all other includes are just loaded by default. This skips a lot of require_once calls. Parser and Plugin stuff isn't handled by the class loader yet.
* | cast 2nd param to array when executing render instructions FS#1880Andreas Gohr2010-02-03
|/