[Home]WikiBugs/PwlistArray

UseModWiki | WikiBugs | RecentChanges | Preferences

Fixed in 1.1.0 --MarkusLude

Unused arrays at these two functions.

 sub UserIsAdmin {
   - my (@pwlist, $userPassword);
   + my ($userPassword);

   return 0  if ($AdminPass eq "");
   $userPassword = &GetParam("adminpw", "");
   return 0  if ($userPassword eq "");
   foreach (split(/\s+/, $AdminPass)) {
     next  if ($_ eq "");
     return 1  if ($userPassword eq $_);
   }
   return 0;
 }

 sub UserIsEditor {
   - my (@pwlist, $userPassword);
   + my ($userPassword);

   return 1  if (&UserIsAdmin());             # Admin includes editor
   return 0  if ($EditPass eq "");
   $userPassword = &GetParam("adminpw", "");  # Used for both
   return 0  if ($userPassword eq "");
   foreach (split(/\s+/, $EditPass)) {
     next  if ($_ eq "");
     return 1  if ($userPassword eq $_);
   }
   return 0;
 }
--JuanmaMP

UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 5, 2017 9:46 pm by MarkusLude (diff)
Search: