SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: <ru...@us...> - 2009年03月24日 15:13:34
Revision: 6698
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6698&view=rev
Author: rurban
Date: 2009年03月24日 15:13:25 +0000 (2009年3月24日)
Log Message:
-----------
fix action=pdf
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2009年03月24日 13:59:59 UTC (rev 6697)
+++ trunk/lib/display.php	2009年03月24日 15:13:25 UTC (rev 6698)
@@ -362,127 +362,13 @@
 
 $page->increaseHitCount();
 
- if ($request->getArg('action') != 'pdf')
+ if ($request->getArg('action') != 'pdf') {
 $request->checkValidators();
- flush();
+ 	flush();
+ }
 return '';
 }
 
-// $Log: not supported by cvs2svn $
-// Revision 1.78 2008年02月14日 18:48:42 rurban
-// VALID_LINKS only for existing pages
-//
-// Revision 1.77 2007年09月12日 19:32:29 rurban
-// link only VALID_LINKS with pagelist HTML_DUMP
-//
-// Revision 1.76 2007年08月10日 21:59:27 rurban
-// fix missing PageList dependency
-// add format=rdfs
-//
-// Revision 1.75 2007年07月01日 09:17:45 rurban
-// add ATOM support, a very questionable format
-//
-// Revision 1.74 2007年06月07日 17:01:27 rurban
-// actionPage has no toks: fix format=rss* on actionpages
-//
-// Revision 1.73 2007年05月30日 20:43:31 rurban
-// added MonoBook UserContribs
-//
-// Revision 1.72 2007年05月13日 18:13:12 rurban
-// LinkDatabase format exceptions
-//
-// Revision 1.71 2007年02月17日 22:39:05 rurban
-// format=rss overhaul
-//
-// Revision 1.70 2007年01月22日 23:43:06 rurban
-// Add RecentChanges format=sidebar
-//
-// Revision 1.69 2007年01月20日 15:53:51 rurban
-// Rewrite of SearchHighlight: through ActionPage and InlineParser
-//
-// Revision 1.68 2007年01月20日 11:25:19 rurban
-// actionPage: request is already global
-//
-// Revision 1.67 2007年01月07日 18:44:20 rurban
-// Support format handlers for single- and multi-page: pagelists from actionpage plugins. Use USE_SEARCHHIGHLIGHT. Fix InlineHighlight (still experimental).
-//
-// Revision 1.66 2006年03月19日 14:26:29 rurban
-// sf.net patch by Matt Brown: Add rel=nofollow to more actions
-//
-// Revision 1.65 2005年05月05日 08:54:40 rurban
-// fix pagename split for title and header
-//
-// Revision 1.64 2005年04月23日 11:21:55 rurban
-// honor theme-specific SplitWikiWord in the HEADER
-//
-// Revision 1.63 2004年11月30日 17:48:38 rurban
-// just comments
-//
-// Revision 1.62 2004年11月30日 09:51:35 rurban
-// changed KEYWORDS from pageprefix to search term. added installer detection.
-//
-// Revision 1.61 2004年11月21日 11:59:19 rurban
-// remove final \n to be ob_cache independent
-//
-// Revision 1.60 2004年11月19日 19:22:03 rurban
-// ModeratePage part1: change status
-//
-// Revision 1.59 2004年11月17日 20:03:58 rurban
-// Typo: call SearchHighlight not SearchHighLight
-//
-// Revision 1.58 2004年11月09日 17:11:16 rurban
-// * revert to the wikidb ref passing. there's no memory abuse there.
-// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively
-// store page ids with getPageLinks (GleanDescription) of all existing pages, which
-// are also needed at the rendering for linkExistingWikiWord().
-// pass options to pageiterator.
-// use this cache also for _get_pageid()
-// This saves about 8 SELECT count per page (num all pagelinks).
-// * fix passing of all page fields to the pageiterator.
-// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes
-//
-// Revision 1.57 2004年11月01日 10:43:57 rurban
-// seperate PassUser methods into seperate dir (memory usage)
-// fix WikiUser (old) overlarge data session
-// remove wikidb arg from various page class methods, use global ->_dbi instead
-// ...
-//
-// Revision 1.56 2004年10月14日 13:44:14 rurban
-// fix lib/display.php:159: Warning[2]: Argument to array_reverse() should be an array
-//
-// Revision 1.55 2004年09月26日 14:58:35 rurban
-// naive SearchHighLight implementation
-//
-// Revision 1.54 2004年09月17日 14:19:41 rurban
-// disable Content-Type header for now, until it is fixed
-//
-// Revision 1.53 2004年06月25日 14:29:20 rurban
-// WikiGroup refactoring:
-// global group attached to user, code for not_current user.
-// improved helpers for special groups (avoid double invocations)
-// new experimental config option ENABLE_XHTML_XML (fails with IE, and document.write())
-// fixed a XHTML validation error on userprefs.tmpl
-//
-// Revision 1.52 2004年06月14日 11:31:37 rurban
-// renamed global $Theme to $WikiTheme (gforge nameclash)
-// inherit PageList default options from PageList
-// default sortby=pagename
-// use options in PageList_Selectable (limit, sortby, ...)
-// added action revert, with button at action=diff
-// added option regex to WikiAdminSearchReplace
-//
-// Revision 1.51 2004年05月18日 16:23:39 rurban
-// rename split_pagename to SplitPagename
-//
-// Revision 1.50 2004年05月04日 22:34:25 rurban
-// more pdf support
-//
-// Revision 1.49 2004年04月18日 01:11:52 rurban
-// more numeric pagename fixes.
-// fixed action=upload with merge conflict warnings.
-// charset changed from constant to global (dynamic utf-8 switching)
-//
-
 // For emacs users
 // Local Variables:
 // mode: php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ru...@us...> - 2009年07月14日 07:25:45
