Changeset 349

Show
Ignore:
Timestamp:
05/08/04 14:45:32 (5 years ago)
Author:
ivorw
Message:

Diff change - use CGI::Wiki::Plugin::Diff not OpenGuides::Diff

Location:
trunk
Files:
1 removed
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r348 r349  
    5050        Removed newlines from output of search box macro. 
    5151 
     52        Implemented the diffing using CGI::Wiki::Plugin::Diff. (seems change 
     53        in 0.30 was lost). Removed OpenGuides::Diff.pm as we should not be 
     54        distributing it. 
     55 
    52560.30    29 December 2003 
    5357        Added method to allow admins to delete nodes.  You will need to 
  • trunk/MANIFEST

    r312 r349  
    1212lib/OpenGuides/Build.pm 
    1313lib/OpenGuides/CGI.pm 
    14 lib/OpenGuides/Diff.pm 
    1514lib/OpenGuides/RDF.pm 
    1615lib/OpenGuides/SuperSearch.pm 
  • trunk/t/51_diff.t

    r269 r349  
    33use OpenGuides::Utils; 
    44use Test::MockObject; 
    5 use Test::More tests => 6; 
    6  
     5#use Test::More tests => 6; 
     6use Test::More skip_all => "Tests for diff are in CGI::Wiki::Plugin::Diff"; 
    77use_ok( "OpenGuides::Diff" ); 
    88 
  • trunk/wiki.cgi

    r336 r349  
    1414use CGI::Wiki::Plugin::GeoCache; 
    1515use CGI::Wiki::Plugin::Locator::UK; 
     16use CGI::Wiki::Plugin::Diff; 
    1617use Config::Tiny; 
    1718use Geography::NationalGrid; 
     
    2021use OpenGuides::RDF; 
    2122use OpenGuides::Utils; 
    22 use OpenGuides::Diff; 
    2323use OpenGuides::Template; 
    2424use Time::Piece; 
     
    3737$script_url .= "/" unless $script_url =~ /\/$/; 
    3838 
    39 my ($wiki, $formatter, $locator, $q); 
     39my ($wiki, $formatter, $locator, $q, $differ); 
    4040eval { 
    4141    $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); 
     
    4343    $locator = CGI::Wiki::Plugin::Locator::UK->new; 
    4444    $wiki->register_plugin( plugin => $locator ); 
     45 
     46    $differ = CGI::Wiki::Plugin::Diff->new; 
     47    $wiki->register_plugin( plugin => $differ ); 
    4548 
    4649    # Get CGI object, find out what to do. 
     
    134137            my $other_ver = $q->param("diffversion"); 
    135138            if ( $other_ver ) { 
    136                 my %diff_vars = OpenGuides::Diff->formatted_diff_vars( 
    137                     wiki     => $wiki, 
    138                     node     => $node, 
    139                     versions => [ $version, $other_ver ] 
     139                my %diff_vars = $differ->differences( 
     140                    node          => $node, 
     141                    left_version  => $version,  
     142                    right_version => $other_ver  
    140143                ); 
    141144                print OpenGuides::Template->output(