File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,10 @@ protected function OnUpdate(\stdClass $update) : bool
9292 if ($ this ->Settings ->AutoHandleDuplicateUpdates )
9393 {
9494 # Sooner than two weeks, Check the ID
95- if ($ this ->Settings ->LastUpdateDate > strtotime ('-2 weeks ' ))
95+ if ($ this ->Settings ->LastUpdateDate > strtotime ('-1 week ' ))
9696 {
9797 # Check if update is in the write order
98- if ($ this ->Settings ->LastUpdateID == $ update ->update_id - 1 || $ this ->Settings ->LastUpdateID == -1 )
98+ if ($ this ->Settings ->LastUpdateID < $ update ->update_id || $ this ->Settings ->LastUpdateID == -1 )
9999 {
100100 $ this ->Settings ->LastUpdateID = $ update ->update_id ;
101101 $ this ->Settings ->LastUpdateDate = time ();
@@ -111,7 +111,7 @@ protected function OnUpdate(\stdClass $update) : bool
111111 # Otherwise, Don't check the ID, Take it as it is
112112 else
113113 {
114- $ this ->Settings ->LastUpdateID = $ update ->update_id ;
114+ $ this ->Settings ->LastUpdateID = max ( $ this -> Settings -> LastUpdateID , $ update ->update_id ) ;
115115 $ this ->Settings ->LastUpdateDate = time ();
116116 }
117117 }
You can’t perform that action at this time.
0 commit comments