X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/a4f105d41d06053ff3a7b52572bd818b1a027149..40b00377877560ee2c6c4d5a771824059deac819:/include/session.inc diff --git a/include/session.inc b/include/session.inc index 288c798..46802f4 100644 --- a/include/session.inc +++ b/include/session.inc @@ -23,18 +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( $session['id'] != $SESSIONS_actual ) { $SESSIONS_last = $session['id']; } + 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']; } - } - } } ?>