[Home]WikiBugs/PwlistArray

UseModWiki | WikiBugs | RecentChanges | Preferences

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 January 21, 2013 9:30 pm by JuanmaMP (diff)
Search: