Skip to content
Snippets Groups Projects
  1. Jan 10, 2011
    • Michael Hamann's avatar
      Fix msg() calls when messages have already been printed · cc58224c
      Michael Hamann authored
      This commit fixes two bugs that occurred when msg() was called after
      html_msgarea() had already been called.
      - the $MSG array is now cleared when it has been printed (otherwise $MSG
        has been printed again when another msg() call was done)
      - headers_sent() didn't work for me, it always reported false although
        html_msgarea() had already been called which might be explainable with
        output buffering. This makes msg() now depend on the first call of
        html_msgarea() or headers_sent() in order to not to break msg() in
        ajax requests etc.
      cc58224c
    • Michael Hamann's avatar
      Use title index for more than 11 p_first_heading calls · bf0c93c2
      Michael Hamann authored
      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.
      bf0c93c2
    • Michael Hamann's avatar
      Activate the render parameter of p_get_metadata · 4a819402
      Michael Hamann authored
      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.
      4a819402
    • Michael Hamann's avatar
      Use md5 of the id in the subscription lockdir. FS#2112 · d6a4a040
      Michael Hamann authored
      Filenames can't contain ":" on windows and the lock directory contained
      the unescaped page id. The lock function tries in an endless loop to
      create the lock directory when it fails and the directory doesn't exist.
      Just escaping the directory name won't work as then the filename length
      limit will be quickly hit when using deep namespace structures with utf8
      names. Thus using the md5sum seems to be the best solution. Perhaps the
      lock function could also be changed to create a file with that name that
      contains the id so the id can be retrieved for debugging purposes.
      d6a4a040
  2. Jan 09, 2011
    • Niels Lange's avatar
      German language update · 73f799f0
      Niels Lange authored
      73f799f0
    • Massimiliano Vassalli's avatar
      Latin language update · 178c8be8
      Massimiliano Vassalli authored
      - better use of Latin terminology for DokuWiki
      - ACL is not translated as AAA (Aditus Administrationis Aditus) but
        with ICA (Index Custodiae Aditus), which is a more literal translation
      - minor corrections of grammar and logic
      - The word "namespace" is more literally translated "spatium
        nominis", but according to other translations (like the Italian one),
        I preferred to use "genus".
      178c8be8
  3. Jan 04, 2011
  4. Jan 03, 2011
  5. Jan 02, 2011
  6. Dec 31, 2010
  7. Dec 29, 2010
  8. Dec 27, 2010
    • Michael Hamann's avatar
      Save metadata only when really changed · 69ba640b
      Michael Hamann authored
      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).
      69ba640b
  9. Dec 22, 2010
  10. Dec 21, 2010
  11. Dec 18, 2010
  12. Dec 13, 2010
  13. Dec 12, 2010
  14. Dec 10, 2010
    • Michael Hamann's avatar
      preg_quote namespaces in auth_aclcheck · 3e304b55
      Michael Hamann authored
      Like ids namespaces are now preg_quoted in the acl check (and therefore
      the escaping of "*" has been removed). When plugins call the ACL check
      function with strange ids the regex fails otherwise (in the case of the
      include plugin errors like "Warning: preg_grep() [function.preg-grep]:
      Compilation failed: missing terminating ] for character class at offset
      47" have been reported by two users).
      
      I've run the acl tests after this change and everything passes so this
      shouldn't break anything but please test this especially with protected
      wikis as this change modifies the code that handles namespace
      permissions. Furthermore permissions for a namespace foobar are no
      longer applied to namespaces with names like foo.ar, I hope nobody has
      used that "feature".
      
      When you are using per-user namespaces, user registration is open and
      either write or read protection for these namespaces is important to
      you this is a security fix for you: When someone wants to get access to
      the namespace of a user "foo.bar" he can register as "fooxbar" (where
      "x" is an arbitrary character) and will have access to the user
      namespace of the user "foo.bar" as when a page in "foo.bar" is checked
      it will match the rule for "fooxbar".
      3e304b55
  15. Dec 08, 2010
    • Andreas Gohr's avatar
    • Andreas Gohr's avatar
      added auth_isMember() · d6dc956f
      Andreas Gohr authored
      This function abstracts checking a given user and her groups against a
      given member list (as used in the superuser and manager options).
      
      It is also used in auth_isManager() and auth_isAdmin(), unlike the
      previous function, this one skips the nameencode step as it should be
      unnessary here (all input is given decoded).
      
      The test cases where extended by some non-ID user and group names.
      
      People with non-plain auth backends should check that their
      administrator and manager setups still work as expected
      d6dc956f
    • Andreas Gohr's avatar
      fixed indent · 5b72404c
      Andreas Gohr authored
      5b72404c
  16. Dec 07, 2010
    • Andreas Gohr's avatar
      Make baseonly work in allowedModes · 9fa736b0
      Andreas Gohr authored
      This makes it possible to have modes that do accept headers
      (baseonly) in the parser.
      
      Related test cases are still running through but I'm not 100% sure
      I did not break something here. So it should be tested a bit more.
      
      This patch will allow plugins to wrap multiple sections, however it
      also makes it possible to easily break XHTML validity, because
      headers also open and close sections, so plugin authors need to be
      aware!
      
      In case you wonder: this patch is not about allowing formatting
      inside headers.
      9fa736b0
  17. Dec 06, 2010
  18. Dec 02, 2010
  19. Nov 30, 2010
  20. Nov 29, 2010
    • Elan Ruusamäe's avatar
      Use $USERINFO in mail_setup, as $INFO['userinfo'] is not yet available. · 609c41e4
      Elan Ruusamäe authored
      20:51:05 <glen> what is the difference between $INFO['userinfo'] and $USERINFO?
      20:52:17 <splitbrain> none really
      20:52:33 <glen> yet one works ($USERINFO) and the other doesn't in my setup
      20:52:59 <splitbrain> $INFO isn't available everywhere
      20:53:27 <splitbrain> or might not have been set yet (if you're fetching an early action hook)
      20:53:27 <glen> yeah, mail headers setup failed for me
      609c41e4
    • Michael Hamann's avatar
      Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3 · e3776c06
      Michael Hamann authored
      As of VIM 7.3 it is no longer possible to specify the encoding in the
      modeline. This gives an error message whenever such a file is opened,
      thus this commit removes the enc setting from the modeline.
      e3776c06
  21. Nov 26, 2010
    • Michael Hamann's avatar
      Fix for $conf['breadcrumbs'] < 0, FS#2107 · 48714142
      Michael Hamann authored
      This fixes an infinite loop in breadcrumbs() and makes the behaviors in
      all places where breadcrumbs are used consistent so that non-numeric
      values, values < 0 and 0 are treated the same way.
      48714142
  22. Nov 22, 2010
    • Michael Hamann's avatar
      Render metadata when needed · 98214867
      Michael Hamann authored
      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.
      98214867
    • Xin LI's avatar
      Fix unicode handling. · 5e1ee188
      Xin LI authored
      
      Suggested by:   MQ <antinvidia gmail com>
      
      Signed-off-by: default avatarXin LI <delphij@FreeBSD.org>
      5e1ee188
Loading