Changeset 1014 for trunk/wiki.cgi

Show
Ignore:
Timestamp:
04/03/07 01:02:45 (20 months ago)
Author:
kake
Message:

Move random page functionality from wiki.cgi into OpenGuides.pm and add some tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wiki.cgi

    r991 r1014  
    8686                          ); 
    8787    } elsif ($action eq 'random') { 
    88         my @nodes = $wiki->list_all_nodes(); 
    89         $node = $nodes[int(rand(scalar(@nodes) + 1)) + 1]; 
    90         print $guide->redirect_to_node($node); 
     88        print $guide->display_random_page; 
    9189    } elsif ($action eq 'find_within_distance') { 
    9290        $guide->find_within_distance(