[Cpan-forum-commit] rev 220 - in trunk: . lib/CPAN/Forum/RM templates
svn at pti.co.il
svn at pti.co.il
Thu Aug 31 14:30:12 IDT 2006
Author: gabor
Date: 2006-08-31 14:30:12 +0300 (Thu, 31 Aug 2006)
New Revision: 220
Modified:
trunk/
trunk/Changes
trunk/TODO
trunk/lib/CPAN/Forum/RM/Dist.pm
trunk/lib/CPAN/Forum/RM/Search.pm
trunk/templates/groups.tmpl
trunk/templates/search.tmpl
Log:
add link to /author/PAUSEID pages
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:11102
+ 8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:11107
Modified: trunk/Changes
===================================================================
--- trunk/Changes 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/Changes 2006-08-31 11:30:12 UTC (rev 220)
@@ -1,6 +1,11 @@
v0.12
+ Added /atom feed.
+ Added /rss/threads feed with the latest threads
+ Enable listing modules based on module author
+
+
Add /author/PAUSEID to show all posts related to modules maintained by
PAUSEID
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/TODO 2006-08-31 11:30:12 UTC (rev 220)
@@ -32,25 +32,19 @@
Make the data restrictions stricter in the schema (UNIQUE, NOT NULL)
- Enable listing modules based on module author
-
Provide the alerts in rss feed as well, not only in e-mail.
Let people subscribe to alerts but ask to have the RSS feed only, no e-mails.
/rss/user/username
-
Check if the database (and its parent directory) is writable by the process
and give appropriate error message if not.
BUG: If the directory of the database is not writable and logging was setup the
application fails.
-
Logging: enable logging based on a single client IP address
Include number of AnnoCPAN posts
- Provide atom feed
-
BUG:
When I try to reply and the original subject is already 50 chars long
in offers a new subject with Re: prefix but then when I try to submit
@@ -60,11 +54,8 @@
subject and press preview again
it returns the same error message as it put back the word where it was earlier.
-
- Clean up the listing of the subscribers at the bottom of the pages:
- Separate people who will receive all messages
- Thread starters
- And show names of people with "followup set" only within the threads they posted.
+ At the bottom of the pages add subscribers to specific threads
+ and thread started in separate listsings.
Script that populates database should not lock the whole database for a long time
Maybe it should fetch all the data to memory and work there.
Modified: trunk/lib/CPAN/Forum/RM/Dist.pm
===================================================================
--- trunk/lib/CPAN/Forum/RM/Dist.pm 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/lib/CPAN/Forum/RM/Dist.pm 2006-08-31 11:30:12 UTC (rev 220)
@@ -56,7 +56,8 @@
my $page = $q->param('page') || 1;
$self->_search_results($t, {where => {gid => $gid}, page => $page});
$self->_subscriptions($t, $gr);
- $t->output;
+ $t->param(pauseid_name => $gr->pauseid->pauseid);
+ return $t->output;
}
1;
Modified: trunk/lib/CPAN/Forum/RM/Search.pm
===================================================================
--- trunk/lib/CPAN/Forum/RM/Search.pm 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/lib/CPAN/Forum/RM/Search.pm 2006-08-31 11:30:12 UTC (rev 220)
@@ -99,51 +99,54 @@
$self->session->param(search_what => $what);
$self->session->param(search_name => $name);
- if ($what and $name) {
- if ($what eq "module" or $what eq "pauseid") {
- my $it;
- if ($what eq "module") {
- $it = CPAN::Forum::DB::Groups->search_like(name => '%' . $name . '%');
- } else {
- my ($author) = CPAN::Forum::DB::Authors->search(pauseid => uc $name);
- if ($author) {
- $it = CPAN::Forum::DB::Groups->search(pauseid => $author->id);
- }
+ if (not $what or not $name) {
+ $t->output;
+ }
+
+ if ($what eq "module" or $what eq "pauseid") {
+ my $it;
+ if ($what eq "module") {
+ $it = CPAN::Forum::DB::Groups->search_like(name => '%' . $name . '%');
+ } else {
+ my ($author) = CPAN::Forum::DB::Authors->search(pauseid => uc $name);
+ if ($author) {
+ $it = CPAN::Forum::DB::Groups->search(pauseid => $author->id);
+ }
+ $t->param(pauseid_name => uc $name)
+ }
+ my @things;
+ if ($it) {
+ while (my $group = $it->next) {
+ push @things, {name => $group->name};
}
- my @things;
- if ($it) {
- while (my $group = $it->next) {
- push @things, {name => $group->name};
- }
- }
- $any_result = 1 if @things;
- $t->param(groups => \@things);
- $t->param($what => 1);
- } elsif ($what eq "user") {
- my @things;
- my $it = CPAN::Forum::DB::Users->search_like(username => '%' . lc($name) . '%');
- while (my $user = $it->next) {
- push @things, {username => $user->username};
- }
- $any_result = 1 if @things;
- $t->param(users => \@things);
- $t->param($what => 1);
- } else {
- my %where;
- if ($what eq "subject") { %where = (subject => {'LIKE', '%' . $name . '%'}); }
- if ($what eq "text") { %where = (text => {'LIKE', '%' . $name . '%'}); }
- $self->log->debug("Search 1: " . join "|", %where);
- if (%where) {
+ }
+ $any_result = 1 if @things;
+ $t->param(groups => \@things);
+ $t->param($what => 1);
+ } elsif ($what eq "user") {
+ my @things;
+ my $it = CPAN::Forum::DB::Users->search_like(username => '%' . lc($name) . '%');
+ while (my $user = $it->next) {
+ push @things, {username => $user->username};
+ }
+ $any_result = 1 if @things;
+ $t->param(users => \@things);
+ $t->param($what => 1);
+ } else {
+ my %where;
+ if ($what eq "subject") { %where = (subject => {'LIKE', '%' . $name . '%'}); }
+ if ($what eq "text") { %where = (text => {'LIKE', '%' . $name . '%'}); }
+ $self->log->debug("Search 1: " . join "|", %where);
+ if (%where) {
- $self->log->debug("Search 2: " . join "|", %where);
+ $self->log->debug("Search 2: " . join "|", %where);
- my $page = $q->param('page') || 1;
- $any_result = $self->_search_results($t, {where => \%where, page => $page});
- $t->param($what => 1);
- }
+ my $page = $q->param('page') || 1;
+ $any_result = $self->_search_results($t, {where => \%where, page => $page});
+ $t->param($what => 1);
}
- $t->param(no_results => not $any_result);
}
+ $t->param(no_results => not $any_result);
$t->output;
}
Modified: trunk/templates/groups.tmpl
===================================================================
--- trunk/templates/groups.tmpl 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/templates/groups.tmpl 2006-08-31 11:30:12 UTC (rev 220)
@@ -7,6 +7,8 @@
<p>
This section of the site is for discussing the <b><TMPL_VAR group></b> CPAN distribution.
+<br />
+All the posts related to modules of <a href="/author/<TMPL_VAR pauseid_name>"><TMPL_VAR pauseid_name></a>.
</p>
<TMPL_IF messages>
<p>
Modified: trunk/templates/search.tmpl
===================================================================
--- trunk/templates/search.tmpl 2006-08-31 08:48:48 UTC (rev 219)
+++ trunk/templates/search.tmpl 2006-08-31 11:30:12 UTC (rev 220)
@@ -4,6 +4,13 @@
<TMPL_INCLUDE NAME="navigation.tmpl">
<TMPL_INCLUDE NAME="search_form.tmpl">
+<TMPL_IF pauseid_name>
+ <p>
+ All the posts related to modules of
+ <a href="/author/<TMPL_VAR pauseid_name>"><TMPL_VAR pauseid_name></a>.
+ </p>
+</TMPL_IF>
+
<TMPL_LOOP groups>
<a href="/dist/<TMPL_VAR name>"><TMPL_VAR name></a><br />
</TMPL_LOOP>
More information about the Cpan-forum-commit
mailing list