--- usemod-wiki-1.0.orig/debian/control +++ usemod-wiki-1.0/debian/control @@ -0,0 +1,24 @@ +Source: usemod-wiki +Section: web +Priority: optional +Maintainer: Christoph Berg +Build-Depends: debhelper (>> 4) +Build-Depends-Indep: sharutils +Standards-Version: 3.6.2 + +Package: usemod-wiki +Architecture: all +Depends: apache | httpd, perl5 +Suggests: exim4 | mail-transport-agent +Description: Perl-based Wiki clone + UseMod is a reimplementation/clone of the original Wiki concept + created by Ward Cunningham. A "wiki" is a website that is + collaboratively edited by its users, including the ability to alter + text written by other users. + . + UseMod provides common wiki features as well as unique features: + recent changes, conflict resolution, difference links, subpages, + interwiki links, full text searching, free links (for free-form wiki + names), administrative features. + . + http://www.usemod.com/cgi-bin/wiki.pl?UseModWiki --- usemod-wiki-1.0.orig/debian/links +++ usemod-wiki-1.0/debian/links @@ -0,0 +1 @@ +usr/share/usemod-wiki/images var/www/usemod-wiki --- usemod-wiki-1.0.orig/debian/postinst +++ usemod-wiki-1.0/debian/postinst @@ -0,0 +1,77 @@ +#! /bin/sh +# postinst script for usemod-wiki +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + + # Fixup the var/usr thing + # Version number has to be adjusted correctly: + if test -n "$2" && dpkg --compare-versions "$2" "<<" "0.92-1.1" ; then + if [ -d /var/lib/usemod-wiki/page/ ] ; then + echo "You already have a usemod-wiki at /var/lib/usemod-wiki" + echo "I will not touch that" + exit 1 + fi + if [ -d /usr/share/usemod-wiki ] ; then + mv /usr/share/usemod-wiki/* /var/lib/usemod-wiki/ + rmdir /usr/share/usemod-wiki + echo "Moved database to /var/lib/usemod-wiki/"; + fi + fi + if test -n "$2" && dpkg --compare-versions "$2" "<<" "0.92-2.1" ; then + chown -R www-data.www-data /var/lib/usemod-wiki + fi + if test -n "$2" && dpkg --compare-versions "$2" le-nl "1.0-3" ; then + if test -d /var/www/usemod-wiki ; then + rmdir /var/www/usemod-wiki + ln -s /usr/share/usemod-wiki/images /var/www/usemod-wiki + echo "Linked /var/www/usemod-wiki to /usr/share/usemod-wiki/images" + fi + fi + + if test ! -f /var/lib/usemod-wiki/page/H/HomePage.db ; then + mkdir -p /var/lib/usemod-wiki/page/H + cp /usr/share/doc/usemod-wiki/examples/HomePage.db /var/lib/usemod-wiki/page/H + chown -R www-data.www-data /var/lib/usemod-wiki + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- usemod-wiki-1.0.orig/debian/compat +++ usemod-wiki-1.0/debian/compat @@ -0,0 +1 @@ +4 --- usemod-wiki-1.0.orig/debian/postrm +++ usemod-wiki-1.0/debian/postrm @@ -0,0 +1,41 @@ +#! /bin/sh +# postrm script for usemod-wiki +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -Rf /var/lib/usemod-wiki/ + + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- usemod-wiki-1.0.orig/debian/changelog +++ usemod-wiki-1.0/debian/changelog @@ -0,0 +1,92 @@ +usemod-wiki (1.0-7) unstable; urgency=low + + * Enable $NewFS = 1 (Closes: #326009). + * Bump Standards-Version. + * Update FSF address. + + -- Christoph Berg Thu, 6 Oct 2005 23:17:43 +0200 + +usemod-wiki (1.0-6) unstable; urgency=high + + * Sanitize output, we are vulnerable to XSS in CAN-2004-1397 + (Closes: #295515). + + -- Christoph Berg Wed, 16 Feb 2005 16:36:43 +0100 + +usemod-wiki (1.0-5) unstable; urgency=low + + * Yet another fix for unresolvable hostnames, thanks to Hugo Mills for the + patch (Closes: #281258). + * Allow to block only unregistered users from unresolvable hosts, also due + to Hugo Mills (Closes: #281095). + * Watch file. + + -- Christoph Berg Sun, 14 Nov 2004 23:38:27 +0100 + +usemod-wiki (1.0-4) unstable; urgency=low + + * Move images to /usr/share/usemod-wiki/images (Closes: #227928). + * Improve test for unresolvable hostnames. + * Update HomePage.db. + * Update README.Debian. + * Move prerm to postrm. + + -- Christoph Berg Tue, 12 Oct 2004 16:13:57 +0200 + +usemod-wiki (1.0-3) unstable; urgency=low + + * Added patch to enable blocking of unresolvable hostnames. + + -- Christoph Berg Mon, 20 Sep 2004 15:48:43 +0200 + +usemod-wiki (1.0-2) unstable; urgency=low + + * Added BodyOnly feature for usage inside templates. + * Include Debian version in action=version output. + * umask 0002 in misc/wiki-wrapper.pl. + * Added README.Debian. + * Upgraded to debhelper 4. + * Bumped standards version. + + -- Christoph Berg Wed, 28 Jul 2004 02:07:04 +0200 + +usemod-wiki (1.0-1) unstable; urgency=low + + * New maintainer. (Closes: #223781) + * New upstream release. (Closes: #211445) + * Bumped standards version. + * Removed unused /usr/share/usemod-wiki. + * Removed some perl warnings, still to many left to run with perl -w. + * Added $DataDir to default config file. + * Changed default charset from undefined to utf-8. + * Merged intermap from 0.92 and added MuttWiki. + * Provide wrapper for running multiple instances. (Needs more testing before + #235917 can be closed.) + + -- Christoph Berg Sat, 29 May 2004 12:10:00 +0200 + +usemod-wiki (0.92-3) unstable; urgency=low + + * Fix wrong path in postinst (Closes: #153100) + + -- Benjamin Drieu Tue, 30 Jul 2002 16:10:28 +0200 + +usemod-wiki (0.92-2) unstable; urgency=low + + * Remove debian-logo.png on clean + * Define new variable $ConfigFile to hold the location of config file + * Spelling error in homepage + * Migrate writable files from /usr to /var/lib/usemod-wiki (Closes: #149475) + * Many thanks to David Schmitt for his patches + + -- Benjamin Drieu Tue, 21 May 2002 19:01:35 +0200 + +usemod-wiki (0.92-1) unstable; urgency=low + + * Initial Release. (Closes: #142264) + + -- Benjamin Drieu Thu, 18 Apr 2002 15:36:06 +0200 + +Local variables: +mode: debian-changelog +End: --- usemod-wiki-1.0.orig/debian/docs +++ usemod-wiki-1.0/debian/docs @@ -0,0 +1,3 @@ +README +UPGRADE +debian/NEWS.Debian --- usemod-wiki-1.0.orig/debian/rules +++ usemod-wiki-1.0/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +VERSION=$(shell dpkg-parsechangelog 2>&1|egrep ^Version|cut -d " " -f 2) +D=$(CURDIR)/debian/usemod-wiki + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: configure-stamp + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp + rm -f debian/debian-logo.png debian/wiki.pl + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + sed -e 's/\(Debian version \).* debian/wiki.pl + install -m 755 -o www-data -g www-data -D debian/wiki.pl $D/usr/lib/cgi-bin/wiki.pl + install -m 644 -o www-data -g www-data -D wiki.gif $D/usr/share/usemod-wiki/images/wiki.gif + uudecode debian/debian-logo.uue -o debian/debian-logo.png + install -m 644 -o www-data -g www-data -D debian/debian-logo.png $D/usr/share/usemod-wiki/images/debian-logo.png + dh_link + install -m 644 -D config $D/etc/usemod-wiki/config + install -m 644 -D intermap $D/etc/usemod-wiki/intermap + dh_installexamples + install -m 755 misc/umtrans.pl $D/usr/share/usemod-wiki + chown www-data.www-data $D/var/lib/usemod-wiki + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + + +binary: binary-indep +.PHONY: build clean binary-indep binary install configure --- usemod-wiki-1.0.orig/debian/NEWS.Debian +++ usemod-wiki-1.0/debian/NEWS.Debian @@ -0,0 +1,10 @@ +usemod-wiki (1.0-7) unstable; urgency=low + + * This version enables the NewFS option in the default config. This changes + the binary format of the wiki files on disk, please run the conversion with + ?action=convert. Log in as wiki admin (set AdminPass) and visit + http://localhost/cgi-bin/wiki.pl?action=convert to update the files. After + that, remove /var/lib/usemod-wiki/noedit to enable editing again. + + -- Christoph Berg Thu, 6 Oct 2005 23:16:16 +0200 + --- usemod-wiki-1.0.orig/debian/dirs +++ usemod-wiki-1.0/debian/dirs @@ -0,0 +1,4 @@ +usr/lib/cgi-bin +usr/share/doc/usemod-wiki/examples +usr/share/usemod-wiki/images +var/lib/usemod-wiki --- usemod-wiki-1.0.orig/debian/watch +++ usemod-wiki-1.0/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.usemod.com/wikicode/usemod(..).* 10 --- usemod-wiki-1.0.orig/debian/copyright +++ usemod-wiki-1.0/debian/copyright @@ -0,0 +1,38 @@ +This package is maintained by Christoph Berg . + +This package was debianized by Benjamin Drieu on +Thu, 18 Apr 2002 15:36:06 +0200. + +It was downloaded from http://www.usemod.com/wikicode/ + +Upstream Author: Clifford A. Adams + +Copyright: + +Copyright (C) 2000-2003 Clifford A. Adams +Copyright (C) 2002-2003 Sunir Shah + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; + if not, write to the Free Software Foundation, Inc., 51 Franklin St, + Fifth Floor, Boston, MA 02110-1301, USA. + + +Based on the GPLed AtisWiki 0.3 (C) 1998 Markus Denker + +...which was based on + the LGPLed CVWiki CVS-patches (C) 1997 Peter Merel + and The Original WikiWikiWeb (C) Ward Cunningham + (code reused with permission) +Email and ThinLine options by Jim Mahoney + --- usemod-wiki-1.0.orig/debian/HomePage.db +++ usemod-wiki-1.0/debian/HomePage.db @@ -0,0 +1,53 @@ +ts³11097590923³1version³13³1cache_oldmajor³10³1cache_oldauthor³10³1cache_diff_default_author³11³1revision³11³1tscreate³11097590923³1text_default³1ip³2127.0.0.1³2ts³21097590923³2version³21³2name³2text_default³2data³2summary³3New HomePage³3text³3= Welcome to your new wiki in the cyberspace! = + +This UseModWiki, a very functional wiki implementation. + +Changes made for the Debian version: +* The config files are located in /etc/usemod-wiki. +* HTML is disabled by default. +* The UseMod logo has been replaced with the Debian logo. +* "unknown" in the banned list blocks unresolvable hostnames. + +Have fun! + +== How to start? == + +Click on the Edit text of this page link below, then you can +add content to this page and add wiki links. Alternatively, you can +click on the following link (question mark) to create a SandBox page +and play with it. + +== More information == + +* See Wiki:NewUserPages for more information on the wiki concept. +* See UseMod:UseModWiki for more information on usemod. +* See UseMod:UseModWiki/Install for more information on how to configure your wiki. +* See UseMod:TextFormattingRules for more information on how to write content. +³3newauthor³31³3minor³30³2username³2³2host³2localhost³2revision³21³2tscreate³21097590923³2id³2111³1cache_diff_default_major³11³1cache_diff_default_minor³11c1,25 +< Describe the new page here. +--- +> = Welcome to your new wiki in the cyberspace! = +> +> This UseModWiki, a very functional wiki implementation. +> +> Changes made for the Debian version: +> * The config files are located in /etc/usemod-wiki. +> * HTML is disabled by default. +> * The UseMod logo has been replaced with the Debian logo. +> * "unknown" in the banned list blocks unresolvable hostnames. +> +> Have fun! +> +> == How to start? == +> +> Click on the Edit text of this page link below, then you can +> add content to this page and add wiki links. Alternatively, you can +> click on the following link (question mark) to create a SandBox page +> and play with it. +> +> == More information == +> +> * See Wiki:NewUserPages for more information on the wiki concept. +> * See UseMod:UseModWiki for more information on usemod. +> * See UseMod:UseModWiki/Install for more information on how to configure your wiki. +> * See UseMod:TextFormattingRules for more information on how to write content. --- usemod-wiki-1.0.orig/debian/debian-logo.uue +++ usemod-wiki-1.0/debian/debian-logo.uue @@ -0,0 +1,33 @@ +begin 644 debian-logo.png +MB5!.1PT*&@H````-24A$4@```$L```!<"`,````10[C[````8U!,5$7___\` +M``#'`#9_?W]`0$"_O[_+$$/JG[/QO\WC?YK[[_+50&CTS]D0$!#XW^;MK\`@ +M("#FCZ?.($_@<(Y@8&"?GY_2,%S<8(+,S,S?W]^/CX_O[^]P<'#94'504%`S +M,S.OKZ_;6<;(`````6)+1T0`B`4=2`````EP2%ES```+$@``"Q(!TMU^_``` +M``=T24U%!](!`A8&&K?8=X$```1/241!5'B<[9C;HK(J$(`Q#%34U,H\5/;^ +M3[EG!CRF@:WN]C\7E3A\#',28\PB42[/,E(R3FV:-HEO!Y*B5*(\QW\@!>HP +MET*R./J&E"Y)1H+=M%2*=118=]J'BFHHCS(K$6AX%#D44ONGDJVD4.+2*\,WS +M9;&FARSAP)H-Q,OF\MACEU@,++88#'H._E*+@=6J@[94?L&:[]$X$XI(V$H[ +M7+HAG[-S0X;BSAU8\RH#)T_32\E>3;'=+*CUZ9RT7^`0Q+;3!;`>\Q%U,`D6 +MJD=O88Y:UNX%=3;/S?0L>N^GDV)4?7)\$+1^9KN2^;(9PT#I\G2,EVTB4+=P +M]F`-"WL+-_+VK)*A@&T6VK2(^MO#\="DWEHADP6>2<0C#!_8P*TY.LAYY;D7 +MJZ+H3SA*NI_DJ`&\98XL;_($CR)K[.8BWKLT2IK?E#KO/$O3P62U_^T7.IF4 +M?S[,:U&NYR$'"78?;C\(I>./6.G:D>);R7]H&+G?VIX4'G +MF!WO*7:8^LN[YPR&/MO9%S:%7HI^5)?T&B5LAV5GH7U:7U4<)0J%PWN/,TV6 +M\,+VJQC`NS$\@6Z_\ML_^2?_7XEVMMGKXKJJ1U2Y\O?`EM3\DOB3Z_9Z[[SC +MB%K]KV%+,L^;LMC3\T;6R?V_)93+@O6:LO#)M./QRSWO/KT^SEA,[GF2`XLO +M6?66\K;4#>?\8E@5_&YJS8+0[S0)ZI>S1JO)TV]MB/J[AD!5OND7\F5 +M5@![^@^4]D70'5$O&.K"3C9'2-W@16XUT`68?C7F-8=453?%K]:`SRQV3*C,^)9?*`_&[L;L+JTPCC +M2/Z>L!J\Z%!W8&$@1[O8.@N&^-$;97IC8`V!Y"/K^1T+`]'=T:X)BV^SFJ.6 +MV0T]H3;>YA]8S90UU."$9>((6="9C%QG)3I<>OE)W@TL^N9FH_=!=8T%-Y*V +MSXUN$OHQ/Q(VL/!NO>G[1N<1)K/?7^"$RK"T$3T+BJ?M=*:OY$2;4+%XQ&KQ +MN^/'YI*AZHM53UU5Q*I(*?%T"WZ]L\@B+&#:2]67K__JDR.K]$8\IML&K$6S +M^0J+O<#H[,5A19C5 +3/BYU51!KL0````!)14Y$KD)@@@`` +` +end --- usemod-wiki-1.0.orig/debian/README.Debian +++ usemod-wiki-1.0/debian/README.Debian @@ -0,0 +1,54 @@ += Debian README for the usemod-wiki package = + +== Using multiple wiki instances == + +This package includes a wrapper script [1] that can be used to run multiple +usemod wiki instances in parallel without the need to edit the main wiki.pl +script. + +[1] /usr/share/doc/usemod-wiki/examples/wiki-wrapper.pl + +== UseModWiki and mod_perl == + +UseModWiki is currently not mod_perl clean. Using the provided wiki.pl as a +perl module and running multiple wiki instances will break as the configs +interfere. In the same line, the wiki-wrapper.pl script will break (at least) +the RSS feed with mod_perl. It is probably possible to convert wiki.pl to a +UseModWiki.pm that can run a single wiki instance, but this package does not +attempt to. Use Apache's cgi-script handler. + +== Charset and Language == + +Up to version 0.92, this package did not specify a charset for the wiki pages, +which resulted in a us-ascii (depending on the client, latin1) default. The +config file in /etc/usemod-wiki/ now specifies utf-8. The charset conversion +script skeleton [2] can be used to convert legacy pages. + +[2] /usr/share/doc/usemod-wiki/examples/convert-charset.sh + +As of version 1.0-7, the NewFS setting has been activated to enable non-ascii +utf-8 characters. Please run ?action=convert when upgrading from an older +version. + +The umtrans.pl script [3] can be used to translate the wiki messages to other +languages. + +[3] /usr/share/usemod-wiki/umtrans.pl + +== Patches == + +=== BodyOnly === + +If you set $BodyOnly = 1, the program will only output the HTML that is inside +the tag in normal use. This can be used with SSI statements like the +following to embed the wiki in a custom layout template: + + + +=== Unresolvable IP addresses === + +Using the special "unknown" token in the banned list will block all edits from +unresolvable IP addresses. + + -- Christoph Berg Thu, 6 Oct 2005 22:52:04 +0200 + --- usemod-wiki-1.0.orig/debian/examples +++ usemod-wiki-1.0/debian/examples @@ -0,0 +1,3 @@ +misc/convert-charset.sh +misc/wiki-wrapper.pl +debian/HomePage.db --- usemod-wiki-1.0.orig/misc/convert-charset.sh +++ usemod-wiki-1.0/misc/convert-charset.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# (c) 2004 Christoph Berg , GNU GPL. +# This script is loosely based on a suggestion by Peter Gervai. +# cb 2004-05-29: first version. + +# Use this script to convert the .db files in your wiki if you are switching to +# a different charset. +# +# Note: the usemod wiki data format uses \263 as internal separator. If this +# character appears on your pages, it will not be converted. + +SEP=263 # octal 179 (three superior in latin1) +TMPSEP=001 +OLDENC=iso-8859-1 +NEWENC=utf-8 + +# Use this script at you own risk! The remaining part is commented out to +# prevent accidental data loss. + +# use this section to convert a single page +#[ -f "$1" ] || exit 1 +#tr "\\$SEP" "\\$TMPSEP" < "$1" | \ +# iconv -f $OLDENC -t $NEWENC | \ +# tr "\\$TMPSEP" "\\$SEP" > "$1.new" + +# use the next section to convert all pages +#[ "$1" ] && cd "$1" +#[ -d page ] || exit 1 # make sure this is a wiki root +#find page keep -name "*.db" \ +# -exec sh -c "cat {} | tr '\\$SEP' '\\$TMPSEP' | \ +# iconv -f $OLDENC -t $NEWENC | \ +# tr '\\$TMPSEP' '\\$SEP' > {}.new" \; --- usemod-wiki-1.0.orig/misc/wiki-wrapper.pl +++ usemod-wiki-1.0/misc/wiki-wrapper.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl +# (c) 2004 Christoph Berg +# This script is free software covered by the GNU GPL. +# cb 2004-05-29: initial version. +# cb 2004-07-10: added umask. + +# Wrapper to call usemod wiki. If you want to use more than one wiki instance, +# you can copy (and rename) this script and adjust $ConfigFile below. + +# NOTE: Do not use this wrapper with mod_perl! It will throw lots of warnings +# and probably break. + +# Load usemod wiki. +local $_ = "nocgi"; +do "/usr/lib/cgi-bin/wiki.pl"; + +# If the config file is in the same directory as this file, you can just give +# the file name here, as Apache chdirs here while serving the request. +local $UseModWiki::ConfigFile; +$UseModWiki::ConfigFile = "config"; + +# If your config file does not include $DataDir, define it here. +#local $UseModWiki::DataDir; +#$UseModWiki::DataDir = "/var/lib/usemod-wiki"; + +# Make created files and directories group-writable. Useful if your webserver +# runs under a different uid than your files. +umask 0002; + +# Call wiki. +UseModWiki::DoWikiRequest(); --- usemod-wiki-1.0.orig/intermap +++ usemod-wiki-1.0/intermap @@ -1,10 +1,51 @@ +AcadWiki http://xarch.tu-graz.ac.at/autocad/wiki/ Acronym http://www.acronymfinder.com/af-query.asp?String=exact&Acronym= +Advogato http://www.advogato.org/ +AndStuff http://andstuff.org/wiki.php? +BenefitsWiki http://www.benefitslink.com/cgi-bin/wiki.cgi? +BridgesWiki http://c2.com/w2/bridges/ +C2find http://c2.com/cgi/wiki?FindPage&value= +CLiki http://www.telent.net/cliki/ Cache http://www.google.com/search?q=cache: +CmWiki http://www.ourpla.net/cgi-bin/wiki.pl? +CreationMatters http://www.ourpla.net/cgi-bin/wiki.pl? +DejaNews http://www.deja.com/=dnc/getdoc.xp?AN= Dictionary http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query= +Dictionary http://www.dictionary.com/cgi-bin/dict.pl?term= +DolphinWiki http://www.object-arts.com/wiki/html/Dolphin/ +EfnetCppWiki http://purl.net/wiki/cpp/ +EfnetPythonWiki http://purl.net/wiki/python/ +EfnetXmlWiki http://purl.net/wiki/xml/ +FoxWiki http://fox.wikis.com/wc.dll?Wiki~ Google http://www.google.com/search?q= GoogleGroups http://groups.google.com/groups?q= +HammondWiki http://www.dairiki.org/HammondWiki/index.php3? IMDB http://us.imdb.com/Title? JargonFile http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect= +JiniWiki http://www.cdegroot.com/cgi-bin/jini? +LegoWiki http://www.object-arts.com/wiki/html/Lego-Robotics/ +MbTest http://www.usemod.com/cgi-bin/mbtest.pl? +MeatBall http://www.usemod.com/cgi-bin/mb.pl? +MetaWiki http://sunir.org/apps/meta.pl? +MoinMoin http://purl.net/wiki/moin/ +MuttWiki http://wiki.mutt.org/index.cgi? +MuWeb http://www.dunstable.com/scripts/MuWebWeb? +OrgPatterns http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns? +PPR http://c2.com/cgi/wiki? +PhpWiki http://phpwiki.sourceforge.net/phpwiki/index.php3? +PolitizenWiki http://www.politizen.com/wiki.asp? +PyWiki http://www.voght.com/cgi-bin/pywiki? +PythonInfo http://www.python.org/cgi-bin/moinmoin/ +SeattleWireless http://seattlewireless.net/? +SenseisLibrary http://senseis.xmp.net/? +SourceForge http://sourceforge.net/ +Squeak http://minnow.cc.gatech.edu/squeak/ +StrikiWiki http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl? +TWiki http://twiki.sourceforge.net/cgi-bin/view/ +Tavi http://tavi.sourceforge.net/index.php? UseMod http://www.usemod.com/cgi-bin/wiki.pl? +VisualWorks http://wiki.cs.uiuc.edu/VisualWorks/ +Why http://clublet.com/c/c/why? Wiki http://c2.com/cgi/wiki? WikiPedia http://www.wikipedia.org/wiki/ +ZWiki http://www.zwiki.org/ --- usemod-wiki-1.0.orig/config +++ usemod-wiki-1.0/config @@ -1,11 +1,12 @@ # == Configuration ======================================================= # Original version from UseModWiki 1.0 +$DataDir = "/var/lib/usemod-wiki"; # Main wiki directory $CookieName = "Wiki"; # Name for this wiki (for multi-wiki sites) $SiteName = "Wiki"; # Name of site (used for titles) $HomePage = "HomePage"; # Home page (change space to _) $RCName = "RecentChanges"; # Name of changes page (change space to _) -$LogoUrl = "/wiki.gif"; # URL for site logo ("" for no logo) +$LogoUrl = "/usemod-wiki/debian-logo.png"; # URL for site logo ("" for no logo) $ENV{PATH} = "/usr/bin/"; # Path used to find "diff" $ScriptTZ = ""; # Local time zone ("" means do not print) $RcDefault = 30; # Default number of RecentChanges days @@ -24,7 +25,7 @@ $EditNote = ""; # HTML notice above buttons on edit page $MaxPost = 1024 * 210; # Maximum 210K posts (about 200K for pages) $NewText = ""; # New page text ("" for default message) -$HttpCharset = ""; # Charset for pages, like "iso-8859-2" +$HttpCharset = "utf-8"; # Charset for pages, like "iso-8859-2" $UserGotoBar = ""; # HTML added to end of goto bar $InterWikiMoniker = ''; # InterWiki moniker for this wiki. (for RSS) $SiteDescription = $SiteName; # Description of this wiki. (for RSS) @@ -61,8 +62,9 @@ $ReplaceFile = 'ReplaceFile'; # 0 = disable, 'PageName' = indicator tag @ReplaceableFiles = (); # List of allowed server files to replace $TableSyntax = 1; # 1 = wiki syntax tables, 0 = no table syntax -$NewFS = 0; # 1 = new multibyte $FS, 0 = old $FS +$NewFS = 1; # 1 = new multibyte $FS, 0 = old $FS $UseUpload = 0; # 1 = allow uploads, 0 = no uploads +$BodyOnly = 0; # 1 = output body for template 0 = full HTML output # Minor options: $LogoLeft = 0; # 1 = logo on left, 0 = logo on right @@ -71,16 +73,16 @@ $KeepMajor = 1; # 1 = keep major rev, 0 = expire all revisions $KeepAuthor = 1; # 1 = keep author rev, 0 = expire all revisions $ShowEdits = 0; # 1 = show minor edits, 0 = hide edits by default -$HtmlLinks = 0; # 1 = allow A HREF links, 0 = no raw HTML links +$HtmlLinks = 1; # 1 = allow A HREF links, 0 = no raw HTML links $SimpleLinks = 0; # 1 = only letters, 0 = allow _ and numbers -$NonEnglish = 0; # 1 = extra link chars, 0 = only A-Za-z chars +$NonEnglish = 1; # 1 = extra link chars, 0 = only A-Za-z chars $ThinLine = 0; # 1 = fancy
tags, 0 = classic wiki
$BracketText = 1; # 1 = allow [URL text], 0 = no link descriptions -$UseAmPm = 1; # 1 = use am/pm in times, 0 = use 24-hour times +$UseAmPm = 0; # 1 = use am/pm in times, 0 = use 24-hour times $UseIndex = 0; # 1 = use index file, 0 = slow/reliable method $UseHeadings = 1; # 1 = allow = h1 text =, 0 = no header formatting $NetworkFile = 1; # 1 = allow remote file:, 0 = no file:// links -$BracketWiki = 0; # 1 = [WikiLnk txt] link, 0 = no local descriptions +$BracketWiki = 1; # 1 = [WikiLnk txt] link, 0 = no local descriptions $UseLookup = 1; # 1 = lookup host names, 0 = skip lookup (IP only) $FreeUpper = 1; # 1 = force upper case, 0 = do not force case $FastGlob = 1; # 1 = new faster code, 0 = old compatible code @@ -134,7 +136,7 @@ $KeepDir = "$DataDir/keep"; # Stores kept (old) page data $TempDir = "$DataDir/temp"; # Temporary files and locks $LockDir = "$TempDir/lock"; # DB is locked if this exists -$InterFile = "$DataDir/intermap"; # Interwiki site->url map +$InterFile = "/etc/usemod-wiki/intermap"; # Interwiki site->url map $RcFile = "$DataDir/rclog"; # New RecentChanges logfile $RcOldFile = "$DataDir/oldrclog"; # Old RecentChanges logfile $IndexFile = "$DataDir/pageidx"; # List of all pages --- usemod-wiki-1.0.orig/wiki.pl +++ usemod-wiki-1.0/wiki.pl @@ -9,6 +9,7 @@ # and The Original WikiWikiWeb (C) Ward Cunningham # (code reused with permission) # Email and ThinLine options by Jim Mahoney +# BodyOnly option by Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -53,7 +54,7 @@ @IsbnNames @IsbnPre @IsbnPost $EmailFile $FavIcon $RssDays $UserHeader $UserBody $StartUID $ParseParas $AuthorFooter $UseUpload $AllUpload $UploadDir $UploadUrl $LimitFileUrl $MaintTrimRc $SearchButton - $EditNameLink $UseMetaWiki @ImageSites $BracketImg ); + $EditNameLink $UseMetaWiki @ImageSites $BracketImg $BodyOnly ); # Note: $NotifyDefault is kept because it was a config variable in 0.90 # Other global variables: use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl @@ -65,11 +66,11 @@ $ConfigError $UploadPattern ); # == Configuration ===================================================== -$DataDir = "/tmp/mywikidb"; # Main wiki directory $UseConfig = 1; # 1 = use config file, 0 = do not look for config -$ConfigFile = "$DataDir/config"; # Configuration file +$ConfigFile = "/etc/usemod-wiki/config"; # Default location of config # Default configuration (used if UseConfig is 0) +$DataDir = "/var/lib/usemod-wiki"; # Main wiki directory $CookieName = "Wiki"; # Name for this wiki (for multi-wiki sites) $SiteName = "Wiki"; # Name of site (used for titles) $HomePage = "HomePage"; # Home page (change space to _) @@ -93,7 +94,7 @@ $EditNote = ""; # HTML notice above buttons on edit page $MaxPost = 1024 * 210; # Maximum 210K posts (about 200K for pages) $NewText = ""; # New page text ("" for default message) -$HttpCharset = ""; # Charset for pages, like "iso-8859-2" +$HttpCharset = "utf-8"; # Charset for pages, like "iso-8859-2" $UserGotoBar = ""; # HTML added to end of goto bar $InterWikiMoniker = ''; # InterWiki moniker for this wiki. (for RSS) $SiteDescription = $SiteName; # Description of this wiki. (for RSS) @@ -130,7 +131,7 @@ $ReplaceFile = 'ReplaceFile'; # 0 = disable, 'PageName' = indicator tag @ReplaceableFiles = (); # List of allowed server files to replace $TableSyntax = 1; # 1 = wiki syntax tables, 0 = no table syntax -$NewFS = 0; # 1 = new multibyte $FS, 0 = old $FS +$NewFS = 1; # 1 = new multibyte $FS, 0 = old $FS $UseUpload = 0; # 1 = allow uploads, 0 = no uploads # Minor options: @@ -175,6 +176,7 @@ $EditNameLink = 0; # 1 = edit links use name (CSS), 0 = '?' links $UseMetaWiki = 0; # 1 = add MetaWiki search links, 0 = no MW links $BracketImg = 1; # 1 = [url url.gif] becomes image link, 0 = no img +$BodyOnly = 0; # 1 = output body for template 0 = full HTML output # Names of sites. (The first entry is used for the number link.) @IsbnNames = ('bn.com', 'amazon.com', 'search'); @@ -374,18 +376,31 @@ } sub Ts { - my ($text, $string) = @_; + my ($text, $string, $noquote) = @_; + unless($noquote) { + $string =~ s/&/&/g; + $string =~ s//>/g; + } $text = T($text); $text =~ s/\%s/$string/; return $text; } sub Tss { - my $text = @_[0]; + my $text = $_[0]; + my @args = @_; + @args = map { + my $a = $_; + $a =~ s/&/&/g; + $a =~ s//>/g; + $a; + } @args; $text = T($text); - $text =~ s/\%([1-9])/$_[$1]/ge; + $text =~ s/\%([1-9])/$args[$1]/ge; return $text; } @@ -1053,7 +1068,7 @@ $minor = '' . T('(edit)') . ' ' if ($revtext{'minor'}); $expirets = $Now - ($KeepDays * 24 * 60 * 60); if ($UseDiff) { - my ($c1, $c2); + my ($c1, $c2) = ("", ""); $c1 = 'checked="checked"' if 1 == $row; $c2 = 'checked="checked"' if 0 == $row; $html .= "h3('(' . Ts('redirected from %s', - &GetEditLink($oldId, $oldId)) . ')'); + &GetEditLink($oldId, $oldId), 1) . ')'); } if ((!$embed) && ($LogoUrl ne "")) { $logoImage = "img src=\"$LogoUrl\" alt=\"$altText\" border=0"; @@ -1322,6 +1337,8 @@ my ($type) = @_; my $cookie; + return "" if $BodyOnly; + $type = 'text/html' if ($type eq ''); if (defined($SetCookie{'id'})) { $cookie = "$CookieName=" @@ -1345,6 +1362,8 @@ my ($title) = @_; my ($dtd, $html, $bodyExtra, $stylesheet); + return "" if $BodyOnly; # omit header + $html = ''; $dtd = '-//IETF//DTD HTML//EN'; $html = qq(\n); @@ -1419,7 +1438,7 @@ $result .= ' ' . &TimeToText($Section{ts}); if ($AuthorFooter) { $result .= ' ' . Ts('by %s', &GetAuthorLink($Section{'host'}, - $Section{'username'}, $Section{'id'})); + $Section{'username'}, $Section{'id'}), 1); } } if ($UseDiff) { @@ -1456,11 +1475,13 @@ if ($FooterNote ne '') { $html .= T($FooterNote); } - $html .= '' . $q->end_html; + $html .= ''; + $html .= $q->end_html unless $BodyOnly; return $html; } sub GetMinimumFooter { + return "" if $BodyOnly; return $q->end_html; } @@ -1591,6 +1612,7 @@ pop @HeadingNumbers; $TableOfContents .= "\n\n"; } + $TableOfContents ||= ""; $pageText =~ s/<toc>/$TableOfContents/gi; if ($LateRules ne '') { $pageText = &EvalLocalRules($LateRules, $pageText, 0); @@ -2081,7 +2103,7 @@ ($punct) = ($url =~ /([^a-zA-Z0-9\/\xc0-\xff]+)$/); $url =~ s/([^a-zA-Z0-9\/\xc0-\xff]+)$//; } - return ($url, $punct); + return ($url, $punct || ""); } sub StripUrlPunct { @@ -2693,6 +2715,11 @@ $host = &GetRemoteHost(0); foreach (split(/\n/, $data)) { next if ((/^\s*$/) || (/^#/)); # Skip empty, spaces, or comments + if ($_ eq "unknown") { return 1 if ($host =~ /^[\d.]+$/); next; } # Ban unknown hosts + if ($_ eq "unknown+unregistered") { # Check whether the user is registered + return 1 if ($host =~ /^[\d.]+$/ and &GetParam('username','') eq ''); + next; + } return 1 if ($ip =~ /$_/i); return 1 if ($host =~ /$_/i); } @@ -3276,7 +3303,7 @@ print ' (', T('Your user name is'), ' ', &GetPageLink($userName) . ') '; } else { - print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink()), ') '; + print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink(), 1), ') '; } print $q->submit(-name=>'Preview', -value=>T('Preview')), "\n"; if ($isConflict) { @@ -4416,7 +4443,10 @@ "# blocks exact IP address
", "^123\\.21\\.3\\.9\$
", "# blocks whole 123.21.3.* IP network
", - "^123\\.21\\.3\\.\\d+\$

"; + "^123\\.21\\.3\\.\\d+\$
", + "# the special token 'unknown' blocks all unresolvable addresses
", + "# using 'unknown+unregistered' blocks unregistered users only
", + "unknown

"; print &GetTextArea('banlist', $banList, 12, 50); print "
", $q->submit(-name=>'Save'), "\n"; print "


\n"; @@ -4829,6 +4859,7 @@ sub DoShowVersion { print &GetHeader("", "Displaying Wiki Version", ""); print "

UseModWiki version 1.0

\n"; + print "

Debian version

\n"; print &GetCommonFooter(); }