SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Geoffrey T. D. <da...@us...> - 2001年02月08日 02:34:12
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10891/lib
Modified Files:
	setupwiki.php ziplib.php 
Log Message:
Convert references to footnotes when reading a zip dump
Index: setupwiki.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/setupwiki.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** setupwiki.php	2000年10月22日 19:33:35	1.3
--- setupwiki.php	2001年02月08日 02:34:32	1.4
***************
*** 38,42 ****
 		 'flags' => 0,
 		 'lastmodified' => $mtime,
- 		 'refs' => array(),
 		 'version' => 1);
 
--- 38,41 ----
Index: ziplib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/ziplib.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ziplib.php	2001年02月06日 23:16:31	1.3
--- ziplib.php	2001年02月08日 02:34:32	1.4
***************
*** 518,524 ****
 if (($flags & FLAG_PAGE_LOCKED) != 0)
 $params['flags'] = 'PAGE_LOCKED';
! for ($i = 1; $i <= NUM_LINKS; $i++) 
! if ($ref = $refs[$i])
! 	 $params["ref$i"] = rawurlencode($ref);
 
 $out = MimeContentTypeHeader('application', 'x-phpwiki', $params);
--- 518,529 ----
 if (($flags & FLAG_PAGE_LOCKED) != 0)
 $params['flags'] = 'PAGE_LOCKED';
! 
! if (is_array($refs))
! {
! // phpwiki's with versions > 1.2.x shouldn't have references.
! for ($i = 1; $i <= NUM_LINKS; $i++) 
! 	 if ($ref = $refs[$i])
! 	 $params["ref$i"] = rawurlencode($ref);
! }
 
 $out = MimeContentTypeHeader('application', 'x-phpwiki', $params);
***************
*** 665,671 ****
 if (preg_match('/PAGE_LOCKED/', $params['flags']))
 $pagehash['flags'] |= FLAG_PAGE_LOCKED;
- for ($i = 1; $i <= NUM_LINKS; $i++) 
- if ($ref = $params["ref$i"])
- 	 $pagehash['refs'][$i] = rawurldecode($ref);
 
 $encoding = strtolower($headers['content-transfer-encoding']);
--- 670,673 ----
***************
*** 674,678 ****
--- 676,699 ----
 else if ($encoding && $encoding != 'binary')
 die("Unknown encoding type: $encoding");
+ 
+ // Convert references in meta-data to footnotes.
+ // Only zip archives generated by phpwiki 1.2.x or earlier should have
+ // references.
+ $footnotes = '';
+ for ($i = 1; $i <= NUM_LINKS; $i++)
+ {
+ if (empty($params["ref$i"]))
+ 	 continue;
+ $footnotes .= sprintf(gettext ("[%d] See [%s]"),
+ 			 $i, rawurldecode($params["ref$i"])) . "\n%%%\n";
+ }
 
+ if ($footnotes)
+ {
+ $data .= "-----\n";
+ $data .= gettext ("!References") . "\n";
+ $data .= $footnotes;
+ }
+ 
 $pagehash['content'] = preg_split('/[ \t\r]*\n/', chop($data));
 
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 によって変換されたページ (->オリジナル) /