aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-26 23:29:19 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-26 23:29:19 +0000
commit01f41560e37c0a1182c70c2da23828a1ce06fd61 (patch)
treebc62781a5f5589df98c43d2aa98b8fb8273afac2
parent1fff84233c757d0143ebe25cd1dc606c40b74af9 (diff)
downloadikiwiki-01f41560e37c0a1182c70c2da23828a1ce06fd61.tar
ikiwiki-01f41560e37c0a1182c70c2da23828a1ce06fd61.tar.gz
* Fix sending of commit mails when new pages are added via the web.
-rw-r--r--IkiWiki/UserInfo.pm11
-rw-r--r--debian/changelog3
-rw-r--r--doc/bugs/no_commit_mails_for_new_pages.mdwn4
3 files changed, 10 insertions, 8 deletions
diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm
index ba6f3d3a9..d32f5c1bf 100644
--- a/IkiWiki/UserInfo.pm
+++ b/IkiWiki/UserInfo.pm
@@ -94,12 +94,8 @@ sub set_banned_users (@) { #{{{
sub commit_notify_list ($@) { #{{{
my $committer=shift;
-
- my @pages;
- foreach my $file (@_) {
- push @pages, grep { $pagesources{$_} eq $file } keys %pagesources;
- }
-
+ my @pages = map pagename($_), @_;
+
my @ret;
my $userinfo=userinfo_retrieve();
foreach my $user (keys %{$userinfo}) {
@@ -108,7 +104,8 @@ sub commit_notify_list ($@) { #{{{
length $userinfo->{$user}->{subscriptions} &&
exists $userinfo->{$user}->{email} &&
length $userinfo->{$user}->{email} &&
- grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") } @pages) {
+ grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") }
+ map pagename($_), @_) {
push @ret, $userinfo->{$user}->{email};
}
}
diff --git a/debian/changelog b/debian/changelog
index d0b481a34..b9dc7fae4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,8 +20,9 @@ ikiwiki (1.51) UNRELEASED; urgency=low
* Due to template changes and style sheet changes that depend on them,
wiki rebuilds are recommended on upgrade to this version.
* Avoid .svn directories when installing from svn checkout.
+ * Fix sending of commit mails when new pages are added via the web.
- -- Joey Hess <joeyh@debian.org> Thu, 26 Apr 2007 18:47:38 -0400
+ -- Joey Hess <joeyh@debian.org> Thu, 26 Apr 2007 19:27:42 -0400
ikiwiki (1.50) unstable; urgency=low
diff --git a/doc/bugs/no_commit_mails_for_new_pages.mdwn b/doc/bugs/no_commit_mails_for_new_pages.mdwn
index b65c8393a..3773a9455 100644
--- a/doc/bugs/no_commit_mails_for_new_pages.mdwn
+++ b/doc/bugs/no_commit_mails_for_new_pages.mdwn
@@ -4,3 +4,7 @@ the same page do result in commit mails.
(Granted, this could be almost considered a feature, if the new page is in
an rss feed..)
+
+Turned out to occur only for web commits that added a new file, since now
+the wiki does not rebuild during the commit hook in a web commit, it could
+not rely on `%pagesources` having the file. [[done]] --[[Joey]]