From 0a513224e7774652cc8aa123b389b9a2ed45c26e Mon Sep 17 00:00:00 2001 From: ahollosi Date: Wed, 21 Jun 2000 22:57:17 +0000 Subject: [PATCH] adapted to new $pagehash structure ("refs" and "lastmodified") git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@84 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- wiki_config.php3 | 16 ++++++++++------ wiki_pageinfo.php3 | 8 ++++++-- wiki_savepage.php3 | 6 +++--- wiki_setupwiki.php3 | 6 +++--- wiki_stdlib.php3 | 24 ++++++++++-------------- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/wiki_config.php3 b/wiki_config.php3 index 90970bcb4..c1a36fd8c 100644 --- a/wiki_config.php3 +++ b/wiki_config.php3 @@ -1,4 +1,4 @@ - + ) // Comment out the lines above (for the DBM) if you use these -/* - include "wiki_mysql.php3"; + +/* include "wiki_mysql.php3"; $WikiDataBase = "wiki"; $ArchiveDataBase = "archive"; $mysql_server = 'localhost'; @@ -67,7 +67,14 @@ $SignatureImg = "$ServerAddress/signature.png"; $logo = "wikibase.png"; + // date & time formats used to display modification times, etc. + // formats are given as format strings to PHP date() function + $datetimeformat = "F j, Y"; // may contain time of day + $dateformat = "F j, Y"; // must not contain time + // allowed protocols for links - be careful not to allow "javscript:" + $AllowedProtocols = "http|https|mailto|ftp|news|gopher"; + // you shouldn't have to edit anyting below this line $ScriptUrl = $ServerAddress . $ScriptName; @@ -76,9 +83,6 @@ $FieldSeparator = "\263"; - // allowed protocols for links - be careful not to allow "javscript:" - $AllowedProtocols = "http|https|mailto|ftp|news|gopher"; - // Apache won't show REMOTE_HOST unless the admin configured it // properly. We'll be nice and see if it's there. empty($REMOTE_HOST) ? diff --git a/wiki_pageinfo.php3 b/wiki_pageinfo.php3 index 98d675c37..ad25e8179 100644 --- a/wiki_pageinfo.php3 +++ b/wiki_pageinfo.php3 @@ -1,4 +1,4 @@ - + \n"; while (list($key, $val) = each($pagehash)) { + if ($key > 0 || !$key) #key is an array index + continue; if ((gettype($val) == "array") && ($showpagesource == "on")) { $val = implode($val, "
\n"); } + if (($key == 'lastmodified') || ($key == 'created')) + $val = date($datetimeformat, $val); $table .= "$key$val\n"; } diff --git a/wiki_savepage.php3 b/wiki_savepage.php3 index 1ace1d45e..470f24e0d 100644 --- a/wiki_savepage.php3 +++ b/wiki_savepage.php3 @@ -1,4 +1,4 @@ - + Link [$i]: unknown protocol" . " - use one of $AllowedProtocols - link discarded.

\n"; diff --git a/wiki_setupwiki.php3 b/wiki_setupwiki.php3 index 0c7f1e181..43e90c364 100644 --- a/wiki_setupwiki.php3 +++ b/wiki_setupwiki.php3 @@ -1,13 +1,13 @@ - + +