Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
8d723826
Commit
8d723826
authored
Jan 23, 2005
by
Dries
Browse files
- Patch
#15962
by Goba: fixed the association between the accesslog data and the nodes.
parent
a3322283
Changes
3
Hide whitespace changes
Inline
Side-by-side
database/updates.inc
View file @
8d723826
...
...
@@ -1307,9 +1307,12 @@ function update_95() {
function
update_96
()
{
$ret
=
array
();
$ret
[]
=
update_sql
(
'ALTER TABLE {accesslog} DROP nid'
);
$ret
[]
=
update_sql
(
'ALTER TABLE {accesslog} ADD title VARCHAR(255) DEFAULT NULL'
);
$ret
[]
=
update_sql
(
'ALTER TABLE {accesslog} ADD path VARCHAR(255) DEFAULT NULL'
);
$ret
[]
=
update_sql
(
'UPDATE {accesslog} SET path = CONCAT("node/", nid) WHERE nid != 0'
);
$ret
[]
=
update_sql
(
'ALTER TABLE {accesslog} ADD title VARCHAR(255) DEFAULT NULL'
);
/* Only supported by MySQL 4.0.4 and up
$ret[] = update_sql('UPDATE {accesslog} a, {node} n SET a.title = n.title WHERE a.nid = n.nid');*/
$ret
[]
=
update_sql
(
'ALTER TABLE {accesslog} DROP nid'
);
if
(
$GLOBALS
[
'db_type'
]
==
'mysql'
)
{
$ret
[]
=
update_sql
(
"ALTER TABLE
{
menu
}
ADD description varchar(255) DEFAULT '' NOT NULL"
);
...
...
modules/statistics.module
View file @
8d723826
...
...
@@ -74,10 +74,9 @@ function statistics_exit() {
// Statistical logs are enabled.
$referrer
=
referer_uri
();
$hostname
=
$_SERVER
[
'REMOTE_ADDR'
];
$path
=
(
drupal_get_path_alias
(
$_GET
[
'q'
]))
?
drupal_get_path_alias
(
$_GET
[
'q'
])
:
$_GET
[
'q'
];
// Log this page access.
db_query
(
"INSERT INTO
{
accesslog
}
(title, path, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', %d, %d)"
,
drupal_get_title
(),
$
path
,
$referrer
,
$hostname
,
$user
->
uid
,
time
());
db_query
(
"INSERT INTO
{
accesslog
}
(title, path, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', %d, %d)"
,
drupal_get_title
(),
$
_GET
[
'q'
]
,
$referrer
,
$hostname
,
$user
->
uid
,
time
());
}
}
...
...
modules/statistics/statistics.module
View file @
8d723826
...
...
@@ -74,10 +74,9 @@ function statistics_exit() {
// Statistical logs are enabled.
$referrer
=
referer_uri
();
$hostname
=
$_SERVER
[
'REMOTE_ADDR'
];
$path
=
(
drupal_get_path_alias
(
$_GET
[
'q'
]))
?
drupal_get_path_alias
(
$_GET
[
'q'
])
:
$_GET
[
'q'
];
// Log this page access.
db_query
(
"INSERT INTO
{
accesslog
}
(title, path, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', %d, %d)"
,
drupal_get_title
(),
$
path
,
$referrer
,
$hostname
,
$user
->
uid
,
time
());
db_query
(
"INSERT INTO
{
accesslog
}
(title, path, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', %d, %d)"
,
drupal_get_title
(),
$
_GET
[
'q'
]
,
$referrer
,
$hostname
,
$user
->
uid
,
time
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment