[Home]WikiCodeSuggestionsResolved

UseModWiki | RecentChanges | Preferences

Suggestions for changes to the Wiki implementation related to restructuring, reorganizing, or improving the internal code. These suggestions have either already been implemented, or categorically rejected.

ToDo?: move these to subpages, if this page gets too cluttered.


escaping ampersands in URLS

I've added the following two lines into the middle of sub scriptlink

  $action =~ s/\&/\&/g;          # escape any ampersands
  $action =~ s/\&/\&/g;  # fix any double escapes

This ensures that any ampersands in the HREF part of links are properly escaped. This makes W3C happy.

(warning: the text formatting rules required me to hack the actual snippet above to make the & entities be spelled out properly)

This was fixed in 1.0.1, the problem was mentioned in WikiBugs/AmpersandBug

Code reorganization for config file

What about extracting the config options into a separate file. Perhaps it would be the new wiki.pl and then it would "use " the code part of the wiki file.

This is already done. The tarball usemod092.tar.gz contains the files "wiki.pl" and "config". "config" is the part with all the config options. "wiki.pl" contains the same text, with the set of 'standard' options. Set "$UseConfig=1" in wiki.pl to use options from the config-file. --HaJoGurt
note: this could be improved by :
* adding $ConfigFile? use vars qw();
* adding $ConfigFile? = "$DataDir/config";
* changing function DoWikiRequest:
sub DoWikiRequest {
  #if ($UseConfig && (-f "$DataDir/config")) {
  #do "$DataDir/config";
  if ($UseConfig && (-f $ConfigFile)) {
    do $ConfigFile;  # Later consider error checking?
  }
  ...
}

That way when having multi-wikis on the same server, you only need one copy of the code. And updating to new versions would not need to change the config file (maybe). And patching the code would not need to be done on each version of wiki.pl

-- SuperLinux



UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 29, 2007 11:09 pm by MarkusLude (diff)
Search: