From 18570279efdbdfd171e16d9948175fb0b959546a Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 14 Apr 2006 22:15:24 +0000 Subject: merge r1175 from branch-1_6 into trunk fix: sessions css 3px image border goes from both clear and dark to image.css git-svn-id: http://piwigo.org/svn/trunk@1176 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_session.inc.php | 17 ++++++++++++++--- template/yoga/image.css | 7 ++++++- template/yoga/theme/clear/theme.css | 4 ++-- template/yoga/theme/dark/theme.css | 4 ++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php index f2533d1d1..96508a923 100644 --- a/include/functions_session.inc.php +++ b/include/functions_session.inc.php @@ -165,14 +165,25 @@ UPDATE '.SESSIONS_TABLE.' WHERE id = \''.$session_id.'\' ;'; pwg_query($query); - if ( mysql_affected_rows()==-1 ) - { + if ( mysql_affected_rows()==0 ) + { // 2 possible cases: + //- the user has just login so we need to insert + //- the user went through 2 pages very fast (in the same second), so + // data and expiration are the same as before $query = ' +SELECT id FROM '.SESSIONS_TABLE.' + WHERE id = \''.$session_id.'\' +;'; + $id = array_from_query( $query, array('id') ); + if ( empty($id) ) + { + $query = ' INSERT INTO '.SESSIONS_TABLE.' (id,data,expiration) VALUES(\''.$session_id.'\',\''.$data.'\',now()) ;'; - pwg_query($query); + pwg_query($query); + } } return true; } diff --git a/template/yoga/image.css b/template/yoga/image.css index a7c8dfa83..0d242a1bd 100644 --- a/template/yoga/image.css +++ b/template/yoga/image.css @@ -65,6 +65,11 @@ de l'image... margin: 0 auto; } +#theImage IMG { + border-width: 3px; + border-style: solid; +} + .navThumb { margin-top: 2px; } @@ -96,7 +101,7 @@ TABLE.infoTable .value { TABLE.infoTable .label { font-weight: bold; text-align: right; - padding-right: 0.5em; + padding-right: 0.5em; } TABLE.infoTable TD.value UL { diff --git a/template/yoga/theme/clear/theme.css b/template/yoga/theme/clear/theme.css index 31e88d90d..1260ce776 100644 --- a/template/yoga/theme/clear/theme.css +++ b/template/yoga/theme/clear/theme.css @@ -19,13 +19,13 @@ H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover { } /* borders */ -#menubar DL, #content, #imageToolBar, #theImage IMG, +#menubar DL, #content, #imageToolBar, #comments DIV.comment BLOCKQUOTE { border: 1px solid #d3d3d3; } #theImage IMG { - border-width: 3px; + border-color: #d3d3d3; } #content UL.thumbnail IMG { diff --git a/template/yoga/theme/dark/theme.css b/template/yoga/theme/dark/theme.css index 2bbe9533b..409b3773f 100644 --- a/template/yoga/theme/dark/theme.css +++ b/template/yoga/theme/dark/theme.css @@ -46,13 +46,13 @@ H2, #menubar DT, .throw { } /* borders */ -#menubar DL, #content, #imageToolBar, #theImage IMG, +#menubar DL, #content, #imageToolBar, #comments DIV.comment BLOCKQUOTE { border: 1px solid #000000; } #theImage IMG { - border-width: 3px; + border-color: #000000; } #content UL.thumbnail IMG { -- cgit v1.2.3