default_pageext => ".mdwn",
cgi => 0,
svn => 1,
+ notify => 0,
url => '',
cgiurl => '',
historyurl => '',
hyperestraier => 0,
wrapper => undef,
wrappermode => undef,
+ svnrepo => undef,
+ svnpath => "trunk",
srcdir => undef,
destdir => undef,
templatedir => "/usr/share/ikiwiki/templates",
underlaydir => "/usr/share/ikiwiki/basewiki",
setup => undef,
adminuser => undef,
+ adminemail => undef,
);
eval q{use Getopt::Long};
"hyperestraier" => \$config{hyperestraier},
"rss!" => \$config{rss},
"cgi!" => \$config{cgi},
+ "notify!" => \$config{notify},
"url=s" => \$config{url},
"cgiurl=s" => \$config{cgiurl},
"historyurl=s" => \$config{historyurl},
"diffurl=s" => \$config{diffurl},
+ "svnrepo" => \$config{svnrepo},
+ "svnpath" => \$config{svnpath},
+ "adminemail=s" => \$config{adminemail},
"exclude=s@" => sub {
$config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$_[1]/;
},
return $template->output;
}#}}}
-sub userinfo_get ($$) { #{{{
- my $user=shift;
- my $field=shift;
-
- eval q{use Storable};
- my $userdata=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
- if (! defined $userdata || ! ref $userdata ||
- ! exists $userdata->{$user} || ! ref $userdata->{$user} ||
- ! exists $userdata->{$user}->{$field}) {
- return "";
- }
- return $userdata->{$user}->{$field};
-} #}}}
-
-sub userinfo_set ($$$) { #{{{
- my $user=shift;
- my $field=shift;
- my $value=shift;
-
- eval q{use Storable};
- my $userdata=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
- if (! defined $userdata || ! ref $userdata ||
- ! exists $userdata->{$user} || ! ref $userdata->{$user}) {
- return "";
- }
-
- $userdata->{$user}->{$field}=$value;
- my $oldmask=umask(077);
- my $ret=Storable::lock_store($userdata, "$config{wikistatedir}/userdb");
- umask($oldmask);
- return $ret;
-} #}}}
-
-sub userinfo_setall ($$) { #{{{
- my $user=shift;
- my $info=shift;
-
- eval q{use Storable};
- my $userdata=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
- if (! defined $userdata || ! ref $userdata) {
- $userdata={};
- }
- $userdata->{$user}=$info;
- my $oldmask=umask(077);
- my $ret=Storable::lock_store($userdata, "$config{wikistatedir}/userdb");
- umask($oldmask);
- return $ret;
-} #}}}
-
-sub is_admin ($) { #{{{
- my $user_name=shift;
-
- return grep { $_ eq $user_name } @{$config{adminuser}};
-} #}}}
-
sub glob_match ($$) { #{{{
my $page=shift;
my $glob=shift;
loadindex();
require IkiWiki::Render;
rcs_update();
+ rcs_notify() if $config{notify};
rcs_getctime() if $config{getctime};
refresh();
saveindex();