35 Commits

Author SHA1 Message Date
Aki Goto
25aa740c2a fix for using with FastCGI servers 2022-09-22 11:14:33 +09:00
Markus Lude
14c06ba45d some preparations for 1.2.1: bump version 2017-12-01 08:25:46 +01:00
Markus Lude
f008b5c0fd cleanup generated HTML code on history page
in DoHistory():
remove unneccessary <tr>

in GetHistoryLine():
close <td>
2017-11-18 01:30:09 +01:00
Markus Lude
ba421c2d6a RSS: fall back to LogoUrl for RssLogoUrl 2017-11-18 00:42:01 +01:00
Markus Lude
291d474327 fix EditHash
in DoPost():
actually check the hash
2017-11-16 08:12:10 +01:00
Markus Lude
4a7553ced4 in GetFooterText():
dont call GetMinimumFooter(), no nested Footer functions
use end_html instead
2017-11-15 19:24:19 +01:00
Markus Lude
acf20ddadd * put <hr> class wikilinerc inside of div for class wikirc 2017-11-15 19:19:12 +01:00
Markus Lude
21ebc21f8e closing div for class wikibody was missing at some places
added </div>
2017-11-15 08:40:39 +01:00
Markus Lude
1d521cdc40 use GetIP() at all relevant places 2017-11-05 21:16:56 +01:00
Markus Lude
2ad2e04c33 some preparations for 1.2.0: bump version 2017-11-05 19:11:55 +01:00
Markus Lude
380be5160c in DoPost():
better use same constant here as in DoEditPrefs()
2017-11-05 18:20:38 +01:00
Markus Lude
ee1e6b9b65 use variable without "" 2017-11-05 16:40:46 +01:00
Markus Lude
b1a6c615cf in InitCookie():
use return value of LoadUserData()
2017-11-05 14:35:34 +01:00
Markus Lude
182fbdd079 in DoLogin():
use return value of LoadUserData()
2017-11-05 14:31:40 +01:00
Markus Lude
d00245b234 in LoadUserData():
add check if uid is too small
return 1 if loading was successful, 0 otherwize
2017-11-05 14:24:19 +01:00
Markus Lude
ba3686996f in InitCookie():
add parameter uid
use parameter uid for check and call of LoadUserData()
2017-11-05 12:39:23 +01:00
Markus Lude
eda0a5ee5a in LoadUserData():
add parameter uid
use parameter uid instead of global variable UserID
2017-11-05 12:29:13 +01:00
Markus Lude
026a769e0a in GetHtmlHeader():
replace "/" with ", " in keywords for subpages
2017-11-05 12:16:47 +01:00
Markus Lude
070ff2c704 use three-argument form of open 2017-11-02 23:56:08 +01:00
Markus Lude
8e3f7824eb no space between function name and left bracket 2017-11-02 23:51:13 +01:00
Markus Lude
d71a118d19 add EditHash 2017-11-02 23:46:12 +01:00
Markus Lude
f14d05103c in GetRemoteHost():
show IP address instead of faked DNS entry on RecentChanges

RecentChanges showed host names which dont make sense like localhost
or all IP addresses in a netblock resolve to the same host name.
The real IP address is lost then (apart from web server logs)

check if REMOTE_ADDR address resolves to a host name
resolve that host name to an IP address
if both ip addresses are the same, then host name is ok to use
2017-11-02 23:40:06 +01:00
Markus Lude
3aa96dd404 fix WikiBugs/CallingKeepFileName
reported by JuanmaMP
2017-11-02 23:36:57 +01:00
Markus Lude
44e500ae44 in KeepFileName():
add parameter name
use $name instead of $OpenPageName

add parameter (= $OpenPageName) to all calls of KeepFileName()
2017-11-02 23:33:34 +01:00
Markus Lude
70488b0c98 added CSS class wikibody to include all except wikiheader and wikifooter
suggested by UngarPeter on ProposalFor1.1
2017-11-02 23:30:33 +01:00
Markus Lude
2950d9a81c re-order entries
first action, then method
2017-11-02 23:24:49 +01:00
Markus Lude
de4e395c6c move favicon related markup 2017-11-02 23:20:14 +01:00
Markus Lude
2883da1bf9 fix markup: close <dd> tags 2017-11-02 23:18:59 +01:00
Markus Lude
c99cad8cc9 fix markup: close <dt> tags 2017-11-02 23:10:41 +01:00
Markus Lude
08687dd8d8 cleanup generated HTML code
use "" around class values
add value to noshade
2017-11-02 23:08:32 +01:00
Markus Lude
418b667f28 add \n after closing div tag 2017-11-02 22:29:25 +01:00
Markus Lude
f94bebe31e removed self closing from tag (<.../>), xml style but we use html 2017-11-02 22:26:16 +01:00
Markus Lude
3a46d68d6f combine splitted /pre tags 2017-11-02 22:23:01 +01:00
Markus Lude
f6c8f13015 use lowercase html tags and attributs 2017-11-02 22:22:23 +01:00
Markus Lude
2214a8175a switch DTD to HTML 4.0.1 Transitional 2017-11-02 22:00:16 +01:00
3 changed files with 324 additions and 184 deletions

