[Home]WikiPatches/UneditablePageBugFix

UseModWiki | WikiPatches | RecentChanges | Preferences

Added in 1.0.1 --MarkusLude

Patch Description

It is possible to create pages in UseMod 1.0 that can not be edited if FreeLinks are enabled. See the bug report at WikiBugs/PossibleToCreatePagesThatCanNotBeEdited for more details. This patch fixes the bug described in that report.

Patch code (unified output format)

--- wiki.pl	2004-11-16 02:46:05.000000000 -0800
+++ wiki-uneditablefix.pl	2004-11-28 08:57:30.000000000 -0800
@@ -3896,6 +3896,10 @@
   my $editTime = $Now;
   my $authorAddr = $ENV{REMOTE_ADDR};
 
+  #Bug fix: the following three lines fix the "uneditable page" bug
+  if ($FreeLinks) {
+    $id = &FreeToNormal($id);
+  }
   if (!&UserCanEdit($id, 1)) {
     # This is an internal interface--we don't need to explain
     &ReportError(Ts('Editing not allowed for %s.', $id));

Patch code (context output format)

*** wiki.pl	2004-11-16 02:46:05.000000000 -0800
--- wiki-uneditablefix.pl	2004-11-28 08:57:30.000000000 -0800
***************
*** 3896,3901 ****
--- 3896,3905 ----
    my $editTime = $Now;
    my $authorAddr = $ENV{REMOTE_ADDR};
  
+   #Bug fix: the following three lines fix the "uneditable page" bug
+   if ($FreeLinks) {
+     $id = &FreeToNormal($id);
+   }
    if (!&UserCanEdit($id, 1)) {
      # This is an internal interface--we don't need to explain
      &ReportError(Ts('Editing not allowed for %s.', $id));

-- RichardP


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 22, 2009 3:23 pm by JuanmaMP (diff)
Search: