Changeset 1014 for trunk/wiki.cgi


Ignore:
Timestamp:
Apr 3, 2007, 1:02:45 AM (15 years ago)
Author:
kake
Message:

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

File:
1 edited

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(
Note: See TracChangeset for help on using the changeset viewer.