* Add -refresh option to ikiwiki-mass-rebuild and use that on upgrades that
do not need a full rebuild, in order to update any basewiki pages.master
parent
0cc3b43530
commit
c20c406631
|
@ -291,13 +291,13 @@ sub cgi_editpage ($$) { #{{{
|
||||||
|
|
||||||
eval q{use CGI::FormBuilder};
|
eval q{use CGI::FormBuilder};
|
||||||
my $form = CGI::FormBuilder->new(
|
my $form = CGI::FormBuilder->new(
|
||||||
fields => [qw(do rcsinfo subpage from page content comments)],
|
fields => [qw(do rcsinfo subpage from page editcontent comments)],
|
||||||
header => 1,
|
header => 1,
|
||||||
method => 'POST',
|
method => 'POST',
|
||||||
validate => {
|
validate => {
|
||||||
content => '/.+/',
|
editcontent => '/.+/',
|
||||||
},
|
},
|
||||||
required => [qw{content}],
|
required => [qw{editcontent}],
|
||||||
javascript => 0,
|
javascript => 0,
|
||||||
params => $q,
|
params => $q,
|
||||||
action => $config{cgiurl},
|
action => $config{cgiurl},
|
||||||
|
@ -330,7 +330,7 @@ sub cgi_editpage ($$) { #{{{
|
||||||
$form->field(name => "subpage", type => 'hidden');
|
$form->field(name => "subpage", type => 'hidden');
|
||||||
$form->field(name => "page", value => "$page", force => 1);
|
$form->field(name => "page", value => "$page", force => 1);
|
||||||
$form->field(name => "comments", type => "text", size => 80);
|
$form->field(name => "comments", type => "text", size => 80);
|
||||||
$form->field(name => "content", type => "textarea", rows => 20,
|
$form->field(name => "editcontent", type => "textarea", rows => 20,
|
||||||
cols => 80);
|
cols => 80);
|
||||||
$form->tmpl_param("can_commit", $config{rcs});
|
$form->tmpl_param("can_commit", $config{rcs});
|
||||||
$form->tmpl_param("indexlink", indexlink());
|
$form->tmpl_param("indexlink", indexlink());
|
||||||
|
@ -351,7 +351,7 @@ sub cgi_editpage ($$) { #{{{
|
||||||
require IkiWiki::Render;
|
require IkiWiki::Render;
|
||||||
$form->tmpl_param("page_preview",
|
$form->tmpl_param("page_preview",
|
||||||
htmlize($config{default_pageext},
|
htmlize($config{default_pageext},
|
||||||
linkify($page, $page, $form->field('content'))));
|
linkify($page, $page, $form->field('editcontent'))));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$form->tmpl_param("page_preview", "");
|
$form->tmpl_param("page_preview", "");
|
||||||
|
@ -410,14 +410,14 @@ sub cgi_editpage ($$) { #{{{
|
||||||
}
|
}
|
||||||
elsif ($form->field("do") eq "edit") {
|
elsif ($form->field("do") eq "edit") {
|
||||||
page_locked($page, $session);
|
page_locked($page, $session);
|
||||||
if (! defined $form->field('content') ||
|
if (! defined $form->field('editcontent') ||
|
||||||
! length $form->field('content')) {
|
! length $form->field('editcontent')) {
|
||||||
my $content="";
|
my $content="";
|
||||||
if (exists $pagesources{lc($page)}) {
|
if (exists $pagesources{lc($page)}) {
|
||||||
$content=readfile(srcfile($pagesources{lc($page)}));
|
$content=readfile(srcfile($pagesources{lc($page)}));
|
||||||
$content=~s/\n/\r\n/g;
|
$content=~s/\n/\r\n/g;
|
||||||
}
|
}
|
||||||
$form->field(name => "content", value => $content,
|
$form->field(name => "editcontent", value => $content,
|
||||||
force => 1);
|
force => 1);
|
||||||
}
|
}
|
||||||
$form->tmpl_param("page_select", 0);
|
$form->tmpl_param("page_select", 0);
|
||||||
|
@ -431,7 +431,7 @@ sub cgi_editpage ($$) { #{{{
|
||||||
# save page
|
# save page
|
||||||
page_locked($page, $session);
|
page_locked($page, $session);
|
||||||
|
|
||||||
my $content=$form->field('content');
|
my $content=$form->field('editcontent');
|
||||||
$content=~s/\r\n/\n/g;
|
$content=~s/\r\n/\n/g;
|
||||||
$content=~s/\r/\n/g;
|
$content=~s/\r/\n/g;
|
||||||
writefile($file, $config{srcdir}, $content);
|
writefile($file, $config{srcdir}, $content);
|
||||||
|
@ -463,7 +463,7 @@ sub cgi_editpage ($$) { #{{{
|
||||||
$form->field(name => "rcsinfo", value => rcs_prepedit($file),
|
$form->field(name => "rcsinfo", value => rcs_prepedit($file),
|
||||||
force => 1);
|
force => 1);
|
||||||
$form->tmpl_param("page_conflict", 1);
|
$form->tmpl_param("page_conflict", 1);
|
||||||
$form->field("content", value => $conflict, force => 1);
|
$form->field("editcontent", value => $conflict, force => 1);
|
||||||
$form->field("do", "edit)");
|
$form->field("do", "edit)");
|
||||||
$form->tmpl_param("page_select", 0);
|
$form->tmpl_param("page_select", 0);
|
||||||
$form->field(name => "page", type => 'hidden');
|
$form->field(name => "page", type => 'hidden');
|
||||||
|
|
|
@ -22,7 +22,7 @@ extra_build:
|
||||||
|
|
||||||
extra_clean:
|
extra_clean:
|
||||||
rm -rf html doc/.ikiwiki
|
rm -rf html doc/.ikiwiki
|
||||||
rm -f ikiwiki.man
|
rm -f ikiwiki.man ikiwiki-mass-rebuild.man
|
||||||
|
|
||||||
extra_install:
|
extra_install:
|
||||||
install -d $(PREFIX)/share/ikiwiki/templates
|
install -d $(PREFIX)/share/ikiwiki/templates
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
border-bottom: 1px solid #000;
|
border-bottom: 1px solid #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content textarea {
|
#editcontent {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,10 @@ ikiwiki (1.4) UNRELEASED; urgency=low
|
||||||
(This was slightly complex to do as the link still has to be constructed
|
(This was slightly complex to do as the link still has to be constructed
|
||||||
relative to the inlining page.)
|
relative to the inlining page.)
|
||||||
* Make page edit textarea resize to fit browser window.
|
* Make page edit textarea resize to fit browser window.
|
||||||
|
* Add -refresh option to ikiwiki-mass-rebuild and use that on upgrades that
|
||||||
|
do not need a full rebuild, in order to update any basewiki pages.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 27 May 2006 14:28:19 -0400
|
-- Joey Hess <joeyh@debian.org> Sat, 27 May 2006 15:01:52 -0400
|
||||||
|
|
||||||
ikiwiki (1.3) unstable; urgency=low
|
ikiwiki (1.3) unstable; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,6 @@ firstcompat=1.4
|
||||||
if [ "$1" = configure ] && \
|
if [ "$1" = configure ] && \
|
||||||
dpkg --compare-versions "$2" lt "$firstcompat"; then
|
dpkg --compare-versions "$2" lt "$firstcompat"; then
|
||||||
ikiwiki-mass-rebuild
|
ikiwiki-mass-rebuild
|
||||||
|
else
|
||||||
|
ikiwiki-mass-rebuild -refresh
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,6 +14,13 @@ on a system. You will need to list the wikis it shuld build in the file
|
||||||
|
|
||||||
user /path/to/wiki
|
user /path/to/wiki
|
||||||
|
|
||||||
|
# OPTIONS
|
||||||
|
|
||||||
|
* -refresh
|
||||||
|
|
||||||
|
Rather than rebuilding all the wikis, just build any changed pages
|
||||||
|
(including pages inherited from the basewiki).
|
||||||
|
|
||||||
# AUTHOR
|
# AUTHOR
|
||||||
|
|
||||||
Joey Hess <joey@kitenet.net>
|
Joey Hess <joey@kitenet.net>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
action=""
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
action="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
wikilist=/etc/ikiwiki/wikilist
|
wikilist=/etc/ikiwiki/wikilist
|
||||||
|
|
||||||
processline () {
|
processline () {
|
||||||
|
@ -15,8 +20,8 @@ processline () {
|
||||||
if [ ! -f "$setup" ]; then
|
if [ ! -f "$setup" ]; then
|
||||||
echo "warning: $setup specified in /etc/ikiwiki/wikilist does not exist, skipping" >&2
|
echo "warning: $setup specified in /etc/ikiwiki/wikilist does not exist, skipping" >&2
|
||||||
else
|
else
|
||||||
echo "Rebuilding $setup as user $user ..."
|
echo "Processing $setup as user $user ..."
|
||||||
su "$user" -c "ikiwiki -setup $setup"
|
su "$user" -c "ikiwiki -setup $setup $action"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,12 @@ confict and commit again to save your changes.
|
||||||
<TMPL_VAR FIELD-FROM>
|
<TMPL_VAR FIELD-FROM>
|
||||||
<TMPL_VAR FIELD-RCSINFO>
|
<TMPL_VAR FIELD-RCSINFO>
|
||||||
<TMPL_IF NAME="PAGE_SELECT">
|
<TMPL_IF NAME="PAGE_SELECT">
|
||||||
Page location: <TMPL_VAR FIELD-PAGE><br />
|
Page location: <TMPL_VAR FIELD-PAGE>
|
||||||
<TMPL_ELSE>
|
<TMPL_ELSE>
|
||||||
|
<br />
|
||||||
<TMPL_VAR FIELD-PAGE>
|
<TMPL_VAR FIELD-PAGE>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
<TMPL_VAR FIELD-CONTENT><br />
|
<TMPL_VAR FIELD-EDITCONTENT><br />
|
||||||
<TMPL_IF NAME="CAN_COMMIT">
|
<TMPL_IF NAME="CAN_COMMIT">
|
||||||
Optional comment about this change:<br />
|
Optional comment about this change:<br />
|
||||||
<TMPL_VAR FIELD-COMMENTS><br />
|
<TMPL_VAR FIELD-COMMENTS><br />
|
||||||
|
|
Loading…
Reference in New Issue