mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 17:07:17 +00:00
Fix for infinite refreshing
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
// make sure we only run the automation script once and wait until it's done,
|
// make sure we only run the automation script once and wait until it's done,
|
||||||
// so concurrent AJAX calls from many different users won't overload the server
|
// so concurrent AJAX calls from many different users won't overload the server
|
||||||
if ( !defined('AUTOMATION_MANUAL_RUN') ) {
|
if ( !defined('AUTOMATION_MANUAL_RUN') ) {
|
||||||
|
if(defined('AUTOMATION_LOCK_FILE_NAME')){
|
||||||
if ( file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
if ( file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
||||||
// check that the file is not too old, in which case our PHP script hung
|
// check that the file is not too old, in which case our PHP script hung
|
||||||
// and we need to remove the lock and run automation again
|
// and we need to remove the lock and run automation again
|
||||||
@@ -36,6 +37,7 @@ if ( !defined('AUTOMATION_MANUAL_RUN') ) {
|
|||||||
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include_once("Database.php");
|
include_once("Database.php");
|
||||||
include_once("Data/buidata.php");
|
include_once("Data/buidata.php");
|
||||||
|
|||||||
Reference in New Issue
Block a user