X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/64d981a433d9990d4c5ff9454464a520e169adfd..HEAD:/include/session.inc diff --git a/include/session.inc b/include/session.inc index 787d644..46802f4 100644 --- a/include/session.inc +++ b/include/session.inc @@ -23,17 +23,14 @@ if($SESSIONS_actual == -1) unset($SESSIONS_actual); $SESSIONS_totex = 0; + $SESSIONS_totex_nextinc = 0; if(isset($SESSIONS)) { foreach ($SESSIONS as $session) { - if($session['id'] < $SESSIONS_next) { $SESSIONS_totex += $session['nexamples']; } + if( (! isset($SESSIONS_next)) || $session['id'] < $SESSIONS_next ) { $SESSIONS_totex += $session['nexamples']; } + if( (! isset($SESSIONS_actual)) || $session['id'] != $SESSIONS_actual ) { $SESSIONS_last = $session['id']; } + if( (! isset($SESSIONS_next)) || $session['id'] <= $SESSIONS_next ) { $SESSIONS_totex_nextinc += $session['nexamples']; } } } - $SESSIONS_totex_nextinc = 0; - if( isset($SESSIONS) && isset($SESSIONS_next) ) { - foreach ($SESSIONS as $session) { - if($session['id'] <= $SESSIONS_next) { $SESSIONS_totex_nextinc += $session['nexamples']; } - } - } } ?>