Changeset 733446
- Timestamp:
- 06/28/2013 10:54:49 AM (13 years ago)
- Location:
- askapache-debug-viewer/trunk
- Files:
-
- 4 edited
-
askapache-debug-viewer.php (modified) (7 diffs)
-
f/admin.css (modified) (2 diffs)
-
f/admin.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
askapache-debug-viewer/trunk/askapache-debug-viewer.php
r673624 r733446 7 7 * Author: askapache 8 8 * Contributors: askapache 9 * Version: 2.9 10 * Updated: 0 2/26/20139 * Version: 2.9.1 10 * Updated: 06/26/2013 11 11 * Requires at least: 3.1.0 12 * Tested up to: 3.5. 112 * Tested up to: 3.5.2 13 13 * Tags: debug, debugging, error, errors, issue, help, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 14 14 * WordPress URI: http://wordpress.org/extend/plugins/askapache-debug-viewer/ … … 2096 2096 2097 2097 $oa=array(); 2098 $oa['wp_query']=$wp_query; 2099 $oa['wp_the_query']=$wp_the_query; 2098 2100 $oa['wp_actions']=$wp_actions; 2099 2101 … … 2106 2108 $oa['merged_filters']=$merged_filters; 2107 2109 $oa['wp_rewrite']=$wp_rewrite; 2108 $oa['wp_query']=$wp_query;2109 $oa['wp_the_query']=$wp_the_query;2110 2110 $oa['wp']=$wp; 2111 2111 $oa['wpdb']=$wpdb; … … 2179 2179 $this->t(__FILE__,__CLASS__,__FUNCTION__,__LINE__,'',5); 2180 2180 2181 return '<pre class="aa_pre2" >'.$out."\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n".'</pre>';2181 return '<pre class="aa_pre2" style="height:'.absint($this->options['display_height']).'px;">'.$out."\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n".'</pre>'; 2182 2182 } 2183 2183 … … 2189 2189 global $wpdb; 2190 2190 2191 $mesg='<p><code>define(\'SAVEQUERIES\', true);</code>' . __('in your') . ' <code>wp-config.php</code></p>'; 2192 $out = ''; 2191 $mesg = (!defined('SAVEQUERIES') || !SAVEQUERIES) ? '<p><code>define(\'SAVEQUERIES\', true);</code>' . __('in your') . ' <code>wp-config.php</code></p>' : ''; 2192 2193 $oa=''; 2193 2194 if ($wpdb->queries) { 2194 2195 $x = 0; 2195 2196 $total_time = (timer_stop( false, 22 ) +1); 2196 2197 $total_query_time = 0; 2197 $class = '';2198 $out .= '<ol>' . "\n";2199 2198 2200 2199 foreach ($wpdb->queries as $q) { 2201 $class = ( $x % 2 != 0 ) ? '' : ' class="alt"';2202 2200 $q[0] = trim( ereg_replace('[[:space:]]+', ' ', $q[0]) ); 2203 2201 $total_query_time += $q[1]; 2204 $out .= "<li>"; 2205 if ( isset($q[1]) ) $out .= '<strong title=\''.$q[1].'\'>' . __('Query:') . '</strong> ' . htmlentities( $q[0] ); 2206 if ( isset($q[2]) ) $out .= '<br /><strong>' . __('Call from:') . '</strong> ' . htmlentities( $q[2] ); 2207 $out .= '</li>' . "\n"; 2202 if ( isset($q[1]) ) $oa.=$q[0]."\n"; 2203 if($vb && isset($q[2]) ) $oa.="\t".$q[2]."\n"; 2208 2204 $x++; 2209 2205 } 2210 2206 2211 $out .= '</ol>' . "\n\n"; 2212 } 2213 2214 $php_time = $total_time - $total_query_time; 2215 // Create the percentages 2216 //$mysqlper = number_format_i18n( $total_query_time / $total_time * 100, 2 ); 2217 //$phpper = number_format_i18n( $php_time / $total_time * 100, 2 ); 2218 $out1=$out; 2219 $out=''; 2220 /* 2221 $out .= '<ul>' . "\n"; 2222 $out .= '<li><strong>' . __('Total query time:') . ' ' . number_format_i18n( $total_query_time, 5 ) . __('s for') . ' ' . count($wpdb->queries) . ' ' . __('queries.') . '</strong></li>'; 2223 if ( count($wpdb->queries) != get_num_queries() ) { 2224 $out .= '<li><strong>' . __('Total num_query time:') . ' ' . timer_stop() . ' ' . __('for') . ' ' . get_num_queries() . ' ' . __('num_queries.') . '</strong></li>' . "\n"; 2225 $out .= '<li class="none_list">' . __('» Different values in num_query and query? - please set the constant') . ' <code>define(\'SAVEQUERIES\', true);</code>' . __('in your') . ' <code>wp-config.php</code></li>' . "\n"; 2226 } 2227 if ( $total_query_time == 0 ) 2228 $out .= '<li class="none_list">' . __('» Query time is null (0)? - please set the constant') . ' <code>SAVEQUERIES</code>' . ' ' . __('at') . ' <code>TRUE</code> ' . __('in your') . ' <code>wp-config.php</code></li>' . "\n"; 2229 $out .= '<li>' . __('Page generated in'). ' ' . number_format_i18n( $total_time, 5 ) . __('s, ') . $phpper . __('% PHP') . ', ' . $mysqlper . __('% MySQL') . '</li>' . "\n"; 2230 $out .= '</ul>' . "\n"; 2231 */ 2232 2233 $this->t(__FILE__,__CLASS__,__FUNCTION__,__LINE__,'',5); 2234 return $mesg.$out.$out1; 2207 } 2208 $this->t(__FILE__,__CLASS__,__FUNCTION__,__LINE__,'',5); 2209 $oa.="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; 2210 return $this->pp($oa,true); 2235 2211 } 2236 2212 … … 3390 3366 function pp( $obj, $return = false ) 3391 3367 { 3392 $ret='<pre class="aa_pre2" >';3368 $ret='<pre class="aa_pre2" style="height:'.absint($this->options['display_height']).'px;">'; 3393 3369 if (is_array($obj) || is_object($obj)) $ret.=htmlspecialchars($this->print_rq($obj,1)); 3394 3370 else { … … 3437 3413 3438 3414 $ret='<div id="tabs-'.$st.'">'; 3439 $ret.="\n\n".'<h2><a name="'.$st.'" id="'.$st.'"></a>'.$title.'<a href="#aaoutput" class="goAnchor">[^]</a></h2><pre class="aa_pre2" >';3415 $ret.="\n\n".'<h2><a name="'.$st.'" id="'.$st.'"></a>'.$title.'<a href="#aaoutput" class="goAnchor">[^]</a></h2><pre class="aa_pre2" style="height:'.absint($this->options['display_height']).'px;">'; 3440 3416 if (is_array($obj)&& !is_object($obj)) $ret.=$this->pa($obj); 3441 3417 else { -
askapache-debug-viewer/trunk/f/admin.css
r673624 r733446 2 2 h3.aa_h31 { background-color:#464646; color:#999; text-indent:10px; line-height:85px; height:65px; margin:0; } 3 3 4 #aan {clear:both;border:0pt none; visibility:visible; z-index:2147483641; position:fixed; left:0; right:1px; bottom:0; height:300px; display:block;background:none repeat scroll 0 0 #FFFFFF; font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px; margin:0; padding:0; border-top:3px double #ccc; }4 #aan {clear:both;border:0pt none; visibility:visible; z-index:2147483641; position:fixed; left:0; right:1px; bottom:0; height:300px; width:99%; display:block;background:none repeat scroll 0 0 #FFFFFF; font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px; margin:0; padding:0; border-top:3px double #ccc; } 5 5 6 6 7 #aao {clear:both;border:0pt none; visibility:visible; z-index:2147483642; overflow:hidden; width:100%;height:100%; left:0pt; bottom:0px; top:2px; display:block;background:none repeat scroll 0 0 #FFFFFF; font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px; margin:0; padding:0; }7 #aao {clear:both;border:0pt none; visibility:visible; z-index:2147483642; overflow:hidden; height:100%; left:0pt; bottom:0px; top:2px; display:block;background:none repeat scroll 0 0 #FFFFFF; font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px; margin:0; padding:0; } 8 8 9 9 #aaslink,#aaslink:hover,#aaslink:active { background:none repeat scroll 0 0 transparent; border:1px outset #CCCCCC; bottom:4px; color:#2D2D2D; display:block; font:600 13px/20px Arial; height:20px; overflow:hidden; position:absolute; right:4px; text-align:center; text-decoration:none; width:70px; z-index:2147483648; } … … 24 24 #aao h2 a { line-height:25px;text-decoration:none;font-size:12px;padding-left:10px;height:25px;color:#D3D3D3; } 25 25 26 .aa_pre2 { background:none repeat scroll 0 0 #FFFFFF;clear:both;color:#000;font:11px/16px monospace;margin:0;padding:0;width:100%; height:463px; overflow:scroll; border-bottom:40px solid #FFFFFF; white-space:pre-wrap; min-width: 400px; }26 .aa_pre2 { background:none repeat scroll 0 0 #FFFFFF;clear:both;color:#000;font:11px/16px monospace;margin:0;padding:0;width:100%; height:463px; overflow:scroll; border-bottom:40px solid #FFFFFF; white-space:pre-wrap; min-width:100%; } 27 27 .aa_label1 { float:left;display:block;width:125px;color:#666; } 28 28 .aa_label2 { float:left;display:block;width:325px; } -
askapache-debug-viewer/trunk/f/admin.js
r653137 r733446 1 1 (function($){ 2 $.fn.goAnchor = function () {3 $(this).mousedown(function () {4 $(this).attr("href", "");5 self.scrollTo(0, 0);6 return false7 })8 };9 2 $(document).ready(function() { 10 //$(".goAnchor").goAnchor();11 3 $("#aan").resizable({ 12 4 minHeight:50, 13 minWidth:200, 14 handles:'n', 15 grid:50, 16 //helper: "ui-resizable-helper", 17 //ghost: true, 18 alsoResize: ".aa_pre2" 5 handles:'n,e', 6 delay: 50, 7 distance: 20, 8 alsoResize: ".aa_pre2", 19 9 }); 20 10 $("#aao").tabs(); 21 22 //$( "#aao" ).tabs();23 24 // fix the classes25 //$( ".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *" ).removeClass( "ui-corner-all ui-corner-top" ).addClass( "ui-corner-bottom" );26 27 // move the nav to the bottom28 //$( ".tabs-bottom .ui-tabs-nav" ).appendTo( ".tabs-bottom" );29 11 }); 30 12 -
askapache-debug-viewer/trunk/readme.txt
r673624 r733446 4 4 Tags: debug, debugging, problem, issue, warning, error, errors, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 5 5 Requires at least: 3.0 6 Tested up to: 3.5. 17 Stable tag: 2.9 6 Tested up to: 3.5.2 7 Stable tag: 2.9.1 8 8 9 9 Advanced debugging plugin for seeing the verbose of the verbose debug info. Tech Support, Server Admins, WordPress Developers, Plugin Developers, or anyone wanting to see under the hood of their website and diagnose problems. This debugging plugin goes further than any other in the way it uses Apache Server Status Handlers, CGI Script for server environment view, and in the shear amount of debugging information available, like the basically print_r($GLOBALS).
Note: See TracChangeset
for help on using the changeset viewer.