Skip to content

Commit

Permalink
fixin looping on console with page refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
cigamit committed Apr 3, 2016
1 parent 769256c commit 4d591e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/global_session.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@
var refreshMSeconds=<?php print $myrefresh['seconds']*1000;?>;
var urlPath='<?php print $config['url_path'];?>';
var previousPage='';
var pageRefresh=0;
</script>
10 changes: 9 additions & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3130,13 +3130,21 @@ function bottom_footer() {
$('#message_container').html(message).show().delay(2000).slideUp('fast');
window.scrollTo(0,0);
}

if (pageRefresh > 0) {
refreshMSeconds=pageRefresh;
pageRefresh = 0;
}else{
refreshMSeconds=999999999;
}

</script>
<?php

/* we use this session var to store field values for when a save fails,
this way we can restore the field's previous values. we reset it here, because
they only need to be stored for a single page */
kill_session_var("sess_field_values");
kill_session_var('sess_field_values');

/* close the session */
session_write_close();
Expand Down

0 comments on commit 4d591e5

Please sign in to comment.