[PerlWikiBot] SF.net SVN: perlwikibot:[57] trunk/no-interwiki/prepare_noiw_list.pl
Status: Pre-Alpha
Brought to you by:
rotemliss
From: <am...@us...> - 2008-07-31 15:45:47
|
Revision: 57 http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=57&view=rev Author: amire80 Date: 2008-07-31 15:45:53 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Exclude portal subpages. Modified Paths: -------------- trunk/no-interwiki/prepare_noiw_list.pl Modified: trunk/no-interwiki/prepare_noiw_list.pl =================================================================== --- trunk/no-interwiki/prepare_noiw_list.pl 2008-07-31 11:16:45 UTC (rev 56) +++ trunk/no-interwiki/prepare_noiw_list.pl 2008-07-31 15:45:53 UTC (rev 57) @@ -368,13 +368,21 @@ my $namespace = namespace($page); $namespace_count{$namespace}++; + my $page_title = $page->title(); + # Skipping cases: next PAGE - if (is_redirect($page) - or not is_in_namespace($page, @INCLUDE_NAMESPACES)); + if ( + is_redirect($page) + or not is_in_namespace($page, @INCLUDE_NAMESPACES) - INFO("\n* processing $page_counter - ", $page->title()); + # Portal pages which have a '/' in their name are probably + # internal and do not need interwiki links. + or (is_in_namespace($page, 'Portal') and $page_title =~ m{/}xms) + ); + INFO("\n* processing $page_counter - ", $page_title); + my $page_text_ref = $page->text(); # A simple sanity check: is the no_iw template anywhere around here? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |