[Cpan-forum-commit] rev 256 - in trunk: . lib/CPAN lib/CPAN/Forum/DB lib/CPAN/Forum/RM templates
svn at pti.co.il
svn at pti.co.il
Thu Jul 19 17:05:00 EEST 2007
Author: gabor
Date: 2007-07-19 17:05:00 +0300 (Thu, 19 Jul 2007)
New Revision: 256
Modified:
trunk/
trunk/lib/CPAN/Forum.pm
trunk/lib/CPAN/Forum/DB/Groups.pm
trunk/lib/CPAN/Forum/RM/Update.pm
trunk/templates/notes.tmpl
Log:
On the notification page after updating the tags, add link back to the module
Allow passing paramters to the notification page
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4222
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
+ 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4223
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
Modified: trunk/lib/CPAN/Forum/DB/Groups.pm
===================================================================
--- trunk/lib/CPAN/Forum/DB/Groups.pm 2007-07-19 14:04:41 UTC (rev 255)
+++ trunk/lib/CPAN/Forum/DB/Groups.pm 2007-07-19 14:05:00 UTC (rev 256)
@@ -16,5 +16,14 @@
__PACKAGE__->set_sql(count => "SELECT count(*) FROM __TABLE__ WHERE %s = '%s'");
#use Data::Dumper;
#__PACKAGE__->add_trigger(before_update => sub {warn Dumper $_[0]});
+
+sub info {
+ my ($self, $group_id) = @_;
+ my $sql = "SELECT id, name, status
+ FROM groups
+ WHERE id=?";
+ return $self->_fetch_single_hashref($sql, $group_id);
+}
+
1;
Modified: trunk/lib/CPAN/Forum/RM/Update.pm
===================================================================
--- trunk/lib/CPAN/Forum/RM/Update.pm 2007-07-19 14:04:41 UTC (rev 255)
+++ trunk/lib/CPAN/Forum/RM/Update.pm 2007-07-19 14:05:00 UTC (rev 256)
@@ -20,6 +20,7 @@
my $q = $self->query;
my $group_id = $q->param('group_id');
+ my $group = CPAN::Forum::DB::Groups->info($group_id);
my $new_tags = $q->param('new_tags');
$self->log->debug("_update_tags in group '$group_id' tags='$new_tags'");
$new_tags =~ s/^\s+//;
@@ -43,7 +44,7 @@
CPAN::Forum::DB::Tags->remove_tag($uid, $group_id, $tags_hr->{$old_tag});
}
- return $self->notes('tags_updated');
+ return $self->notes('tags_updated', dist_name => $group->{name});
}
Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm 2007-07-19 14:04:41 UTC (rev 255)
+++ trunk/lib/CPAN/Forum.pm 2007-07-19 14:05:00 UTC (rev 256)
@@ -776,9 +776,10 @@
=cut
sub notes {
- my ($self, $msg) = @_;
+ my ($self, $msg, %params) = @_;
my $t = $self->load_tmpl("notes.tmpl");
$t->param($msg => 1);
+ $t->param(%params);
$t->output;
}
Modified: trunk/templates/notes.tmpl
===================================================================
--- trunk/templates/notes.tmpl 2007-07-19 14:04:41 UTC (rev 255)
+++ trunk/templates/notes.tmpl 2007-07-19 14:05:00 UTC (rev 256)
@@ -44,7 +44,7 @@
<TMPL_IF tags_updated>
<p>
-Tags were updated<br />
+Tags on <a href="/dist/<TMPL_VAR dist_name>"><TMPL_VAR dist_name></a> were updated<br />
See list of <a href="/tags/">all the tags</a><br />
</p>
</TMPL_IF>
More information about the Cpan-forum-commit
mailing list