summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-04-24 23:09:26 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-04-24 23:09:26 +0000
commit13e3bf867157226076fcc14a0d3875fd129a66c7 (patch)
tree173e406ad45bd94118d0400f7be91703be8cf0c7 /ikiwiki
parent698aeb20168b7e22a2ce3618a28fdee32ed4a417 (diff)
commit changes for email subscriptions
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki64
1 files changed, 9 insertions, 55 deletions
diff --git a/ikiwiki b/ikiwiki
index 6bf58017d..3cf2a7cb3 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -27,6 +27,7 @@ sub getconfig () { #{{{
default_pageext => ".mdwn",
cgi => 0,
svn => 1,
+ notify => 0,
url => '',
cgiurl => '',
historyurl => '',
@@ -39,12 +40,15 @@ sub getconfig () { #{{{
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};
@@ -61,10 +65,14 @@ sub getconfig () { #{{{
"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]/;
},
@@ -437,61 +445,6 @@ sub misctemplate ($$) { #{{{
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;
@@ -544,6 +497,7 @@ sub main () { #{{{
loadindex();
require IkiWiki::Render;
rcs_update();
+ rcs_notify() if $config{notify};
rcs_getctime() if $config{getctime};
refresh();
saveindex();