[dokuwiki] Re: section edit when page changes

  • From: "Denis Simakov" <akinoame1@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 22 May 2006 21:51:54 +0300

I tried to solve this issue (to remind: if a page is changed while it
is open in browser, section edit buttons start editing of wrong parts
of the page).

Andi, I did not find the marker that you mentioned, which you say is
used for conflict detection (do you mean page locking, or is it
anything else?). (I searched in post, get and session variables, maybe
missed it.)

The "minimal intrusion" solution that I found (patch attached) is to
bind current revision timestamp to the secedit buttons. If the page
has not changed this does not influence anything (if I am not
mistaken), if it has been changed then a user starts editing the
correct part of the **old revision** (and is notified about it, as
usual).

Is this fix OK?
Sorry if I missed anything crucial -- I am not DokuWiki code guru :)

Denis



On 5/16/06, Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:
On Mon, 15 May 2006 18:57:55 -0700
Ben Coburn <btcoburn@xxxxxxxxxxxxx> wrote:
> The last modified date for the wiki
> page makes a good  marker because it can be quickly checked (the same
> way DokuWiki checks  if the internal cache is current).

And did you know? This marker already exists and is used to for conflict
detection :-) The only thing missing is to check it imeadiately when
opening a page to edit.

Andi
New patches:

[fix: wrong secedit when page changes
Denis Simakov <akinoame1@xxxxxxxxx>**20060522182043
 Binds secedit buttons to file modification stamp ('lastmod'), so that if the 
page changes in between, editing of the old revision starts.
] {
hunk ./inc/html.php 139
+  global $INFO;
hunk ./inc/html.php 145
-                              'lines'   => "$section"),
+                              'lines'   => "$section",
+                              'rev' => $INFO['lastmod']),
}

Context:

[russian translation update
Denis Simakov <akinoame1@xxxxxxxxx>**20060522115828] 
[config plugin ui update 20060520
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060520103718
 This patch hides settings that are missing config metadata and optionally 
 provides a list of warnings about settings that are not properly configured.
   - Warnings about settings are listed if $conf['allowdebug'] is true.
   - Warnings are listed by the $conf string as it appears in local.php.
   - Warnings show the $meta string as it would appear in the correct 
     settings metadata file.
   - There are 3 kinds of warnings.
     - undefined
       There is no $meta information defined for this setting.
     - no class
       The setting class specified in $meta can not be found.
       This setting does have a $meta entry.
     - no default
       The setting is missing a default value.
       The setting does have a $meta entry with a valid setting class.
   - Note: Settings with metadata but other warnings are allowed to appear 
           in the normal config settings list.
 
 Also...
   - Templates can now define their own settings classes.
   - Removed an XHTML validation error from the first patch.
   - More language strings to go with the new warnings.
 
 The warnings under the 'Undefined Settings' heading are intended to 
 provide developers with a list of any settings that they have forgotten to 
 finish preparing for the config plugin. This list should be blank for stable 
 releases.
 
] 
[moved gzip compression to init.php
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060519212751] 
[namespace-restricted fulltext-search part2
'Michael Klier <chi@xxxxxxxxxxx>'**20060518204647
     - now its possible to restrict the fulltext-search to 
       multible namespaces
 
       Examples:
         
         searchword @ns1 @ns2 @ns3
 
         "exact phrase" @ns1 @ns2 @ns3
 
] 
[namespace restricted fulltext-search
'Michael Klier <chi@xxxxxxxxxxx>'**20060518161855
     - The fulltext-search can now be restricted to a given
       namespace seperated by an "@"
 
] 
[avoid trolling in io_lock()
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060517165023] 
[lt lang update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060517105635] 
[gzip content-encoding option
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060516084132
   - Enables gzip compression of output xhtml for browsers that support it.
     For example the wiki:syntax page takes up 46.80KB raw, but only 9.88KB 
gzip encoded.
   - Setting is configurable through the config plugin.
] 
[jpg quality option
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060516062321
   - Adds a jpg quality setting for scaled images
     (Some images were getting too many jpg artifacts 
      at the hard-coded compression setting.)
   - Creates a group for the media settings in the 
     config plugin.
] 
[fr update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060515190136] 
[nl update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060515185820] 
[javascript fix to mak sumarry checking use addEvent
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060512073949] 
[add config plugin support for plugin defined setting classes
chris@xxxxxxxxxxxxx**20060511083209] 
[more info is gathered on metaupdate in background indexer
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060511191450
 The background indexer now gathers info on contributors and modification
 dates from the changelog when adding the missing meta info.
 
 A new io_grep function was added which might be useful for other parts in
 the Wiki as well.
] 
[config plugin ui organization
Ben Coburn <btcoburn@xxxxxxxxxxxxx>**20060510065732
   - organizes the configuration settings list into chunks
   - provides a table of contents for the configuration chunks
   - provides one chunk for each plugin with configurable settings
   - provides one chunk for the active template (if it has settings)
   - provides the config file setting as a tool-tip on the setting label
     ex. $conf['start']
   - provides for localization of useful strings
   - generates a "smart" fallback name for plugins and templates
   - plugin and template sections are only shown if they have settings
   - current configuration list is organized into chunks
 
 Note: There are NEW strings to translate into the non-english language files.
 
] 
[TAG develsnap 2006-05-07
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20060507173508] 
Patch bundle hash:
5f091be71d82f7d0641df5e1a5fe4c19c48a4b1f

Other related posts: