Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv12464
Modified Files:
db.sql exit.php serendipity_functions.inc.php
Log Message:
Consistency.
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/db.sql,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- db.sql 5 Apr 2003 14:08:41 -0000 1.13
+++ db.sql 7 Apr 2003 05:52:17 -0000 1.14
@@ -72,8 +72,8 @@
port varchar(5),
path varchar(255),
query varchar(255),
- entry int(11) not null,
- PRIMARY KEY (host,day)
+ entry_id int(11) not null,
+ PRIMARY KEY (host,day,entry_id)
);
#
@@ -88,8 +88,8 @@
port varchar(5),
path varchar(255),
query varchar(255),
- entry int(11) not null,
- PRIMARY KEY (host,day)
+ entry_id int(11) not null,
+ PRIMARY KEY (host,day,entry_id)
);
#
Index: exit.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/exit.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- exit.php 5 Apr 2003 14:08:42 -0000 1.2
+++ exit.php 7 Apr 2003 05:52:18 -0000 1.3
@@ -1,19 +1,19 @@
<?php
include_once 'serendipity_config.inc.php';
-$entry = 0;
-$url = $serendipity['baseURL'];
+$entry_id = 0;
+$url = $serendipity['baseURL'];
if ( isset($_GET['url']) &&
!empty($_GET['url'])) {
- if ( isset($_GET['entry']) &&
- !empty($_GET['entry'])) {
- $entry = $_GET['entry'];
+ if ( isset($_GET['entry_id']) &&
+ !empty($_GET['entry_id'])) {
+ $entry_id = $_GET['entry_id'];
}
$url = str_replace('&', '&', base64_decode($_GET['url']));
- serendipity_track_url('exits', $url, $entry);
+ serendipity_track_url('exits', $url, $entry_id);
}
header('Location: ' . $url);
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- serendipity_functions.inc.php 7 Apr 2003 05:44:17 -0000 1.31
+++ serendipity_functions.inc.php 7 Apr 2003 05:52:18 -0000 1.32
@@ -487,7 +487,7 @@
return("<tt>".str_replace(' ', ' ', $arg[1])."</tt>");
}
-function serendipity_markup_text($str, $entry = 0) {
+function serendipity_markup_text($str, $entry_id = 0) {
global $serendipity;
$ret = $str;
@@ -521,7 +521,7 @@
$ret = preg_replace('/([\\\])([*#_|^@%])/', '\2', $ret);
if ($serendipity['track_exits']) {
- $serendipity['encodeExitsCallback_entry'] = $entry;
+ $serendipity['encodeExitsCallback_entry_id'] = $entry_id;
$ret = preg_replace_callback(
"#<a href=(\"|')http://([^\"']+)(\"|')#im",
@@ -540,7 +540,7 @@
function serendipity_encodeExitsCallback($buffer) {
global $serendipity;
- $entry = $serendipity['encodeExitsCallback_entry'];
+ $entry = $serendipity['encodeExitsCallback_entry_id'];
$url = 'http://' . $buffer[2];
return sprintf(
@@ -548,7 +548,7 @@
$serendipity['baseURL'],
base64_encode($url),
- ($entry != 0) ? '&entry=' . $entry : '',
+ ($entry_id != 0) ? '&entry_id=' . $entry_id : '',
$url,
$url
);
@@ -1457,7 +1457,7 @@
serendipity_db_query($gc);
}
-function serendipity_track_url($list, $url, $entry = 0) {
+function serendipity_track_url($list, $url, $entry_id = 0) {
global $serendipity;
$url_parts = parse_url($url);
@@ -1480,7 +1480,7 @@
$url_parts['port'],
$url_parts['path'],
$url_parts['query'],
- ($entry != 0) ? "AND entry = '$entry'" : ''
+ ($entry_id != 0) ? "AND entry_id = '$entry_id'" : ''
)
);
@@ -1491,13 +1491,13 @@
(day, count, scheme, host, port, path, query%s)
VALUES ( NOW(), 1, '%s', '%s', '%s', '%s', '%s'%s)",
$serendipity['dbPrefix'] . $list,
- ($entry != 0) ? ', entry' : '',
+ ($entry_id != 0) ? ', entry_id' : '',
$url_parts['scheme'],
$url_parts['host'],
$url_parts['port'],
$url_parts['path'],
$url_parts['query'],
- ($entry != 0) ? ", '$entry'" : ''
+ ($entry_id != 0) ? ", '$entry_id'" : ''
)
);
}
|