X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f92505d78b82c6ac146e43054ebd12441575a602..2a56ec664402e21625e9251dcbb3b53490e7ed0d:/IkiWiki/UserInfo.pm diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index 2ffc51c55..dcf99da09 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -1,12 +1,12 @@ #!/usr/bin/perl +package IkiWiki; + use warnings; use strict; use Storable; use IkiWiki; -package IkiWiki; - sub userinfo_retrieve () { #{{{ my $userinfo=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") }; return $userinfo; @@ -17,7 +17,7 @@ sub userinfo_store ($) { #{{{ my $newfile="$config{wikistatedir}/userdb.new"; my $oldmask=umask(077); - my $ret=Storable::lock_store($userinfo, $newfile); + my $ret=Storable::lock_nstore($userinfo, $newfile); umask($oldmask); if (defined $ret && $ret) { if (! rename($newfile, "$config{wikistatedir}/userdb")) { @@ -74,6 +74,7 @@ sub is_admin ($) { #{{{ return grep { $_ eq $user_name } @{$config{adminuser}}; } #}}} +# XXX deprecated, should be removed eventually sub get_banned_users () { #{{{ my @ret; my $userinfo=userinfo_retrieve(); @@ -83,6 +84,7 @@ sub get_banned_users () { #{{{ return @ret; } #}}} +# XXX deprecated, should be removed eventually sub set_banned_users (@) { #{{{ my %banned=map { $_ => 1 } @_; my $userinfo=userinfo_retrieve();