Openguides-commits Archive

List Statistics

  • Total Threads: 159
  • Total Posts: 9

Phrases Used to Find This Thread

  #1  
04-06-2012 09:18 PM
Openguides-commits member admin is online now
User
 

Author: kake
Date: 2012-06-04 21:18:13 +0100 (Mon, 04 Jun 2012)
New Revision: 1412

Modified:
trunk/Changes
trunk/lib/OpenGuides.pm
trunk/t/701_missing_metadata.t
Log:
The output of the "show_missing_metadata" action is now alphabetised.

Modified: trunk/Changes
===================================================================
--- trunk/Changes 2012-05-23 20:11:33 UTC (rev 1411)
+++ trunk/Changes 2012-06-04 20:18:13 UTC (rev 1412)
@@ -4,8 +4,8 @@
.

0.69 ?
+ The output of the "show_missing_metadata" action is now alphabetised.

-
0.68 21 May 2012
Made sure that maps are centred and zoomed properly even when they only
contain one point.

Modified: trunk/lib/OpenGuides.pm
===================================================================
--- trunk/lib/OpenGuides.pm 2012-05-23 20:11:33 UTC (rev 1411)
+++ trunk/lib/OpenGuides.pm 2012-06-04 20:18:13 UTC (rev 1412)
@@ -2279,7 +2279,7 @@

# Build nice edit etc links for our nodes
my @tt_nodes;
- for my $node (@nodes) {
+ for my $node (sort @nodes) {
my %n;

# Make the URLs

Modified: trunk/t/701_missing_metadata.t
===================================================================
--- trunk/t/701_missing_metadata.t 2012-05-23 20:11:33 UTC (rev 1411)
+++ trunk/t/701_missing_metadata.t 2012-06-04 20:18:13 UTC (rev 1412)
@@ -11,8 +11,8 @@
plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)";
}

-plan tests => 26;
- OpenGuides::Test::refresh_db();
+plan tests => 27;
+OpenGuides::Test::refresh_db();

my $config = OpenGuides::Test->make_basic_config;
$config->script_name( "wiki.cgi" );
@@ -22,8 +22,6 @@
my $wiki = $guide->wiki;
isa_ok( $wiki, "Wiki::Toolkit" );

-
-
# Add four different pages, one of which with two versions, one of which
# a redirect. The redirect should not show up on any "missing metadata"
# searches, regardless of the condition of the page it points to.
@@ -96,6 +94,11 @@
is( $nodes[2]->{'name'}, "Test Page", "Right nodes" );
is( $nodes[3]->{'name'}, "Test Page 3", "Right nodes" );

+# Make sure they're returned in alphabetical order.
+my @nodenames = map { $_->{name} } @{$ttvars{nodes}};
+is_deeply( \@nodenames,
+ [ "Category Foo", "Locale Bar", "Test Page", "Test Page 3" ],
+ "Nodes are returned in alphabetical order" );

# Try again, but exclude locale and category
%ttvars = eval {


_______________________________________________
openguides-commits mailing list
openguides-
http://urchin.earth.li/mailman/listinfo/openguides-commits
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: