File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -405,8 +405,12 @@ public function __construct($config = 'rest')
405405 // when output is displayed for not damaging data accidentally
406406 $ this ->output ->parse_exec_vars = FALSE ;
407407
408- // Start the timer for how long the request takes
409- $ this ->_start_rtime = microtime (TRUE );
408+ // Log the loading time to the log table
409+ if ($ this ->config ->item ('rest_enable_logging ' ) === TRUE )
410+ {
411+ // Start the timer for how long the request takes
412+ $ this ->_start_rtime = microtime (TRUE );
413+ }
410414
411415 // Load the rest.php configuration file
412416 $ this ->get_local_config ($ config );
@@ -626,12 +630,12 @@ private function get_local_config($config_file)
626630 */
627631 public function __destruct ()
628632 {
629- // Get the current timestamp
630- $ this ->_end_rtime = microtime (TRUE );
631-
632633 // Log the loading time to the log table
633634 if ($ this ->config ->item ('rest_enable_logging ' ) === TRUE )
634635 {
636+ // Get the current timestamp
637+ $ this ->_end_rtime = microtime (TRUE );
638+
635639 $ this ->_log_access_time ();
636640 }
637641 }
You can’t perform that action at this time.
0 commit comments