SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: <ru...@us...> - 2009年01月07日 08:54:25
Revision: 6372
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6372&view=rev
Author: rurban
Date: 2009年01月07日 08:54:19 +0000 (2009年1月07日)
Log Message:
-----------
Support include=empty for backups to overwrite with deleted pages
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年01月06日 20:07:13 UTC (rev 6371)
+++ trunk/lib/loadsave.php	2009年01月07日 08:54:19 UTC (rev 6372)
@@ -225,8 +225,11 @@
 $zipname = WIKI_NAME . _("LatestSnapshot") . date('Ymd-Hi') . '.zip';
 $include_archive = false;
 }
+ $include_empty = false;
+ if ($request->getArg('include') == 'empty') {
+	$include_empty = true;
+ }
 
-
 $zip = new ZipWriter("Created by PhpWiki " . PHPWIKI_VERSION, $zipname);
 
 /* ignore fatals in plugins */
@@ -316,12 +319,16 @@
 } else {
 $excludeList = array();
 }
+ $include_empty = false;
+ if ($request->getArg('include') == 'empty') {
+	$include_empty = true;
+ }
 if ($pages = $request->getArg('pages')) { // which pagenames
 if ($pages == '[]') // current page
 $pages = $thispage;
 $page_iter = new WikiDB_Array_PageIterator(explodePageList($pages));
 } else {
- $page_iter = $dbi->getAllPages(false,false,false,$excludeList);
+ $page_iter = $dbi->getAllPages($include_empty,false,false,$excludeList);
 }
 
 $request_args = $request->args;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年01月30日 13:06:38
