projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gestione exit concordato e lascio della mano
[brisk.git]
/
web
/
index_rd.php
diff --git
a/web/index_rd.php
b/web/index_rd.php
index
994fe87
..
a8771d5
100644
(file)
--- a/
web/index_rd.php
+++ b/
web/index_rd.php
@@
-17,11
+17,13
@@
* not, write to the Free Software Foundation, Inc, 59 Temple Place -
* Suite 330, Boston, MA 02111-1307, USA.
*
* not, write to the Free Software Foundation, Inc, 59 Temple Place -
* Suite 330, Boston, MA 02111-1307, USA.
*
+ * $Id$
+ *
*/
require_once("brisk.phh");
*/
require_once("brisk.phh");
-log_load($sess, "LOAD: index_rd.php
"
);
+log_load($sess, "LOAD: index_rd.php
".$QUERY_STRING
);
$first_loop = TRUE;
$the_end = FALSE;
$first_loop = TRUE;
$the_end = FALSE;
@@
-44,7
+46,7
@@
function unrecerror()
GLOBAL $is_page_streaming;
$is_page_streaming = TRUE;
GLOBAL $is_page_streaming;
$is_page_streaming = TRUE;
- return (sprintf('the_end=true; document.location.assign("index.php");'));
+ return (sprintf('the_end=true;
window.onunload = null;
document.location.assign("index.php");'));
}
}
@@
-59,15
+61,18
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
/* Sync check (read only without modifications */
/* Sync check (read only without modifications */
+ ignore_user_abort(TRUE);
if (($sem = lock_data()) != FALSE) {
$bri = &load_data();
// Aggiorna l'expire time lato server
if ($first_loop == TRUE) {
if (($sem = lock_data()) != FALSE) {
$bri = &load_data();
// Aggiorna l'expire time lato server
if ($first_loop == TRUE) {
- if (($user = &get_user($bri, $sess, $idx)) == FALSE) {
+ if (($user = &$bri->get_user($sess, $idx)) == FALSE) {
+ unlock_data($sem);
+ ignore_user_abort(FALSE);
return (unrecerror());
}
log_auth($sess, "update lacc");
return (unrecerror());
}
log_auth($sess, "update lacc");
- $user->lacc = time()
+ EXPIRE_TIME
;
+ $user->lacc = time();
save_data($bri);
$first_loop = FALSE;
save_data($bri);
$first_loop = FALSE;
@@
-77,11
+82,13
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
save_data($bri);
}
unlock_data($sem);
save_data($bri);
}
unlock_data($sem);
+ ignore_user_abort(FALSE);
}
}
- else
+ else
{
return (FALSE);
return (FALSE);
+ }
- if (($user = &
get_user(&$bri,
$sess, $idx)) == FALSE) {
+ if (($user = &
$bri->get_user(
$sess, $idx)) == FALSE) {
return (unrecerror());
}
return (unrecerror());
}
@@
-93,9
+100,12
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
if ($cur_step == -1) {
// FUNZIONE from_scratch DA QUI
if ($cur_step == -1) {
// FUNZIONE from_scratch DA QUI
+ ignore_user_abort(TRUE);
$sem = lock_data();
$bri = &load_data();
$sem = lock_data();
$bri = &load_data();
- if (($user = &get_user($bri, $sess, $idx)) == FALSE) {
+ if (($user = &$bri->get_user($sess, $idx)) == FALSE) {
+ unlock_data($sem);
+ ignore_user_abort(FALSE);
return (unrecerror());
}
if ($user->the_end)
return (unrecerror());
}
if ($user->the_end)
@@
-110,9
+120,12
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
save_data($bri);
unlock_data($sem);
save_data($bri);
unlock_data($sem);
+ ignore_user_abort(FALSE);
}
else {
log_rd2($sess, "TRANS NON ATTIVATO");
}
else {
log_rd2($sess, "TRANS NON ATTIVATO");
+ unlock_data($sem);
+ ignore_user_abort(FALSE);
}
}
}
}
@@
-138,13
+151,14
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
$new_stat = $user->stat;
$new_subst = $user->subst;
$new_step = $user->step;
$new_stat = $user->stat;
$new_subst = $user->subst;
$new_step = $user->step;
-
- unlock_data($sem);
}
else {
}
else {
+ ignore_user_abort(TRUE);
$sem = lock_data();
$bri = &load_data();
$sem = lock_data();
$bri = &load_data();
- if (($user = &get_user($bri, $sess, $idx)) == FALSE) {
+ if (($user = &$bri->get_user($sess, $idx)) == FALSE) {
+ unlock_data($sem);
+ ignore_user_abort(FALSE);
return (unrecerror());
}
if ($cur_step < $user->step) {
return (unrecerror());
}
if ($cur_step < $user->step) {
@@
-182,6
+196,7
@@
function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
}
unlock_data($sem);
}
unlock_data($sem);
+ ignore_user_abort(FALSE);
}
}