aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_session.inc.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-11-22 23:33:17 +0000
committerpatdenice <patdenice@piwigo.org>2008-11-22 23:33:17 +0000
commit61d8bf79c169e601b480bf54fc393c453b8874a0 (patch)
treef0485e149a81af666dc65672986aab081f335d7c /include/functions_session.inc.php
parentc612fd5074defafd3c56749d16b86cef1e539012 (diff)
- Bug fixed: username or password with accented character are now accepted for upgrade.
- Simplify query in pwg_session_write function. - Retrieve data with cURL method in fetchRemote function now work with forwarded URL. git-svn-id: http://piwigo.org/svn/trunk@2900 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_session.inc.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index 728fc8fba..dd3e1b24c 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -131,18 +131,7 @@ SELECT data
function pwg_session_write($session_id, $data)
{
$query = '
-UPDATE '.SESSIONS_TABLE.'
- SET expiration = now(),
- data = \''.$data.'\'
- WHERE id = \''.get_remote_addr_session_hash().$session_id.'\'
-;';
- pwg_query($query);
- if ( mysql_affected_rows()>0 )
- {
- return true;
- }
- $query = '
-INSERT INTO '.SESSIONS_TABLE.'
+REPLACE INTO '.SESSIONS_TABLE.'
(id,data,expiration)
VALUES(\''.get_remote_addr_session_hash().$session_id.'\',\''.$data.'\',now())
;';