Revision: 7028
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7028&view=rev
Author: rurban
Date: 2009年07月14日 07:25:43 +0000 (2009年7月14日)
Log Message:
-----------
During AJAX requests clear the AJAX format argument (for pagelist links, etc)
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2009年07月14日 07:24:04 UTC (rev 7027)
+++ trunk/lib/display.php	2009年07月14日 07:25:43 UTC (rev 7028)
@@ -87,6 +87,7 @@
 	$template = Template('browse', array('CONTENT' => $transformedContent));
 	GeneratePage($template, $pagetitle, $revision, $args);
 } elseif ($format == 'xml') {
+ 	$request->setArg('format','');
 	$template = new Template('browse', $request,
 array('revision' => $revision,
 'CONTENT' => $transformedContent,
@@ -138,10 +139,12 @@
 	 array_unshift($args['VALID_LINKS'], $pagename);
 	 $request->setArg('zipname', FilenameForPage($pagename).".zip");
 	 $request->setArg('pages', $args['VALID_LINKS']);
+	 $request->setArg('format','');
 	 MakeWikiZipHtml($request);
 	} // time-sorted RDF á la RecentChanges 
 	elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
 $args = $request->getArgs();
+ //$request->setArg('format','');
 if ($pagename == _("RecentChanges")) {
 $template->printExpansion($args);
 	 } else {
@@ -150,7 +153,7 @@
 return $plugin->format($plugin->getChanges($request->_dbi, $args), $args);
 	 }
 	} elseif ($format == 'json') { // for faster autocompletion on searches
-	 $req_args = $request->args;
+	 $req_args =& $request->args;
 	 unset($req_args['format']);
 $json = array('count' => count($pagelist->_pages),
 'list' => $args['VALID_LINKS'],
@@ -212,17 +215,20 @@
 echo "<","?xml version=\"1.0\" encoding=\"$charset\"?", ">\n";
 // DOCTYPE html needed to allow unencoded entities like &nbsp; without !CDATA[]
 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',"\n";
 	if ($page->exists()) {
 	 header("Last-Modified: " . Rfc1123DateTime($revision->get('mtime')));
 	 $request->cacheControl();
+	 $request->setArg('format','');
 $page_content = $revision->getTransformedContent();
 $page_content->printXML();
+ $request->_is_buffering_output = false; // avoid wrong Content-Length with errors
 $request->finish();
 }
 else {
 	 $request->cacheControl();
 echo('<div style="display:none;" />');
+ $request->_is_buffering_output = false; // avoid wrong Content-Length with errors
 $request->finish();
 exit();
 }
@@ -369,9 +375,11 @@
 	$pagelist->addPage($page);
 	if ($format == 'pdf') {
 	 require_once("lib/pdf.php");
+	 $request->setArg('format','');
 	 ConvertAndDisplayPdfPageList($request, $pagelist);
 	// time-sorted rdf a la RecentChanges
 	} elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
+	 //$request->setArg('format','');
 if ($pagename == _("RecentChanges"))
 $template->printExpansion($toks);
 else { 
@@ -389,6 +397,7 @@
 	 $rdf = new OwlWriter($request, $pagelist);
 	 $rdf->format();
 	} elseif ($format == 'json') { // include page content asynchronously
+	 $request->setArg('format','');
 	 if ($page->exists())
 	$content = $page_content->asXML();
 else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年05月18日 14:58:27
Revision: 7405
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7405&view=rev
Author: vargenau
Date: 2010年05月18日 14:58:20 +0000 (2010年5月18日)
Log Message:
-----------
Actions pages like AllPages must not be indexed, but must be followed to get all pages
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2010年05月18日 14:47:58 UTC (rev 7404)
+++ trunk/lib/display.php	2010年05月18日 14:58:20 UTC (rev 7405)
@@ -344,6 +344,9 @@
 */
 if ($pagename == _("SandBox")) {
 $toks['ROBOTS_META']="noindex,nofollow";
+ } else if (isActionPage($pagename)) {
+ // AllPages must not be indexed, but must be followed to get all pages
+ $toks['ROBOTS_META']="noindex,follow";
 } else if (!isset($toks['ROBOTS_META'])) {
 $toks['ROBOTS_META'] = "index,follow";
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2010年05月18日 15:19:47
Revision: 7406
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7406&view=rev
Author: vargenau
Date: 2010年05月18日 15:19:41 +0000 (2010年5月18日)
Log Message:
-----------
Let us make robots work for Gforge
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2010年05月18日 14:58:20 UTC (rev 7405)
+++ trunk/lib/display.php	2010年05月18日 15:19:41 UTC (rev 7406)
@@ -40,6 +40,7 @@
 /* only on ?action= */ 
 function actionPage(&$request, $action) {
 global $WikiTheme;
+ global $robots;
 
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
@@ -68,8 +69,10 @@
 RecentChanges or AllPages might be an exception.
 */
 $args = array();
- if (GOOGLE_LINKS_NOFOLLOW)
-	$args = array('ROBOTS_META' => "noindex,nofollow");
+ if (GOOGLE_LINKS_NOFOLLOW) {
+ $robots = "noindex,nofollow";
+	$args = array('ROBOTS_META' => $robots);
+ }
 
 /* Handle other formats: So far we had html only.
 xml is requested by loaddump, rss is handled by recentchanges, 
@@ -195,6 +198,7 @@
 
 function displayPage(&$request, $template=false) {
 global $WikiTheme;
+ global $robots;
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
 $page = $request->getPage();
@@ -203,7 +207,8 @@
 if (!$revision)
 NoSuchRevision($request, $page, $version);
 /* Tell Google (and others) to ignore old versions of pages */
-	$toks['ROBOTS_META'] = "noindex,nofollow";
+ $robots = "noindex,nofollow";
+	$toks['ROBOTS_META'] = $robots;
 }
 else {
 $revision = $page->getCurrentRevision();
@@ -339,16 +344,20 @@
 /* Check for special pagenames, which are no actionpages. */
 /*
 if ( $pagename == _("RecentVisitors")) {
- $toks['ROBOTS_META']="noindex,follow";
+ $robots = "noindex,follow";
+ $toks['ROBOTS_META'] = $robots;
 } else
 */
 if ($pagename == _("SandBox")) {
- $toks['ROBOTS_META']="noindex,nofollow";
+ $robots = "noindex,nofollow";
+ $toks['ROBOTS_META'] = $robots;
 } else if (isActionPage($pagename)) {
 // AllPages must not be indexed, but must be followed to get all pages
- $toks['ROBOTS_META']="noindex,follow";
+ $robots = "noindex,follow";
+ $toks['ROBOTS_META'] = $robots;
 } else if (!isset($toks['ROBOTS_META'])) {
- $toks['ROBOTS_META'] = "index,follow";
+ $robots = "index,follow";
+ $toks['ROBOTS_META'] = $robots;
 }
 if (!isset($toks['CONTENT']))
 $toks['CONTENT'] = new Template('browse', $request, $page_content);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年03月17日 09:10:31
Revision: 8002
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8002&view=rev
Author: vargenau
Date: 2011年03月17日 09:10:25 +0000 (2011年3月17日)
Log Message:
-----------
Do not follow action pages
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年03月16日 16:57:08 UTC (rev 8001)
+++ trunk/lib/display.php	2011年03月17日 09:10:25 UTC (rev 8002)
@@ -341,19 +341,11 @@
 $page_content = $revision->getTransformedContent();
 }
 
- /* Check for special pagenames, which are no actionpages. */
- /*
- if ( $pagename == _("RecentVisitors")) {
- $robots = "noindex,follow";
- $toks['ROBOTS_META'] = $robots;
- } else
- */
 if ($pagename == _("SandBox")) {
 $robots = "noindex,nofollow";
 $toks['ROBOTS_META'] = $robots;
 } else if (isActionPage($pagename)) {
- // AllPages must not be indexed, but must be followed to get all pages
- $robots = "noindex,follow";
+ $robots = "noindex,nofollow";
 $toks['ROBOTS_META'] = $robots;
 } else if (!isset($toks['ROBOTS_META'])) {
 $robots = "index,follow";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年05月20日 09:06:21
Revision: 8082
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8082&view=rev
Author: vargenau
Date: 2011年05月20日 09:06:15 +0000 (2011年5月20日)
Log Message:
-----------
Add header
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年05月19日 19:27:35 UTC (rev 8081)
+++ trunk/lib/display.php	2011年05月20日 09:06:15 UTC (rev 8082)
@@ -1,7 +1,26 @@
 <?php
-// display.php: fetch page or get default content
 // $Id$
+/* Copyright (C) 2004-2011 $ThePhpWikiProgrammingTeam
+ *
+ * This file is part of PhpWiki.
+ *
+ * PhpWiki 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.
+ *
+ * PhpWiki 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 along
+ * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
+// display.php: fetch page or get default content
+
 require_once('lib/Template.php');
 
 /**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年05月20日 09:29:46
Revision: 8083
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8083&view=rev
Author: vargenau
Date: 2011年05月20日 09:29:40 +0000 (2011年5月20日)
Log Message:
-----------
Fix whitespace
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年05月20日 09:06:15 UTC (rev 8082)
+++ trunk/lib/display.php	2011年05月20日 09:29:40 UTC (rev 8083)
@@ -84,13 +84,13 @@
 
 $transformedContent = $actionrev->getTransformedContent();
 
- /* Optionally tell google (and others) not to take notice of action pages.
- RecentChanges or AllPages might be an exception.
- */
+ /* Optionally tell google (and others) not to take notice of action pages.
+ RecentChanges or AllPages might be an exception.
+ */
 $args = array();
 if (GOOGLE_LINKS_NOFOLLOW) {
 $robots = "noindex,nofollow";
- $args = array('ROBOTS_META' => $robots);
+ $args = array('ROBOTS_META' => $robots);
 }
 
 /* Handle other formats: So far we had html only.
@@ -104,79 +104,79 @@
 /* At first the single page formats: html, xml */
 if ($pagename == _("LinkDatabase")) {
 $template = Template('browse', array('CONTENT' => $transformedContent));
- GeneratePage($template, $pagetitle, $revision, $args);
+ GeneratePage($template, $pagetitle, $revision, $args);
 } elseif (!$format or $format == 'html' or $format == 'sidebar' or $format == 'contribs') {
- $template = Template('browse', array('CONTENT' => $transformedContent));
- GeneratePage($template, $pagetitle, $revision, $args);
+ $template = Template('browse', array('CONTENT' => $transformedContent));
+ GeneratePage($template, $pagetitle, $revision, $args);
 } elseif ($format == 'xml') {
 $request->setArg('format','');
- $template = new Template('browse', $request,
+ $template = new Template('browse', $request,
 array('revision' => $revision,
 'CONTENT' => $transformedContent,
 ));
- $html = GeneratePageAsXML($template, $pagename, $revision /*,
+ $html = GeneratePageAsXML($template, $pagename, $revision /*,
 array('VALID_LINKS' => $args['VALID_LINKS'])*/);
- header("Content-Type: application/xhtml+xml; charset=" . $GLOBALS['charset']);
- echo $html;
+ header("Content-Type: application/xhtml+xml; charset=" . $GLOBALS['charset']);
+ echo $html;
 } else {
 $pagelist = null;
 require_once('lib/WikiPlugin.php');
- // Then the multi-page formats
- // rss (if not already handled by RecentChanges)
- // Need the pagelist from the first plugin
- foreach($transformedContent->_content as $cached_element) {
- if (is_a($cached_element, "Cached_PluginInvocation")) {
- $loader = new WikiPluginLoader;
- $markup = null;
- // return the first found pagelist
- $pagelist = $loader->expandPI($cached_element->_pi, $request,
- $markup, $pagename);
- if (is_a($pagelist, 'PageList'))
- break;
+ // Then the multi-page formats
+ // rss (if not already handled by RecentChanges)
+ // Need the pagelist from the first plugin
+ foreach($transformedContent->_content as $cached_element) {
+ if (is_a($cached_element, "Cached_PluginInvocation")) {
+ $loader = new WikiPluginLoader;
+ $markup = null;
+ // return the first found pagelist
+ $pagelist = $loader->expandPI($cached_element->_pi, $request,
+ $markup, $pagename);
+ if (is_a($pagelist, 'PageList'))
+ break;
+ }
 }
- }
 if (!$pagelist or !is_a($pagelist, 'PageList')) {
- if (!in_array($format, array("rss91","rss2","rss","atom","rdf")))
- trigger_error(sprintf("Format %s requires an actionpage returning a pagelist.",
+ if (!in_array($format, array("rss91","rss2","rss","atom","rdf")))
+ trigger_error(sprintf("Format %s requires an actionpage returning a pagelist.",
 $format)
 ."\n".("Fall back to single page mode"), E_USER_WARNING);
- require_once('lib/PageList.php');
- $pagelist = new PageList();
- if ($format == 'pdf')
- $pagelist->addPage($page);
- } else {
+ require_once('lib/PageList.php');
+ $pagelist = new PageList();
+ if ($format == 'pdf')
+ $pagelist->addPage($page);
+ } else {
 foreach ($pagelist->_pages as $page) {
 $name = $page->getName();
 if ($name != $pagename and $page->exists())
 $args['VALID_LINKS'][] = $name;
 }
- }
- if ($format == 'pdf') {
- require_once("lib/pdf.php");
- array_unshift($args['VALID_LINKS'], $pagename);
- ConvertAndDisplayPdfPageList($request, $pagelist, $args);
- }
- elseif ($format == 'ziphtml') { // need to fix links
- require_once('lib/loadsave.php');
- array_unshift($args['VALID_LINKS'], $pagename);
- $request->setArg('zipname', FilenameForPage($pagename).".zip");
- $request->setArg('pages', $args['VALID_LINKS']);
- $request->setArg('format','');
- MakeWikiZipHtml($request);
- } // time-sorted RDF á la RecentChanges
- elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
+ }
+ if ($format == 'pdf') {
+ require_once("lib/pdf.php");
+ array_unshift($args['VALID_LINKS'], $pagename);
+ ConvertAndDisplayPdfPageList($request, $pagelist, $args);
+ }
+ elseif ($format == 'ziphtml') { // need to fix links
+ require_once('lib/loadsave.php');
+ array_unshift($args['VALID_LINKS'], $pagename);
+ $request->setArg('zipname', FilenameForPage($pagename).".zip");
+ $request->setArg('pages', $args['VALID_LINKS']);
+ $request->setArg('format','');
+ MakeWikiZipHtml($request);
+ } // time-sorted RDF à la RecentChanges
+ elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
 $args = $request->getArgs();
 //$request->setArg('format','');
 if ($pagename == _("RecentChanges")) {
 $template->printExpansion($args);
- } else {
- require_once("lib/plugin/RecentChanges.php");
- $plugin = new WikiPlugin_RecentChanges();
+ } else {
+ require_once("lib/plugin/RecentChanges.php");
+ $plugin = new WikiPlugin_RecentChanges();
 return $plugin->format($plugin->getChanges($request->_dbi, $args), $args);
- }
- } elseif ($format == 'json') { // for faster autocompletion on searches
- $req_args =& $request->args;
- unset($req_args['format']);
+ }
+ } elseif ($format == 'json') { // for faster autocompletion on searches
+ $req_args =& $request->args;
+ unset($req_args['format']);
 $json = array('count' => count($pagelist->_pages),
 'list' => $args['VALID_LINKS'],
 'args' => $req_args,
@@ -190,26 +190,26 @@
 }
 header("Content-Type: application/json");
 die($json_enc);
- } elseif ($format == 'rdf') { // all semantic relations and attributes
- require_once("lib/SemanticWeb.php");
- $rdf = new RdfWriter($request, $pagelist);
- $rdf->format();
- } elseif ($format == 'rdfs') {
- require_once("lib/SemanticWeb.php");
- $rdf = new RdfsWriter($request, $pagelist);
- $rdf->format();
- } elseif ($format == 'owl') { // or daml?
- require_once("lib/SemanticWeb.php");
- $rdf = new OwlWriter($request, $pagelist);
- $rdf->format();
- } else {
- if (!in_array($pagename, array(_("LinkDatabase"))))
- trigger_error(sprintf(_("Unsupported argument: %s=%s"),"format",$format),
+ } elseif ($format == 'rdf') { // all semantic relations and attributes
+ require_once("lib/SemanticWeb.php");
+ $rdf = new RdfWriter($request, $pagelist);
+ $rdf->format();
+ } elseif ($format == 'rdfs') {
+ require_once("lib/SemanticWeb.php");
+ $rdf = new RdfsWriter($request, $pagelist);
+ $rdf->format();
+ } elseif ($format == 'owl') { // or daml?
+ require_once("lib/SemanticWeb.php");
+ $rdf = new OwlWriter($request, $pagelist);
+ $rdf->format();
+ } else {
+ if (!in_array($pagename, array(_("LinkDatabase"))))
+ trigger_error(sprintf(_("Unsupported argument: %s=%s"),"format",$format),
 E_USER_WARNING);
- $template = Template('browse', array('CONTENT' => $transformedContent));
- GeneratePage($template, $pagetitle, $revision, $args);
+ $template = Template('browse', array('CONTENT' => $transformedContent));
+ GeneratePage($template, $pagetitle, $revision, $args);
+ }
 }
- }
 $request->checkValidators();
 flush();
 return '';
@@ -227,9 +227,8 @@
 NoSuchRevision($request, $page, $version);
 /* Tell Google (and others) to ignore old versions of pages */
 $robots = "noindex,nofollow";
- $toks['ROBOTS_META'] = $robots;
- }
- else {
+ $toks['ROBOTS_META'] = $robots;
+ } else {
 $revision = $page->getCurrentRevision();
 }
 $format = $request->getArg('format');
@@ -240,17 +239,16 @@
 // DOCTYPE html needed to allow unencoded entities like &nbsp; without !CDATA[]
 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',"\n";
- if ($page->exists()) {
- header("Last-Modified: " . Rfc1123DateTime($revision->get('mtime')));
- $request->cacheControl();
- $request->setArg('format','');
+ if ($page->exists()) {
+ header("Last-Modified: " . Rfc1123DateTime($revision->get('mtime')));
+ $request->cacheControl();
+ $request->setArg('format','');
 $page_content = $revision->getTransformedContent();
 $page_content->printXML();
 $request->_is_buffering_output = false; // avoid wrong Content-Length with errors
 $request->finish();
- }
- else {
- $request->cacheControl();
+ } else {
+ $request->cacheControl();
 echo('<div style="display:none;" />');
 $request->_is_buffering_output = false; // avoid wrong Content-Length with errors
 $request->finish();
@@ -345,18 +343,18 @@
 $toks['SEARCH_ENGINE'] = $result['engine'];
 $toks['SEARCH_ENGINE_URL'] = $result['engine_url'];
 $toks['SEARCH_TERM'] = $result['query'];
- //$toks['HEADER'] = HTML($actionpage->getName(),": ",$pageheader); // h1 with backlink
+ //$toks['HEADER'] = HTML($actionpage->getName(),": ",$pageheader); // h1 with backlink
 $actioncontent = new TransformedText($actionrev->getPage(),
 $actionrev->getPackedContent(),
 $actionrev->getMetaData());
- // prepend the actionpage in front of the hightlighted content
- $toks['CONTENT'] = HTML($actioncontent, $page_content);
+ // prepend the actionpage in front of the hightlighted content
+ $toks['CONTENT'] = HTML($actioncontent, $page_content);
 }
+ }
+ } else {
+ $page_content = $revision->getTransformedContent();
 }
 } else {
- $page_content = $revision->getTransformedContent();
- }
- } else {
 $page_content = $revision->getTransformedContent();
 }
 
@@ -390,44 +388,44 @@
 /* Only single page versions. rss only if not already handled by RecentChanges.
 */
 if (!$format or $format == 'html' or $format == 'sidebar' or $format == 'contribs') {
- $template->printExpansion($toks);
+ $template->printExpansion($toks);
 } else {
- // No pagelist here. Single page version only
- require_once("lib/PageList.php");
- $pagelist = new PageList();
- $pagelist->addPage($page);
- if ($format == 'pdf') {
- require_once("lib/pdf.php");
- $request->setArg('format','');
- ConvertAndDisplayPdfPageList($request, $pagelist);
- // time-sorted rdf a la RecentChanges
- } elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
- //$request->setArg('format','');
+ // No pagelist here. Single page version only
+ require_once("lib/PageList.php");
+ $pagelist = new PageList();
+ $pagelist->addPage($page);
+ if ($format == 'pdf') {
+ require_once("lib/pdf.php");
+ $request->setArg('format','');
+ ConvertAndDisplayPdfPageList($request, $pagelist);
+ // time-sorted rdf a la RecentChanges
+ } elseif (in_array($format, array("rss91","rss2","rss","atom"))) {
+ //$request->setArg('format','');
 if ($pagename == _("RecentChanges"))
 $template->printExpansion($toks);
 else {
- require_once("lib/plugin/RecentChanges.php");
+ require_once("lib/plugin/RecentChanges.php");
 $plugin = new WikiPlugin_RecentChanges();
 $args = $request->getArgs();
 return $plugin->format($plugin->getChanges($request->_dbi, $args), $args);
 }
- } elseif ($format == 'rdf') { // all semantic relations and attributes
- require_once("lib/SemanticWeb.php");
- $rdf = new RdfWriter($request, $pagelist);
- $rdf->format();
- } elseif ($format == 'owl') { // or daml?
- require_once("lib/SemanticWeb.php");
- $rdf = new OwlWriter($request, $pagelist);
- $rdf->format();
- } elseif ($format == 'json') { // include page content asynchronously
- $request->setArg('format','');
- if ($page->exists())
+ } elseif ($format == 'rdf') { // all semantic relations and attributes
+ require_once("lib/SemanticWeb.php");
+ $rdf = new RdfWriter($request, $pagelist);
+ $rdf->format();
+ } elseif ($format == 'owl') { // or daml?
+ require_once("lib/SemanticWeb.php");
+ $rdf = new OwlWriter($request, $pagelist);
+ $rdf->format();
+ } elseif ($format == 'json') { // include page content asynchronously
+ $request->setArg('format','');
+ if ($page->exists())
 $content = $page_content->asXML();
 else
 $content = '';
- $req_args = $request->args;
- unset($req_args['format']);
- // no meta-data so far, just the content
+ $req_args = $request->args;
+ unset($req_args['format']);
+ // no meta-data so far, just the content
 $json = array('content' => $content,
 'args' => $req_args,
 'phpwiki-version' => PHPWIKI_VERSION);
@@ -440,13 +438,13 @@
 }
 header("Content-Type: application/json");
 die($json_enc);
- } else {
- if (!in_array($pagename, array(_("LinkDatabase"))))
- trigger_error(sprintf(_("Unsupported argument: %s=%s"),"format",$format),
+ } else {
+ if (!in_array($pagename, array(_("LinkDatabase"))))
+ trigger_error(sprintf(_("Unsupported argument: %s=%s"),"format",$format),
 E_USER_WARNING);
- $template->printExpansion($toks);
+ $template->printExpansion($toks);
+ }
 }
- }
 
 $page->increaseHitCount();
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年05月20日 10:41:06
Revision: 8084
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8084&view=rev
Author: vargenau
Date: 2011年05月20日 10:40:59 +0000 (2011年5月20日)
Log Message:
-----------
Tell Google (and others) to ignore e.g. MyPage?action=diff
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年05月20日 09:29:40 UTC (rev 8083)
+++ trunk/lib/display.php	2011年05月20日 10:40:59 UTC (rev 8084)
@@ -220,7 +220,14 @@
 global $robots;
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
+ $action = $request->getArg('action');
 $page = $request->getPage();
+
+ /* Tell Google (and others) to ignore e.g. MyPage?action=diff */
+ if ($action) {
+ $robots = "noindex,nofollow";
+ $toks['ROBOTS_META'] = $robots;
+ }
 if ($version) {
 $revision = $page->getRevision($version);
 if (!$revision)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2011年05月20日 12:58:55
Revision: 8086
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8086&view=rev
Author: vargenau
Date: 2011年05月20日 12:58:49 +0000 (2011年5月20日)
Log Message:
-----------
Revert
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年05月20日 10:53:54 UTC (rev 8085)
+++ trunk/lib/display.php	2011年05月20日 12:58:49 UTC (rev 8086)
@@ -220,14 +220,8 @@
 global $robots;
 $pagename = $request->getArg('pagename');
 $version = $request->getArg('version');
- $action = $request->getArg('action');
 $page = $request->getPage();
 
- /* Tell Google (and others) to ignore e.g. MyPage?action=diff */
- if ($action) {
- $robots = "noindex,nofollow";
- $toks['ROBOTS_META'] = $robots;
- }
 if ($version) {
 $revision = $page->getRevision($version);
 if (!$revision)
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:23:55
Revision: 8173
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8173&view=rev
Author: vargenau
Date: 2011年11月04日 09:23:48 +0000 (2011年11月04日)
Log Message:
-----------
Add class to error message; add warningmsg like errormsg
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2011年11月02日 15:22:12 UTC (rev 8172)
+++ trunk/lib/display.php	2011年11月04日 09:23:48 UTC (rev 8173)
@@ -295,8 +295,13 @@
 RedirectorLink($redirect_from)));
 // abuse the $redirected template var for some status update notice
 } elseif ($request->getArg('errormsg')) {
- $redirect_message = $request->getArg('errormsg');
+ $redirect_message = HTML::p(array('class' => 'error'),
+ $request->getArg('errormsg'));
 $request->setArg('errormsg', false);
+ } elseif ($request->getArg('warningmsg')) {
+ $redirect_message = HTML::p(array('class' => 'warning_msg'),
+ $request->getArg('warningmsg'));
+ $request->setArg('errormsg', false);
 }
 
 $request->appendValidators(array('pagerev' => $revision->getVersion(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2017年08月10日 14:23:34
Revision: 10027
 http://sourceforge.net/p/phpwiki/code/10027
Author: vargenau
Date: 2017年08月10日 14:23:31 +0000 (2017年8月10日)
Log Message:
-----------
No self-closing <div>
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2017年08月10日 14:22:04 UTC (rev 10026)
+++ trunk/lib/display.php	2017年08月10日 14:23:31 UTC (rev 10027)
@@ -260,7 +260,7 @@
 $request->finish();
 } else {
 $request->cacheControl();
- echo('<div style="display:none;" />');
+ echo('<div style="display:none;"></div>');
 $request->_is_buffering_output = false; // avoid wrong Content-Length with errors
 $request->finish();
 exit();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2021年09月20日 09:14:34
Revision: 10576
 http://sourceforge.net/p/phpwiki/code/10576
Author: vargenau
Date: 2021年09月20日 09:14:32 +0000 (2021年9月20日)
Log Message:
-----------
Simpler test
Modified Paths:
--------------
 trunk/lib/display.php
Modified: trunk/lib/display.php
===================================================================
--- trunk/lib/display.php	2021年09月20日 09:12:29 UTC (rev 10575)
+++ trunk/lib/display.php	2021年09月20日 09:14:32 UTC (rev 10576)
@@ -208,7 +208,7 @@
 $rdf = new OwlWriter($request, $pagelist);
 $rdf->format();
 } else {
- if (!in_array($pagename, array(_("LinkDatabase"))))
+ if ($pagename != _("LinkDatabase"))
 trigger_error(sprintf(_("Unsupported argument: %s=%s"), "format", $format),
 E_USER_WARNING);
 $template = Template('browse', array('CONTENT' => $transformedContent));
@@ -441,7 +441,7 @@
 header("Content-Type: application/json");
 die($json_enc);
 } else {
- if (!in_array($pagename, array(_("LinkDatabase"))))
+ if ($pagename != _("LinkDatabase"))
 trigger_error(sprintf(_("Unsupported argument: %s=%s"), "format", $format),
 E_USER_WARNING);
 $template->printExpansion($toks);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
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 によって変換されたページ (->オリジナル) /