PluginProbe
Code Profiler – WordPress Performance Profiling and Debugging Made Easy / 1.7.4
Code Profiler – WordPress Performance Profiling and Debugging Made Easy v1.7.4
1.9.5 1.9.4 1.9.3 trunk 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 All 40 releases
← All changes | lib/menu_log.php +6 -6 trunk1.7.4 View file →
@@ -17,10 +17,8 @@
17 17
18 18 // =====================================================================
19 19 // Display the profiler's log.
20 20
21 -require __DIR__.'/class-logs.php';
22 -
23 21 // Delete the log?
24 22 if (! empty( $_POST['cp-delete-log'] ) ) {
25 23 if ( empty( $_POST['cp_nonce'] ) || ! wp_verify_nonce( $_POST['cp_nonce'], 'cp_delete_log') ) {
26 24 printf(
@@ -147,19 +145,21 @@
147 145 <table class="form-table">
148 146 <tr>
149 147 <td width="100%">
150 148 <textarea dir="auto" name="cptxtlog" class="large-text code" style="height:<?php echo $th; ?>px;" wrap="off" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"><?php
149 +
151 150 /**
152 - * Display the last HTTP response log.
151 + * Search for an eventual "last_request.1727412303.5681.log" file.
153 152 */
154 - $log = CodeProfiler_Logs::get_HTTP_log();
155 - if ( $log === false ) {
153 + $file = code_profiler_glob( CODE_PROFILER_UPLOAD_DIR, '^last_request\.\d+?\.\d+?\.log$', true );
154 + if ( empty( $file[0] ) ) {
156 155 echo "\n\n > " . esc_html__('The HTTP response log is empty.', 'code-profiler');
157 156 } else {
157 + $log = file_get_contents( $file[0] );
158 158 echo esc_textarea( $log );
159 159 }
160 160 ?></textarea>
161 - <p class="description"><?php esc_html_e('The log shows the HTTP request and its payload, the response headers and body for the last profile.', 'code-profiler') ?></p>
161 + <p class="description"><?php esc_html_e('The log shows the HTTP response headers and body for the last profile.', 'code-profiler') ?></p>
162 162 </td>
163 163 </tr>
164 164 </table>
165 165 <?php