Revision: 6462
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6462&view=rev
Author: vargenau
Date: 2009年01月30日 13:06:32 +0000 (2009年1月30日)
Log Message:
-----------
Valid XHTML code
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年01月28日 10:09:28 UTC (rev 6461)
+++ trunk/lib/loadsave.php	2009年01月30日 13:06:32 UTC (rev 6462)
@@ -3,6 +3,7 @@
 
 /*
 Copyright 1999,2000,2001,2002,2004,2005,2006,2007 $ThePhpWikiProgrammingTeam
+ Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent
 
 This file is part of PhpWiki.
 
@@ -1058,7 +1059,7 @@
 // action=revert (by diff)
 function RevertPage (&$request)
 {
- $mesg = HTML::p();
+ $mesg = HTML::div();
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
 if (!$version) {
@@ -1092,9 +1093,7 @@
 return;
 }
 if (!$request->getArg('verify')) {
- $mesg->pushContent(HTML::br(),
- _("Are you sure?"),
- HTML::br(),
+ $mesg->pushContent(HTML::p(_("Are you sure?")),
 HTML::form(array('action' => $request->getPostURL(),
 'method' => 'post'),
 HiddenInputs($request->getArgs(), false, array('verify')),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年02月16日 15:58:30
Revision: 6507
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6507&view=rev
Author: vargenau
Date: 2009年02月16日 15:58:24 +0000 (2009年2月16日)
Log Message:
-----------
Valid XHTML code
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年02月16日 15:16:52 UTC (rev 6506)
+++ trunk/lib/loadsave.php	2009年02月16日 15:58:24 UTC (rev 6507)
@@ -1120,6 +1120,7 @@
 $new = $page->save($content, $currversion + 1, $versiondata);
 $dbi->touch();
 
+ $mesg = HTML::span();
 $pagelink = WikiLink($pagename);
 $mesg->pushContent(fmt("Revert: %s", $pagelink), 
 fmt("- version %d saved to database as version %d",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年02月24日 17:09:17
Revision: 6555
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6555&view=rev
Author: vargenau
Date: 2009年02月24日 17:09:14 +0000 (2009年2月24日)
Log Message:
-----------
Valid XHTML
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年02月24日 17:01:59 UTC (rev 6554)
+++ trunk/lib/loadsave.php	2009年02月24日 17:09:14 UTC (rev 6555)
@@ -3,7 +3,7 @@
 
 /*
 Copyright 1999,2000,2001,2002,2004,2005,2006,2007 $ThePhpWikiProgrammingTeam
- Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent
+ Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent
 
 This file is part of PhpWiki.
 
@@ -1472,9 +1472,7 @@
 	HTML(dirname($source),
 dirname($source) ? "/" : "",
 WikiLink($page,'auto'))));
- echo "<dl>\n";
 LoadAny($request, $source);
- echo "</dl>\n";
 EndLoadDump($request);
 }
 
@@ -1556,10 +1554,8 @@
 if (!$upload)
 $request->finish(_("No uploaded file to upload?")); // FIXME: more concise message
 
-
 // Dump http headers.
 StartLoadDump($request, sprintf(_("Uploading %s"), $upload->getName()));
- echo "<dl>\n";
 
 $fd = $upload->open();
 if (IsZipFile($fd))
@@ -1567,7 +1563,6 @@
 else
 LoadFile($request, $upload->getName(), $upload->getContents());
 
- echo "</dl>\n";
 EndLoadDump($request);
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年02月27日 12:20:12
Revision: 6595
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6595&view=rev
Author: vargenau
Date: 2009年02月27日 12:20:08 +0000 (2009年2月27日)
Log Message:
-----------
More mandatory pages
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年02月27日 10:18:23 UTC (rev 6594)
+++ trunk/lib/loadsave.php	2009年02月27日 12:20:08 UTC (rev 6595)
@@ -1519,7 +1519,7 @@
 
 // Ensure that all mandatory pages are loaded
 $finder = new FileFinder;
- foreach (array_merge(explode(':','Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'),
+ foreach (array_merge(explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'),
 $GLOBALS['AllActionPages'],
 array(constant('HOME_PAGE'))) as $f) 
 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年03月05日 10:53:50
Revision: 6636
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6636&view=rev
Author: vargenau
Date: 2009年03月05日 10:53:38 +0000 (2009年3月05日)
Log Message:
-----------
Valid XHTML code
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年03月05日 10:34:52 UTC (rev 6635)
+++ trunk/lib/loadsave.php	2009年03月05日 10:53:38 UTC (rev 6636)
@@ -1039,7 +1039,7 @@
 _("Overwrite All"),
 _("PhpWikiAdministration"),
 'wikiunsafe');
- $mesg->pushContent(HTML::div(array('class' => 'hint'), $owb));
+ $mesg->pushContent(HTML::span(array('class' => 'hint'), $owb));
 $overwite_all = true;
 }
 } else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年04月03日 14:19:10
Revision: 6770
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6770&view=rev
Author: vargenau
Date: 2009年04月03日 14:18:56 +0000 (2009年4月03日)
Log Message:
-----------
Special mandatory pages for Gforge
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年04月03日 11:12:40 UTC (rev 6769)
+++ trunk/lib/loadsave.php	2009年04月03日 14:18:56 UTC (rev 6770)
@@ -1519,7 +1519,13 @@
 
 // Ensure that all mandatory pages are loaded
 $finder = new FileFinder;
- foreach (array_merge(explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'),
+
+ if (defined('GFORGE') and GFORGE) {
+ $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:TextFormattingRules:PhpWikiAdministration');
+ } else {
+ $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration');
+ }
+ foreach (array_merge($mandatory,
 $GLOBALS['AllActionPages'],
 array(constant('HOME_PAGE'))) as $f) 
 {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ru...@us...> - 2009年06月04日 08:47:24
Revision: 6858
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6858&view=rev
Author: rurban
Date: 2009年06月04日 08:47:23 +0000 (2009年6月04日)
Log Message:
-----------
Disallow ending dots on filenames for windows fs deficiancies
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年06月04日 08:43:15 UTC (rev 6857)
+++ trunk/lib/loadsave.php	2009年06月04日 08:47:23 UTC (rev 6858)
@@ -205,7 +205,8 @@
 	$enc = preg_replace('/%2F/', '/', $enc);
 }
 $enc = preg_replace('/^\./', '%2E', $enc);
- $enc = preg_replace('/%20/', ' ', $enc);
+ $enc = preg_replace('/%20/', ' ', $enc);
+ $enc = preg_replace('/\.$/', '%2E', $enc);
 return $enc;
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年07月14日 22:41:15
Revision: 7036
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7036&view=rev
Author: vargenau
Date: 2009年07月14日 22:41:13 +0000 (2009年7月14日)
Log Message:
-----------
Add fieldset
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年07月14日 10:21:55 UTC (rev 7035)
+++ trunk/lib/loadsave.php	2009年07月14日 22:41:13 UTC (rev 7036)
@@ -1094,19 +1094,17 @@
 return;
 }
 if (!$request->getArg('verify')) {
- $mesg->pushContent(HTML::p(_("Are you sure?")),
+ $mesg->pushContent(HTML::p(fmt("Are you sure to revert %s to version $version?", WikiLink($pagename))),
 HTML::form(array('action' => $request->getPostURL(),
 'method' => 'post'),
 HiddenInputs($request->getArgs(), false, array('verify')),
 HiddenInputs(array('verify' => 1)),
 Button('submit:verify', _("Yes"), 'button'),
 HTML::Raw('&nbsp;'),
- Button('submit:cancel', _("Cancel"), 'button')),
- HTML::hr());
+ Button('submit:cancel', _("Cancel"), 'button'))
+ );
 $rev = $page->getRevision($version);
- $html = HTML(HTML::p(fmt("Revert %s to version $version", WikiLink($pagename))), 
- $mesg,
- $rev->getTransformedContent()); 
+ $html = HTML(HTML::fieldset($mesg), HTML::hr(), $rev->getTransformedContent()); 
 $template = Template('browse', 
 array('CONTENT' => $html));
 GeneratePage($template, $pagename, $rev);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年09月23日 08:33:28
Revision: 7151
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7151&view=rev
Author: vargenau
Date: 2009年09月23日 08:33:21 +0000 (2009年9月23日)
Log Message:
-----------
In Gforge "help" wiki, use Help/TextFormattingRules instead of TextFormattingRules when editing a page (previous check-in was wrong)
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年09月22日 16:44:24 UTC (rev 7150)
+++ trunk/lib/loadsave.php	2009年09月23日 08:33:21 UTC (rev 7151)
@@ -1522,11 +1522,12 @@
 // Ensure that all mandatory pages are loaded
 $finder = new FileFinder;
 
- if (defined('GFORGE') and GFORGE) {
- if (defined('GFORGE') and GFORGE) {
+ if (! defined('GFORGE') or !GFORGE) {
+ $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration');
+ } else if (WIKI_NAME == "help") {
+ $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/TextFormattingRules:PhpWikiAdministration');
+ } else {
 $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:TextFormattingRules:PhpWikiAdministration');
- } else {
- $mandatory = explode(':','SandBox:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration');
 }
 foreach (array_merge($mandatory,
 $GLOBALS['AllActionPages'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2009年10月17日 11:42:35
Revision: 7213
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7213&view=rev
Author: vargenau
Date: 2009年10月17日 11:42:25 +0000 (2009年10月17日)
Log Message:
-----------
Hack to get valid XHTML code in Monobook (but the result is still missing the menus)
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2009年10月13日 16:29:32 UTC (rev 7212)
+++ trunk/lib/loadsave.php	2009年10月17日 11:42:25 UTC (rev 7213)
@@ -120,6 +120,12 @@
 echo "</td></tr>\n";
 echo "</table>\n";
 }
+ if (isa($WikiTheme, 'WikiTheme_MonoBook')) {
+ echo "</div>\n";
+ echo "</div>\n";
+ echo "</div>\n";
+ echo "</div>\n";
+ }
 echo "</body></html>\n";
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ru...@us...> - 2010年06月07日 11:00:33
Revision: 7474
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7474&view=rev
Author: rurban
Date: 2010年06月07日 11:00:26 +0000 (2010年6月07日)
Log Message:
-----------
get userdir images
simplify if GFORGE
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年06月07日 10:59:48 UTC (rev 7473)
+++ trunk/lib/loadsave.php	2010年06月07日 11:00:26 UTC (rev 7474)
@@ -1515,7 +1515,7 @@
 // Ensure that all mandatory pages are loaded
 $finder = new FileFinder;
 
- if (! defined('GFORGE') or !GFORGE) {
+ if (!GFORGE) {
 $mandatory = explode(':','SandBox:Template/Category:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration');
 } else if (WIKI_NAME == "help") {
 $mandatory = explode(':','SandBox:Template/Category:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/TextFormattingRules:PhpWikiAdministration');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年06月11日 19:00:28
Revision: 7528
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7528&view=rev
Author: vargenau
Date: 2010年06月11日 19:00:22 +0000 (2010年6月11日)
Log Message:
-----------
Valid XHTML code for wikilens
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年06月11日 16:09:57 UTC (rev 7527)
+++ trunk/lib/loadsave.php	2010年06月11日 19:00:22 UTC (rev 7528)
@@ -126,6 +126,12 @@
 echo "</div>\n";
 echo "</div>\n";
 }
+ if (isa($WikiTheme, 'WikiTheme_wikilens')) {
+ echo "</div>\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ }
 echo "</body></html>\n";
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年06月13日 19:03:36
Revision: 7529
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7529&view=rev
Author: vargenau
Date: 2010年06月13日 19:03:30 +0000 (2010年6月13日)
Log Message:
-----------
Valid XHTML code for all themes
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年06月11日 19:00:22 UTC (rev 7528)
+++ trunk/lib/loadsave.php	2010年06月13日 19:03:30 UTC (rev 7529)
@@ -119,23 +119,30 @@
 echo "</table>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
- }
- if (isa($WikiTheme, 'WikiTheme_MonoBook')) {
+ } else if (isa($WikiTheme, 'WikiTheme_Sidebar')
+ or isa($WikiTheme, 'WikiTheme_MonoBook')) {
 echo "</div>\n";
 echo "</div>\n";
 echo "</div>\n";
 echo "</div>\n";
- }
- if (isa($WikiTheme, 'WikiTheme_wikilens')) {
+ } else if (isa($WikiTheme, 'WikiTheme_wikilens')) {
 echo "</div>\n";
 echo "</td>\n";
 echo "</tr>\n";
 echo "</table>\n";
+ } else if (isa($WikiTheme, 'WikiTheme_blog')) {
+ echo "</div>\n";
+ echo "</div>\n";
+ } else if (isa($WikiTheme, 'WikiTheme_Crao')
+ or isa($WikiTheme, 'WikiTheme_Hawaiian')
+ or isa($WikiTheme, 'WikiTheme_MacOSX')
+ or isa($WikiTheme, 'WikiTheme_shamino_com')
+ or isa($WikiTheme, 'WikiTheme_smaller')) {
+ echo "</div>\n";
 }
 echo "</body></html>\n";
 }
 
-
 ////////////////////////////////////////////////////////////////
 //
 // Functions for dumping.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年07月13日 13:35:20
Revision: 7599
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7599&view=rev
Author: vargenau
Date: 2010年07月13日 13:35:14 +0000 (2010年7月13日)
Log Message:
-----------
 The page content is the same, we don't need a new revision
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年07月13日 13:17:34 UTC (rev 7598)
+++ trunk/lib/loadsave.php	2010年07月13日 13:35:14 UTC (rev 7599)
@@ -994,11 +994,8 @@
 $skip = true;
 }
 }
- else if ($current->getPackedContent() == $content
- && $current->get('author') == $versiondata['author']) {
- // The page metadata is already changed, we don't need a new revision.
- // This was called previously "is identical to current version %d - skipped"
- // which is wrong, since the pagedata was stored, not skipped.
+ else if ($current->getPackedContent() == $content) {
+ // The page content is the same, we don't need a new revision.
 $mesg->pushContent(' ',
 fmt("content is identical to current version %d - no new revision created",
 $current->getVersion()));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年07月16日 15:26:45
Revision: 7623
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7623&view=rev
Author: vargenau
Date: 2010年07月16日 15:26:39 +0000 (2010年7月16日)
Log Message:
-----------
When upgrading, create pages as ADMIN_USER
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年07月16日 14:25:17 UTC (rev 7622)
+++ trunk/lib/loadsave.php	2010年07月16日 15:26:39 UTC (rev 7623)
@@ -3,7 +3,7 @@
 
 /*
 Copyright 1999,2000,2001,2002,2004,2005,2006,2007 $ThePhpWikiProgrammingTeam
- Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent
+ Copyright 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent
 
 This file is part of PhpWiki.
 
@@ -969,6 +969,8 @@
 	$current = $page->getCurrentRevision();
 }
 if ($current->getVersion() == 0) {
+ $versiondata['author'] = ADMIN_USER;
+ $versiondata['author_id'] = ADMIN_USER;
 $mesg->pushContent(' - ', _("New page"));
 $isnew = true;
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ru...@us...> - 2010年11月10日 09:14:52
Revision: 7738
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7738&view=rev
Author: rurban
Date: 2010年11月10日 09:14:46 +0000 (2010年11月10日)
Log Message:
-----------
remove HTML from loadfile title, broke HTML
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年11月10日 08:47:34 UTC (rev 7737)
+++ trunk/lib/loadsave.php	2010年11月10日 09:14:46 UTC (rev 7738)
@@ -1475,11 +1475,8 @@
 $source = $request->getArg('source');
 $finder = new FileFinder;
 $source = $finder->slashifyPath($source);
- $page = rawurldecode(basename($source));
- StartLoadDump($request, fmt("Loading '%s'",
- 	HTML(dirname($source),
- dirname($source) ? "/" : "",
- WikiLink($page,'auto'))));
+ StartLoadDump($request, 
+ 	sprintf(_("Loading '%s'"), $source));
 LoadAny($request, $source);
 EndLoadDump($request);
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年11月10日 16:51:39
Revision: 7739
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7739&view=rev
Author: vargenau
Date: 2010年11月10日 16:51:32 +0000 (2010年11月10日)
Log Message:
-----------
Add <div> in Fusionforge theme to get valid XHTML
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2010年11月10日 09:14:46 UTC (rev 7738)
+++ trunk/lib/loadsave.php	2010年11月10日 16:51:32 UTC (rev 7739)
@@ -117,6 +117,7 @@
 echo "</div>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
+ echo "</div>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
 } else if (isa($WikiTheme, 'WikiTheme_Sidebar')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年04月14日 12:12:12
Revision: 8053
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8053&view=rev
Author: vargenau
Date: 2011年04月14日 12:12:06 +0000 (2011年4月14日)
Log Message:
-----------
Avoid warnings
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2011年04月14日 09:48:00 UTC (rev 8052)
+++ trunk/lib/loadsave.php	2011年04月14日 12:12:06 UTC (rev 8053)
@@ -554,10 +554,13 @@
 $page_iter_sav->reset();
 }
 
- if (defined('HTML_DUMP_SUFFIX'))
+ if (defined('HTML_DUMP_SUFFIX')) {
 $WikiTheme->HTML_DUMP_SUFFIX = HTML_DUMP_SUFFIX;
- $_bodyAttr = @$WikiTheme->_MoreAttr['body'];
- unset($WikiTheme->_MoreAttr['body']);
+ }
+ if (isset($WikiTheme->_MoreAttr['body'])) {
+ $_bodyAttr = $WikiTheme->_MoreAttr['body'];
+ unset($WikiTheme->_MoreAttr['body']);
+ }
 
 $ErrorManager->pushErrorHandler(new WikiFunctionCb('_dump_error_handler'));
 
@@ -873,7 +876,7 @@
 
 $WikiTheme->HTML_DUMP_SUFFIX = '';
 $WikiTheme->DUMP_MODE = false;
- $WikiTheme->_MoreAttr['body'] = $_bodyAttr;
+ $WikiTheme->_MoreAttr['body'] = isset($_bodyAttr) ? $_bodyAttr : '';
 }
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年04月27日 10:04:53
Revision: 8058
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8058&view=rev
Author: vargenau
Date: 2011年04月27日 10:04:46 +0000 (2011年4月27日)
Log Message:
-----------
Fix PHP warnings in wiki
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2011年04月24日 15:10:23 UTC (rev 8057)
+++ trunk/lib/loadsave.php	2011年04月27日 10:04:46 UTC (rev 8058)
@@ -28,7 +28,7 @@
 /**
 * ignore fatal errors during dump
 */
