Commit 3c1264d3 authored by JonBob's avatar JonBob

Suppress a huge number of PHP notices when the query log is on.

parent baa50abf
README.txt
==========
A module containing helper functions for Drupal developers and
A module containing helper functions for Drupal developers and
inquisitive admins. Initially, this module prints out a summary of
all database queries for each page request at the bottom of each page. The
summary includes how many times each query was executed on a page
summary includes how many times each query was executed on a page
(shouldn't run same query multiple times), and how long each query
took (short is good - use cache for complex queries).
Also a dprint_r($array) function is provided, which pretty prints arrays. Useful during
Also a dprint_r($array) function is provided, which pretty prints arrays. Useful during
development.
Also prints stack trace and profileing info when the xdebug extension is active.
Also prints stack trace and profileing info when the xdebug extension is active.
See http://www.xdebug.org/index.php
-moshe weitzman
......
......@@ -507,7 +507,7 @@ function devel_query_table($queries, $counts) {
$function=$ar[0];
$diff = round($query[1] * 1000, 2);
$count = $counts[$query[0]];
$count = isset($counts[$query[0]]) ? $counts[$query[0]] : 0;
if ($diff > variable_get('devel_execution', 5)) {
$cell[$i][] = array ('data' => $diff, 'class' => 'marker');
}
......
<?php
/**
* @file
*
* @file
*
* This module gives developers feedback as to what there
* node_access table contains, and which nodes are protected or
* visible to the public.
*
*
*/
define('DNA_ACCESS_VIEW', 'view devel_node_access information');
......@@ -103,13 +103,13 @@ function dna_summary() {
$headers = array(t('realm'), t('public nodes'));
$rows = array();
while ($row = db_fetch_object($result)) {
$rows[] = array($row->realm,
$rows[] = array($row->realm,
array('data' => $row->node_count,
'align' => 'center'));
}
$output .= theme_table($headers, $rows, array(), t('Public Nodes'));
}
// find specific nodes protected by node_access table
$result = db_query('SELECT DISTINCT realm, COUNT(DISTINCT nid) as node_count FROM {node_access} WHERE gid != 0 AND nid > 0 GROUP BY realm');
......@@ -121,13 +121,13 @@ function dna_summary() {
$headers = array(t('realm'), t('private nodes'));
$rows = array();
while ($row = db_fetch_object($result)) {
$rows[] = array(l($row->realm, "devel/node_access/view/$row->realm"),
$rows[] = array(l($row->realm, "devel/node_access/view/$row->realm"),
array('data' => $row->node_count,
'align' => 'center'));
}
$output .= theme_table($headers, $rows, array(), t('Protected Nodes'));
}
return $output;
......@@ -194,20 +194,20 @@ function devel_node_access_views_tables() {
'sortable' => true,
),
),
'filters' =>
array('realm' =>
'filters' =>
array('realm' =>
array('name' => t('Node Access Realm'),
'operator' => 'views_handler_operator_eqneq',
),
),
);
return $tables;
}
function devel_node_access_views_arguments() {
$arguments =
array('realm' =>
$arguments =
array('realm' =>
array('name' => t('Node Access: Realm'),
'handler' => 'dna_handler_arg_realm',
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment