Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv19813
Modified Files:
serendipity_functions.inc.php
serendipity_admin_image_selector.php NEWS
Log Message:
Jannis made some points about the previous patch for transforming relative paths to absolute paths and problems when later changing s9y's paths.
So I reverted the patch and instead do the transformation for the RSS-feed only, with some RegEx magic. As this is possibly introducing some BC-problems I deactivated this for our 0.3 release and we should try it for 0.4
And I removed the 'fix' from the NEWS-ChangeLog.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- serendipity_functions.inc.php 30 Sep 2003 01:24:59 -0000 1.158
+++ serendipity_functions.inc.php 1 Oct 2003 11:38:22 -0000 1.159
@@ -1125,6 +1125,11 @@
} else {
$ext = '';
}
+
+ // Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (<a>, <img>, ...) references to only the serendipitypath with the full baseURL URI
+ // garvin: As this could introduce some problems, this is commented out right now.
+ // TODO: ACTIVATE FOR 0.4 RELEASE!
+ // $entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')( |>)@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6', $entry['body']);
?>
<item>
<title><?php echo utf8_encode(htmlspecialchars($entry['title'])); ?></title>
Index: serendipity_admin_image_selector.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_image_selector.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- serendipity_admin_image_selector.php 30 Sep 2003 21:40:15 -0000 1.11
+++ serendipity_admin_image_selector.php 1 Oct 2003 11:38:22 -0000 1.12
@@ -98,9 +98,9 @@
switch ($serendipity['GET']['step']) {
case '1':
$f = serendipity_parseFileName($serendipity["GET"]["image"]);
- $imgsrc = $serendipity['baseURL'] . $serendipity['uploadPath'] . $f[0] . '.' . $serendipity['thumbSuffix'] . '.' . $f[1];
- $imgName = $serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $serendipity['GET']['image'];
- $thumbName = $serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $f[0] . '.' . $serendipity['thumbSuffix'] . '.' . $f[1];
+ $imgsrc = $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $f[0] . '.' . $serendipity['thumbSuffix'] . '.' . $f[1];
+ $imgName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $serendipity['GET']['image'];
+ $thumbName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $f[0] . '.' . $serendipity['thumbSuffix'] . '.' . $f[1];
?>
<script type="text/javascript" language="JavaScript" src="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_define.js.php"></script>
<script type="text/javascript" language="Javascript" src="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_editor.js"></script>
@@ -131,7 +131,7 @@
<br />
<input type="radio" name="serendipity[isLink]" checked="checked" /> <?php echo I_WANT_NO_LINK; ?><br />
<input type="radio" name="serendipity[isLink]" /> <?php echo I_WANT_IT_TO_LINK; ?>
- <input type="text" name="serendipity[url]" size="30" value="<?php echo $serendipity['baseURL'] . $serendipity['uploadPath'] . $serendipity['GET']['image']; ?>" onfocus="value='';" /><br />
+ <input type="text" name="serendipity[url]" size="30" value="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $serendipity['GET']['image']; ?>" onfocus="value='';" /><br />
<br />
<input type="button" value="<?php echo BACK; ?>" onClick="history.go(-1);" />
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- NEWS 1 Oct 2003 09:29:02 -0000 1.30
+++ NEWS 1 Oct 2003 11:38:22 -0000 1.31
@@ -3,7 +3,6 @@
Version 0.3 (October 1, 2003)
------------------------------------
* Fixed evaluation of the 'embed' variable and added a small 'HowTo' to the INSTALL file (garvinhicking)
- * Fixed links to images now containing absolute URI to maintain RSS-feed validity. Relative URIs are not allowed/visible within RSS feeds. (garvinhicking)
* Fixed problem with escaping single quotes during installation (tomsommer)
* Fixed problem with dual-trailing slashes in paths during installation (tomsommer)
* Configuration/installation will now save the current s9y version to the config file... Thereby allowing upgrades at a later point (tomsommer)
|