X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/719a15658a3577b6682bd8d2f96b66b6d6539bbc..0e5e7aea287526fc2bb0da2abb571a9e5d0a0e74:/include/session.inc diff --git a/include/session.inc b/include/session.inc index dc90943..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 || (! isset($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']; } - } - } } ?>