Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv1766
Modified Files:
serendipity_functions.inc.php serendipity_config.inc.php
Log Message:
Be cool like MoveableType and send our User-Agent with our trackbacks
Also added $serendipitt['version'] (currently: 0.3-cvs)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- serendipity_functions.inc.php 8 Aug 2003 14:56:36 -0000 1.115
+++ serendipity_functions.inc.php 8 Aug 2003 20:50:50 -0000 1.116
@@ -1156,6 +1156,7 @@
* Send a trackback ping
*/
function _serendipity_send($loc, $data) {
+ global $serendipity;
$target = parse_url($loc);
if ($target['query'] != '') {
$target['query'] = '?' . $target['query'];
@@ -1172,6 +1173,7 @@
fwrite($sock, "POST {$target['path']}{$target['query']} HTTP/1.1\r\n");
fwrite($sock, "Host: {$target['host']}\r\n");
+ fwrite($sock, "User-Agent: Serendipity/". $serendipity['version']);
fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");
fwrite($sock, "Content-length: " . strlen($data) . "\r\n");
fwrite($sock, "Connection: close\r\n\r\n");
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- serendipity_config.inc.php 5 Aug 2003 14:07:40 -0000 1.18
+++ serendipity_config.inc.php 8 Aug 2003 20:50:50 -0000 1.19
@@ -4,11 +4,14 @@
include_once('compat.php');
ini_set('session.use_trans_sid', 0);
+$serendipity['version'] = '0.3-cvs';
$serendipity['production'] = 1;
+
// Rewrite always on
$serendipity['rewrite'] = true;
-// We need this if people want to upgrade s9y
+
+// We need this if people want to upgrade s9y
if (!isset($serendipity['templatePath'])) {
$serendipity['templatePath'] = 'templates/';
}
|