aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-09-18 21:56:56 +0000
committerplegall <plg@piwigo.org>2005-09-18 21:56:56 +0000
commitb1c5e25b5e4eed872230ebffe72cc7ece4533ee2 (patch)
tree9cd046c0f62256e839f18a7d8a88e67531d00c2c /include/functions.inc.php
parent2e8a34adc77cad3c4a8592057a2dd88e6f090e36 (diff)
- bug 107 fixed: crash when logging visit on a category containing "'"
character. Correction reported from branch 1.4 - bug fixed: in admin/stats, incorrect SQL queries gave no result. git-svn-id: http://piwigo.org/svn/trunk@868 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 5fb2fc263..ae5f46415 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -359,11 +359,11 @@ INSERT INTO '.HISTORY_TABLE.'
(date,login,IP,file,category,picture)
VALUES
(NOW(),
- \''.(($user['id'] == 2) ? 'guest' : $user['username']).'\',
+ \''.(($user['id'] == 2) ? 'guest' : addslashes($user['username'])).'\',
\''.$_SERVER['REMOTE_ADDR'].'\',
- \''.$file.'\',
- \''.$category.'\',
- \''.$picture.'\')
+ \''.addslashes($file).'\',
+ \''.addslashes($category).'\',
+ \''.addslashes($picture).'\')
;';
pwg_query($query);
}