View File

@@ -1,4 +1,21 @@
Changes for bugfix release 1.2.1 (December 01, 2017):
* closing div for class wikibody was missing at some places, added
* put <hr> class wikilinerc inside of div for class wikirc
* fix EditHash
* RSS: fall back to LogoUrl for RssLogoUrl
* cleanup generated HTML code on history page
Changes for release 1.2.0 (November 05, 2017):
* switch DTD to HTML 4.0.1 Transitional
* cleanup generated HTML code
* added CSS class wikibody to include all except wikiheader and wikifooter
suggested by UngarPeter
* fixed bug CallingKeepFileName
with suggestion from JuanMtnezPineda
* show IP address instead of faked DNS entry on RecentChanges
* add EditHash
Changes for release 1.1.0 (October 31, 2017):
* enable warnings (perl -w)
* fix warnings

11
config
View File

@@ -1,5 +1,5 @@
# == Configuration =====================================================
# Original version from UseModWiki 1.1.0
# Original version from UseModWiki 1.2.1
$CookieName = "Wiki"; # Name for this wiki (for multi-wiki sites)
$SiteName = "Wiki"; # Name of site (used for titles)
@@ -11,7 +11,7 @@ $ScriptTZ = ""; # Local time zone ("" means do not print)
$RcDefault = 30; # Default number of RecentChanges days
@RcDays = qw(1 3 7 30 90); # Days for links on RecentChanges
$KeepDays = 14; # Days to keep old revisions
$SiteBase = ""; # Full URL for <BASE> header
$SiteBase = ""; # Full URL for <base> header
$FullUrl = ""; # Set if the auto-detected URL is wrong
$RedirType = 1; # 1 = CGI.pm, 2 = script, 3 = no redirect
$AdminPass = ""; # Set to non-blank to enable password(s)
@@ -38,17 +38,19 @@ $DiffColor2 = '#cfffcf'; # Background color of new/added text
$FavIcon = ''; # URL of bookmark/favorites icon, or ''
$RssDays = 7; # Default number of days in RSS feed
$UserHeader = ''; # Optional HTML header additional content
$UserBody = ''; # Optional <BODY> tag additional content
$UserBody = ''; # Optional <body> tag additional content
$StartUID = 1001; # Starting number for user IDs
$UploadDir = ''; # Full path (like /foo/www/uploads) for files
$UploadUrl = ''; # Full URL (like http://foo.com/uploads)
@ImageSites = qw(); # Url prefixes of good image sites: ()=all
$Salt = 'pepper'; # Salt for generating an EditHash,
# please choose something other here!
# Major options:
$UseSubpage = 1; # 1 = use subpages, 0 = do not use subpages
$UseCache = 0; # 1 = cache HTML pages, 0 = generate every page
$EditAllowed = 1; # 1 = editing allowed, 0 = read-only
$RawHtml = 0; # 1 = allow <HTML> tag, 0 = no raw HTML in pages
$RawHtml = 0; # 1 = allow <html> tag, 0 = no raw HTML in pages
$HtmlTags = 0; # 1 = "unsafe" HTML tags, 0 = only minimal tags
$UseDiff = 1; # 1 = use diff features, 0 = do not use diff
$FreeLinks = 1; # 1 = use [[word]] links, 0 = LinkPattern only
@@ -63,6 +65,7 @@ $ReplaceFile = 'ReplaceFile'; # 0 = disable, 'PageName' = indicator tag
$TableSyntax = 1; # 1 = wiki syntax tables, 0 = no table syntax
$NewFS = 0; # 1 = new multibyte $FS, 0 = old $FS
$UseUpload = 0; # 1 = allow uploads, 0 = no uploads
$UseEditHash = 0; # 1 = use EditHash, 0 = no EditHash
# Minor options:
$LogoLeft = 0; # 1 = logo on left, 0 = logo on right

480
wiki.pl

File diff suppressed because it is too large Load Diff