merge -c2900 from trunk to branch 2.0.

- 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/branches/2.0@2901 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2008-11-22 23:34:58 +00:00
parent b75ddb8e9a
commit a1e6ae0f15
3 changed files with 22 additions and 24 deletions
+1 -12
View File
@@ -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())
;';