-function _dump_error_handler(&$error) {
+function _dump_error_handler($error) {
 if ($error->isFatal()) {
 $error->errno = E_USER_WARNING;
 return true;
@@ -531,12 +531,12 @@
 global $WikiTheme, $request, $ErrorManager;
 $silent = true; $zip = false; $directory = false;
 if ($WikiTheme->DUMP_MODE == 'HTML') {
- $directory = $target;
- $silent = false;
+ $directory = $target;
+ $silent = false;
 } elseif ($WikiTheme->DUMP_MODE == 'PDFHTML') {
- $directory = $target;
+ $directory = $target;
 } elseif (is_object($target)) { // $WikiTheme->DUMP_MODE == 'ZIPHTML'
- $zip = $target;
+ $zip = $target;
 }
 
 $request->_TemplatesProcessed = array();
@@ -547,12 +547,12 @@
 }
 $WikiTheme->VALID_LINKS = array();
 if ($request->getArg('format')) { // pagelist
- $page_iter_sav = $page_iter;
- foreach ($page_iter_sav->asArray() as $handle) {
- $WikiTheme->VALID_LINKS[] = is_string($handle) ? $handle : $handle->getName();
+ $page_iter_sav = $page_iter;
+ foreach ($page_iter_sav->asArray() as $handle) {
+ $WikiTheme->VALID_LINKS[] = is_string($handle) ? $handle : $handle->getName();
+ }
+ $page_iter_sav->reset();
 }
- $page_iter_sav->reset();
- }
 
 if (defined('HTML_DUMP_SUFFIX')) {
 $WikiTheme->HTML_DUMP_SUFFIX = HTML_DUMP_SUFFIX;
@@ -567,21 +567,21 @@
 // check if the dumped file will be accessible from outside
 $doc_root = $request->get("DOCUMENT_ROOT");
 if ($WikiTheme->DUMP_MODE == 'HTML') {
- $ldir = NormalizeLocalFileName($directory);
- $wikiroot = NormalizeLocalFileName('');
- if (string_starts_with($ldir, $doc_root)) {
- $link_prefix = substr($directory, strlen($doc_root))."/";
- } elseif (string_starts_with($ldir, $wikiroot)) {
- $link_prefix = NormalizeWebFileName(substr($directory, strlen($wikiroot)))."/";
- } else {
- $prefix = '';
- if (isWindows()) {
- $prefix = '/'; // . substr($doc_root,0,2); // add drive where apache is installed
+ $ldir = NormalizeLocalFileName($directory);
+ $wikiroot = NormalizeLocalFileName('');
+ if (string_starts_with($ldir, $doc_root)) {
+ $link_prefix = substr($directory, strlen($doc_root))."/";
+ } elseif (string_starts_with($ldir, $wikiroot)) {
+ $link_prefix = NormalizeWebFileName(substr($directory, strlen($wikiroot)))."/";
+ } else {
+ $prefix = '';
+ if (isWindows()) {
+ $prefix = '/'; // . substr($doc_root,0,2); // add drive where apache is installed
+ }
+ $link_prefix = "file://".$prefix.$directory."/";
 }
- $link_prefix = "file://".$prefix.$directory."/";
- }
 } else {
- $link_prefix = "";
+ $link_prefix = "";
 }
 
 $request_args = $request->args;
@@ -589,7 +589,8 @@
 if ($directory) {
 if (isWindows())
 $directory = str_replace("\\", "/", $directory); // no Win95 support.
- @mkdir("$directory/images");
+ if (!is_dir("$directory/images"))
+ mkdir("$directory/images");
 }
 $already = array();
 $outfiles = array();
@@ -602,62 +603,62 @@
 } else {
 $pagename = $page->getName();
 }
- if (empty($firstpage)) $firstpage = $pagename;
- if (array_key_exists($pagename, $already))
- continue;
- $already[$pagename] = 1;
+ if (empty($firstpage)) $firstpage = $pagename;
+ if (array_key_exists($pagename, $already))
+ continue;
+ $already[$pagename] = 1;
 $current = $page->getCurrentRevision();
 //if ($current->getVersion() == 0)
 // continue;
 
- $request->args = $request_args; // some plugins might change them (esp. on POST)
+ $request->args = $request_args; // some plugins might change them (esp. on POST)
 longer_timeout($timeout); // Reset watchdog
 
- if ($zip) {
- $attrib = array('mtime' => $current->get('mtime'),
+ if ($zip) {
+ $attrib = array('mtime' => $current->get('mtime'),
 'is_ascii' => 1);
- if ($page->get('locked'))
- $attrib['write_protected'] = 1;
- } elseif (!$silent) {
- if (!isa($request,'MockRequest')) {
- PrintXML(HTML::br(), $pagename, ' ... ');
- flush();
+ if ($page->get('locked'))
+ $attrib['write_protected'] = 1;
+ } elseif (!$silent) {
+ if (!isa($request,'MockRequest')) {
+ PrintXML(HTML::br(), $pagename, ' ... ');
+ flush();
+ }
 }
- }
 if (in_array($pagename, $excludeList)) {
- if (!$silent and !isa($request,'MockRequest')) {
- PrintXML(_("Skipped."));
- flush();
- }
+ if (!$silent and !isa($request,'MockRequest')) {
+ PrintXML(_("Skipped."));
+ flush();
+ }
 continue;
 }
 $relative_base = '';
 if ($WikiTheme->DUMP_MODE == 'PDFHTML')
- $request->setArg('action', 'pdf'); // to omit cache headers
+ $request->setArg('action', 'pdf'); // to omit cache headers
 $request->setArg('pagename', $pagename); // Template::_basepage fix
 $filename = FilenameForPage($pagename) . $WikiTheme->HTML_DUMP_SUFFIX;
- $args = array('revision' => $current,
- 'CONTENT' => $current->getTransformedContent(),
+ $args = array('revision' => $current,
+ 'CONTENT' => $current->getTransformedContent(),
 'relative_base' => $relative_base);
- // For every %2F will need to mkdir -p dirname($pagename)
- if (preg_match("/(%2F|\/)/", $filename)) {
- // mkdir -p and set relative base for subdir pages
- $filename = preg_replace("/%2F/", "/", $filename);
- $count = substr_count($filename, "/");
- $dirname = dirname($filename);
- if ($directory)
- mkdir_p($directory."/".$dirname);
- // Fails with "XX / YY", "XX" is created, "XX / YY" cannot be written
- // if (isWindows()) // interesting Windows bug: cannot mkdir "bla "
- // Since dumps needs to be copied, we have to disallow this for all platforms.
- $filename = preg_replace("/ \//", "/", $filename);
- $relative_base = "../";
- while ($count > 1) {
- $relative_base .= "../";
- $count--;
+ // For every %2F will need to mkdir -p dirname($pagename)
+ if (preg_match("/(%2F|\/)/", $filename)) {
+ // mkdir -p and set relative base for subdir pages
+ $filename = preg_replace("/%2F/", "/", $filename);
+ $count = substr_count($filename, "/");
+ $dirname = dirname($filename);
+ if ($directory)
+ mkdir_p($directory."/".$dirname);
+ // Fails with "XX / YY", "XX" is created, "XX / YY" cannot be written
+ // if (isWindows()) // interesting Windows bug: cannot mkdir "bla "
+ // Since dumps needs to be copied, we have to disallow this for all platforms.
+ $filename = preg_replace("/ \//", "/", $filename);
+ $relative_base = "../";
+ while ($count > 1) {
+ $relative_base .= "../";
+ $count--;
+ }
+ $args['relative_base'] = $relative_base;
 }
- $args['relative_base'] = $relative_base;
- }
 $msg = HTML();
 
 $DUMP_MODE = $WikiTheme->DUMP_MODE;
@@ -665,33 +666,33 @@
 $pagename, $current, $args);
 $WikiTheme->DUMP_MODE = $DUMP_MODE;
 
- if (preg_match_all("/<img .*?src=\"(\/.+?)\"/", $data, $m)) {
- // fix to local relative path for uploaded images, so that pdf will work
- foreach ($m[1] as $img_file) {
- $base = basename($img_file);
- $data = str_replace('src="'.$img_file.'"','src="images/'.$base.'"', $data);
- if (array_key_exists($img_file, $already_images))
- continue;
- $already_images[$img_file] = 1;
- // resolve src from webdata to file
- $src = $doc_root . $img_file;
- if (file_exists($src) and $base) {
- if ($directory) {
- $target = "$directory/images/$base";
- if (copy($src, $target)) {
- if (!$silent)
- _copyMsg($img_file, fmt("... copied to %s", $target));
- } else {
- if (!$silent)
- _copyMsg($img_file, fmt("... not copied to %s", $target));
+ if (preg_match_all("/<img .*?src=\"(\/.+?)\"/", $data, $m)) {
+ // fix to local relative path for uploaded images, so that pdf will work
+ foreach ($m[1] as $img_file) {
+ $base = basename($img_file);
+ $data = str_replace('src="'.$img_file.'"','src="images/'.$base.'"', $data);
+ if (array_key_exists($img_file, $already_images))
+ continue;
+ $already_images[$img_file] = 1;
+ // resolve src from webdata to file
+ $src = $doc_root . $img_file;
+ if (file_exists($src) and $base) {
+ if ($directory) {
+ $target = "$directory/images/$base";
+ if (copy($src, $target)) {
+ if (!$silent)
+ _copyMsg($img_file, fmt("... copied to %s", $target));
+ } else {
+ if (!$silent)
+ _copyMsg($img_file, fmt("... not copied to %s", $target));
+ }
+ } else {
+ $target = "images/$base";
+ $zip->addSrcFile($target, $src);
+ }
+ }
 }
- } else {
- $target = "images/$base";
- $zip->addSrcFile($target, $src);
- }
 }
- }
- }
 
 if ($directory) {
 $outfile = $directory."/".$filename;
@@ -776,11 +777,11 @@
 and is_array($WikiTheme->dumped_buttons))
 {
 // Buttons also
- if ($directory)
- @mkdir("$directory/images/buttons");
+ if ($directory && !is_dir("$directory/images/buttons"))
+ mkdir("$directory/images/buttons");
 foreach ($WikiTheme->dumped_buttons as $text => $img_file) {
 if (array_key_exists($img_file, $already_images))
- continue;
+ continue;
 $already_images[$img_file] = 1;
 if ($img_file
 and ($from = $WikiTheme->_findFile($img_file, true))
@@ -791,12 +792,12 @@
 if ($silent)
 copy($WikiTheme->_path . $from, $target);
 else {
- if (copy($WikiTheme->_path . $from, $target)) {
- _copyMsg($from, fmt("... copied to %s", $target));
- } else {
- _copyMsg($from, fmt("... not copied to %s", $target));
+ if (copy($WikiTheme->_path . $from, $target)) {
+ _copyMsg($from, fmt("... copied to %s", $target));
+ } else {
+ _copyMsg($from, fmt("... not copied to %s", $target));
+ }
 }
- }
 } else {
 $target = "images/buttons/".basename($from);
 $zip->addSrcFile($target, $WikiTheme->_path . $from);
@@ -809,7 +810,7 @@
 if (!empty($WikiTheme->dumped_css) and is_array($WikiTheme->dumped_css)) {
 foreach ($WikiTheme->dumped_css as $css_file) {
 if (array_key_exists($css_file, $already_images))
- continue;
+ continue;
 $already_images[$css_file] = 1;
 if ($css_file
 and ($from = $WikiTheme->_findFile(basename($css_file), true))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年11月02日 15:22:19
Revision: 8172
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8172&view=rev
Author: vargenau
Date: 2011年11月02日 15:22:12 +0000 (2011年11月02日)
Log Message:
-----------
Avoid non-monotonic message when reverting
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2011年11月02日 14:32:49 UTC (rev 8171)
+++ trunk/lib/loadsave.php	2011年11月02日 15:22:12 UTC (rev 8172)
@@ -1126,6 +1126,7 @@
 $content = $rev->getPackedContent();
 $versiondata = $rev->_data;
 $versiondata['summary'] = sprintf(_("revert to version %d"), $version);
+ $versiondata['mtime'] = time();
 $new = $page->save($content, $currversion + 1, $versiondata);
 $dbi->touch();
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年11月04日 09:27:14
Revision: 8174
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8174&view=rev
Author: vargenau
Date: 2011年11月04日 09:27:08 +0000 (2011年11月04日)
Log Message:
-----------
Redirect to page with warningmsg rather than PrintXML
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2011年11月04日 09:23:48 UTC (rev 8173)
+++ trunk/lib/loadsave.php	2011年11月04日 09:27:08 UTC (rev 8174)
@@ -1073,35 +1073,29 @@
 $mesg = HTML::div();
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
- if (!$version) {
- PrintXML(HTML::p(fmt("Revert")," ",WikiLink($pagename)),
- HTML::p(_("missing required version argument")));
- return;
- }
 $dbi =& $request->_dbi;
 $page = $dbi->getPage($pagename);
+ if (!$version) {
+ $request->redirect(WikiURL($page,
+ array('warningmsg' => _('Revert: missing required version argument'))));
+ // noreturn
+ }
 $current = $page->getCurrentRevision();
 $currversion = $current->getVersion();
 if ($currversion == 0) {
- $mesg->pushContent(' ', _("no page content"));
- PrintXML(HTML::p(fmt("Revert")," ",WikiLink($pagename)),
- $mesg);
- flush();
- return;
+ $request->redirect(WikiURL($page,
+ array('errormsg' => _('No revert: no page content'))));
+ // noreturn
 }
 if ($currversion == $version) {
- $mesg->pushContent(' ', _("same version page"));
- PrintXML(HTML::p(fmt("Revert")," ",WikiLink($pagename)),
- $mesg);
- flush();
- return;
+ $request->redirect(WikiURL($page,
+ array('warningmsg' => _('No revert: same version page'))));
+ // noreturn
 }
 if ($request->getArg('cancel')) {
- $mesg->pushContent(' ', _("Cancelled"));
- PrintXML(HTML::p(fmt("Revert")," ",WikiLink($pagename)),
- $mesg);
- flush();
- return;
+ $request->redirect(WikiURL($page,
+ array('warningmsg' => _('Revert cancelled'))));
+ // noreturn
 }
 if (!$request->getArg('verify')) {
 $mesg->pushContent(HTML::p(fmt("Are you sure to revert %s to version $version?", WikiLink($pagename))),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年11月29日 09:52:52
Revision: 8192
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8192&view=rev
Author: vargenau
Date: 2011年11月29日 09:52:45 +0000 (2011年11月29日)
Log Message:
-----------
Use same error message
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2011年11月29日 09:41:01 UTC (rev 8191)
+++ trunk/lib/loadsave.php	2011年11月29日 09:52:45 UTC (rev 8192)
@@ -904,7 +904,7 @@
 // remove invalid backend specific chars. utf8 issues mostly
 $pagename_check = new WikiPagename($pageinfo['pagename']);
 if (!$pagename_check->isValid()) {
- PrintXML(HTML::p(HTML::strong(_("Invalid pagename!")." ".$pageinfo['pagename'])));
+ PrintXML(HTML::p(HTML::strong(sprintf(_("'%s': Bad page name"), $pageinfo['pagename']))));
 return;
 }
 $pagename = $pagename_check->getName();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2012年08月31日 11:22:48
Revision: 8275
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8275&view=rev
Author: vargenau
Date: 2012年08月31日 11:22:38 +0000 (2012年8月31日)
Log Message:
-----------
ereg_replace --> preg_replace
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2012年08月31日 11:21:00 UTC (rev 8274)
+++ trunk/lib/loadsave.php	2012年08月31日 11:22:38 UTC (rev 8275)
@@ -54,7 +54,7 @@
 $tmpl = Template('html', array('TITLE' => $title,
 'HEADER' => $title,
 'CONTENT' => $html ? $html : '%BODY%'));
- echo ereg_replace('%BODY%.*', '', $tmpl->getExpansion($html));
+ echo preg_replace('/%BODY%.*/s', '', $tmpl->getExpansion($html));
 $request->chunkOutput();
 
 // set marker for sendPageChangeNotification()
@@ -115,11 +115,9 @@
 // Ugly hack to get valid XHTML code
 if (isa($WikiTheme, 'WikiTheme_fusionforge')) {
 echo "</div>\n";
- echo "</td></tr>\n";
- echo "</table>\n";
 echo "</div>\n";
- echo "</td></tr>\n";
- echo "</table>\n";
+ echo "</article>\n";
+ echo "</div>\n";
 } else if (isa($WikiTheme, 'WikiTheme_Sidebar')
 or isa($WikiTheme, 'WikiTheme_MonoBook')) {
 echo "</div>\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2012年10月11日 07:32:16
Revision: 8408
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8408&view=rev
Author: vargenau
Date: 2012年10月11日 07:32:06 +0000 (2012年10月11日)
Log Message:
-----------
No need to indent
Modified Paths:
--------------
 trunk/lib/loadsave.php
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php	2012年10月11日 07:28:17 UTC (rev 8407)
+++ trunk/lib/loadsave.php	2012年10月11日 07:32:06 UTC (rev 8408)
@@ -970,7 +970,7 @@
 $page->set($key, $value);
 }
 
- $mesg = HTML::p(array('style' => 'text-indent: 3em;'));
+ $mesg = HTML::p();
 if ($source)
 $mesg->pushContent(' ', fmt("from %s", $source));
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
1 2 3 > >> (Page 1 of 3)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /