/[pub]/suikawiki/script/misc/plugins/WikiPageRename.wp2
Suika

Diff of /suikawiki/script/misc/plugins/WikiPageRename.wp2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Wed Mar 10 07:00:32 2004 UTC revision 1.2 by wakaba, Sun Apr 25 07:06:50 2004 UTC
# Line 42  ViewDefinition: Line 42  ViewDefinition:
42      @@@:      @@@:
43        my $wiki = $self->{view}->{wiki};        my $wiki = $self->{view}->{wiki};
44        $wiki->{var}->{db}->{read_only}->{'content'} = 0;        $wiki->{var}->{db}->{read_only}->{'content'} = 0;
45          $wiki->{var}->{db}->{read_only}->{'content_prop'} = 0;
46        $wiki->{var}->{db}->{read_only}->{'lastmodified'} = 0;        $wiki->{var}->{db}->{read_only}->{'lastmodified'} = 0;
47        $self->{view}->init_db;        $self->{view}->init_db;
48        my $from_page = $wiki->{var}->{page};        my $from_page = $wiki->{var}->{page};
# Line 55  ViewDefinition: Line 56  ViewDefinition:
56        }        }
57        my $check = 1;        my $check = 1;
58        try {        try {
59          for (qw/content lastmodified/) {          for (qw/content content_prop lastmodified/) {
60            $check = 0, last if $wiki->{db}->exist ($_ => $to_page);            $check = 0, last if $wiki->{db}->exist ($_ => $to_page);
61          }          }
62        } catch SuikaWiki::DB::Util::Error with {        } catch SuikaWiki::DB::Util::Error with {
# Line 70  ViewDefinition: Line 71  ViewDefinition:
71        }        }
72                
73        try {        try {
74          for (qw/content lastmodified/) {          for (qw/content content_prop lastmodified/) {
75            $wiki->{db}->set ($_ => $to_page            $wiki->{db}->set ($_ => $to_page
76                                 => $wiki->{db}->get ($_ => $from_page));                                 => $wiki->{db}->get ($_ => $from_page));
77          }          }
78          for (qw/content lastmodified/) {          for (qw/content content_prop lastmodified/) {
79            $wiki->{db}->delete ($_ => $from_page);            $wiki->{db}->delete ($_ => $from_page);
80          }          }
81        } catch SuikaWiki::DB::Util::Error with {        } catch SuikaWiki::DB::Util::Error with {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24