Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1226
Modified Files:
serendipity_editor.js serendipity_functions_installer.inc.php
Log Message:
Fixed JS error for image insertion
Better installer errorhandler detection
Index: serendipity_editor.js
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_editor.js,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- serendipity_editor.js 26 Apr 2004 10:33:20 -0000 1.9
+++ serendipity_editor.js 4 May 2004 08:57:38 -0000 1.10
@@ -147,7 +147,7 @@
img = f['imgName'].value;
}
- if (f['serendipity[filename_only]'].value == 'true') {
+ if (f['serendipity[filename_only]'] && f['serendipity[filename_only]'].value == 'true') {
self.opener.serendipity_imageSelector_addToElement(img, f['serendipity[htmltarget]'].value);
self.close();
return true;
Index: serendipity_functions_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions_installer.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- serendipity_functions_installer.inc.php 13 Apr 2004 10:55:07 -0000 1.7
+++ serendipity_functions_installer.inc.php 4 May 2004 08:57:38 -0000 1.8
@@ -239,6 +239,7 @@
$old_htaccess = @file_get_contents('./.htaccess');
$fp = @fopen('./.htaccess', 'w');
$serendipity_root = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);
+ $serendipity_host = preg_replace('@^([^:]+):?.*$@', '\1', $_SERVER['HTTP_HOST']);
if (!$fp) {
printf(HTACCESS_ERROR,
@@ -250,11 +251,14 @@
fclose($fp);
// Do a request on a nonexistant file to see, if our htaccess allows ErrorDocument
- $sock = fsockopen(preg_replace('@^([^:]+):?.*$@', '\1', $_SERVER['HTTP_HOST']), $_SERVER['SERVER_PORT'], $errorno, $errorstring, 10);
+ $sock = fsockopen($serendipity_host, $_SERVER['SERVER_PORT'], $errorno, $errorstring, 10);
$response = '';
if ($sock) {
- fputs($sock, "GET {$_SERVER['REQUEST_URI']}nonexistant HTTP/1.0\n\n");
+ fputs($sock, "GET {$_SERVER['REQUEST_URI']}nonexistant HTTP/1.0\n");
+ fputs($sock, "Host: $serendipity_host\n");
+ fputs($sock, "Connection: close\n\n");
+
while (!feof($sock) && strlen($response) < 4096) {
$response .= fgets($sock, 400);
}
|