Commit Graph

145 Commits

Author SHA1 Message Date
7de86af975 phpdocs, reformatting 2015-06-30 23:07:10 +02:00
41d51802a4 switched geshi higlighter to composer based repository 2015-05-15 16:26:00 +02:00
79e7937762 Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
2015-01-07 10:47:45 +01:00
8702de7f7e Merge remote-tracking branch 'origin/master' into scrutinizerissues
Conflicts:
	inc/media.php
	inc/plugin.php
	inc/template.php
	lib/plugins/authplain/_test/escaping.test.php
	lib/plugins/syntax.php
2014-12-09 17:26:28 +01:00
7e8500eea1 PHPDocs and some improvements 2014-10-02 14:55:24 +02:00
e3710957c6 more phpdocs and minor check 2014-10-01 17:05:40 +02:00
42ea7f447f Many PHPDocs, some unused and dyn declared vars
many PHPDocs
some unused variables
some dynamically declared variables declared
2014-10-01 11:30:27 +02:00
85674a734d Merge pull request #708 from splitbrain/overridablelangstrings
extend lang file cascade, so users can override some lang strings
2014-09-29 18:34:02 +02:00
0440ca46b6 phpdocs parserutils 2014-09-28 15:07:17 +02:00
8d39e80d36 Merge remote-tracking branch master into revisions 2014-09-26 12:48:02 +02:00
e17b5b8976 Merge pull request #618 from splitbrain/cache_and_cachetime
Fix longstanding issue with cache class & cachetime setting
2014-05-04 19:32:38 +02:00
e310313d79 Merge remote-tracking branch 'remotes/origin/master' into revisions_local 2014-03-19 08:07:16 +01:00
59b1d91813 adjust logic of caching comments for _nocache 2014-03-17 01:33:46 +00:00
6e6d16edde Fix a couple of issues with PR#571
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.
2014-03-13 19:58:05 +00:00
709fd92548 resolve scrutinizer issue, is_a type hint doesn't allow null 2014-03-02 20:46:26 +00:00
5ee37844b9 remove rendundant msg 2014-02-28 16:55:57 +00:00
a049856df3 revert back to trigger error 2014-02-26 01:12:33 +00:00
f3283f0276 change to an Exception and expect it 2014-02-25 21:15:43 +00:00
5b76ad9103 code cleaning - add some braces 2014-02-25 20:34:20 +00:00
548d801fe2 rework p_get_renderer() for use with autoloading bundled renderers 2014-02-25 20:33:37 +00:00
2ada8709d3 add renderers to autolader 2014-02-25 20:32:56 +00:00
252398f08d remove reference operator from p_get_renderer() declaration, not required for php5 2014-02-25 03:00:46 +00:00
11ac6abdb9 if configured renderer is not found, try to fallback to a bundled renderer 2014-02-25 02:58:58 +00:00
d90a79c0ee Merge remote-tracking branch 'origin/diff_navigation' into revisions
Conflicts:
	inc/parser/xhtml.php
2014-02-17 23:15:36 +01:00
99ba9fe6e3 php doc block 2014-01-08 17:19:59 +01:00
1c8a8d7b20 change behavior only on date_at 2013-11-25 13:45:01 +01:00
4bde2196a1 remove property rev from xhtml.php
changed variable name $create_time to $modified_time
2013-11-22 09:04:44 +01:00
5c2eed9a19 add parameter at($DATE_AT) and mind revisions 2013-11-21 15:50:52 +01:00
5e40b274af refactor to avoid php notice and match structure of rest of p_get_renderer() 2013-10-16 22:09:09 +01:00
f19d1038b1 fix php strict and remove double duplicated code of renderer plugin loader 2013-10-15 13:12:57 +02:00
c33b315b06 removed a bunch of functions which were deprecated in 2005/2006 2013-02-18 01:08:40 +00:00
1153129404 Merge pull request #121 from splitbrain/strict
fix E_STRICT errors FS#2427
2012-11-04 12:24:43 -08:00
7c62086b7b only execute valid instructions FS#2432 2012-07-28 18:37:24 +02:00
31b10b49cd Be more careful when setting metadata values FS#2514
This fixes a warning when setting $meta['relation']['firstimage']
using p_set_metadata.
2012-07-28 14:00:20 +02:00
e8b5a4f91c fix E_STRICT errors FS#2427
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.
2012-07-28 12:02:06 +02:00
0a6ae52f74 Initialize more variables and test if others are set (no functional changes) 2012-07-28 11:34:47 +02:00
e3ab6fc5cb Fixed and extended PHPDoc comments and added additional @var comments 2012-07-28 11:34:47 +02:00
92a5d12663 Remove unused variables 2012-07-28 11:34:46 +02:00
6340dabc82 avoid warnings when instructions with no parameters are rendered
see http://irc.dokuwiki.org/index.php?d=2012-07-28#msg403531
2012-07-28 11:12:27 +02:00
0d24b616cd Disable some parser and renderer caches during tests FS#2564
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.
2012-07-25 18:26:35 +02:00
3d6feb1623 Remove useless condition in p_get_metadata and add explanation 2012-07-08 19:00:46 +02:00
ff1769defb another input wrapper fix 2012-06-24 15:21:26 +02:00
0cacf91f96 Add check for existing renderer class 2011-07-10 12:50:43 +02:00
1c56be7bf6 Add missing return value to p_set_metadata 2011-06-08 00:27:33 +02:00
65aa849087 Add more render/cache logic to the metadata code
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.
2011-05-08 12:16:48 +02:00
67c15ecea7 Change when metadata is rendered - only when really needed
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.
2011-05-08 01:21:26 +02:00
65f40513c5 Fix p_get_first_heading for when the search index is empty
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.
2011-04-26 23:40:24 +02:00
79c1bbfeef p_get_metadata: show the save error message only when metadata has been changed 2011-02-06 13:13:00 +01:00
0e5fde485b Allow p_set_metadata during rendering, test cases included. FS#1827 2011-02-06 13:12:54 +01:00
ff725173bf Add define for metadata usage limit in p_get_first_heading
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.
2011-01-10 23:41:43 +01:00