@@ -50,7 +50,7 @@ public function __construct(\phpbb\template\template $template, \phpbb\user $use
5050 $ this ->user = $ user ;
5151 $ this ->request = $ request ;
5252 $ this ->config = $ config ;
53- $ this ->time_now - time (); // assign current time.
53+ $ this ->time_now = time (); // assign current time.
5454 }
5555
5656
@@ -61,7 +61,7 @@ public function __construct(\phpbb\template\template $template, \phpbb\user $use
6161 */
6262 static public function getSubscribedEvents ()
6363 {
64- error_log ('[phpBB3 postlocalstorage] my getSubscribedEvents was called! ' );
64+ // error_log('[phpBB3 postlocalstorage] my getSubscribedEvents was called!');
6565 return [
6666 'core.modify_submit_post_data ' => 'check_expiry_time ' ,
6767 'core.posting_modify_template_vars ' => 'check_expiry_time ' ,
@@ -75,7 +75,8 @@ static public function getSubscribedEvents()
7575 */
7676 public function check_expiry_time ($ event )
7777 {
78- error_log ('[phpBB3 postlocalstorage] Dumping \$event in check_expiry_time() ' + print_r ($ event , true ));
78+ // error_log('[phpBB3 postlocalstorage] Dumping \$event in check_expiry_time()' + print_r($event, true));
79+ error_log ('[phpBB3 postlocalstorage] checking for expiry time... ' );
7980
8081 try
8182 {
@@ -92,8 +93,11 @@ public function check_expiry_time($event)
9293 error_log ('[phpBB3 postlocalstorage] Something is wrong with session_length: ' . $ e ->getMessage ());
9394 $ session_length = 0 ;
9495 }
95- // The extra 60 seconds is really just a safeguard.
96- $ session_expiry_time = $ this ->time_now + $ session_length + 60 ;
96+ $ session_expiry_time = $ this ->time_now + $ session_length ;
97+
98+ error_log ('[phpBB3 postlocalstorage] check_expiry_time: $this->time_now is ' . $ this ->time_now
99+ . ' $session_length is ' . $ session_length
100+ . '; Total is: ' . $ session_expiry_time );
97101
98102 $ this ->template ->assign_vars (array (
99103 'EXPIRY_TIME ' => $ session_expiry_time ,
0 commit comments