*** original/sitedoc.module Tue May 13 10:31:49 2008
--- patched/sitedoc.module Fri Jul 18 15:35:18 2008
***************
*** 325,331 ****
'#title' => t('Roles'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
! '#value' => $rpt ? $rpt : (t('No roles found.') .'
'),
);
$output .= theme('fieldset', $fieldset);
$output .= "\n";
--- 325,331 ----
'#title' => t('Roles'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
! '#value' => $rpt ? $rpt : (t('No roles found.') .' '. _img_error()),
);
$output .= theme('fieldset', $fieldset);
$output .= "\n";
***************
*** 506,512 ****
if (isset($cron_semaphore)) {
$how_long = time() - $cron_semaphore; /* how long it's been running (secs) */
$cron_when .= ' - '. t('Running for !time', array('!time' => format_interval($how_long)))
! .'
';
if ($kill_cron) {
if ($kill_cron <= $how_long) {
variable_del('cron_semaphore'); /* turn off "cron started" flag */
--- 506,512 ----
if (isset($cron_semaphore)) {
$how_long = time() - $cron_semaphore; /* how long it's been running (secs) */
$cron_when .= ' - '. t('Running for !time', array('!time' => format_interval($how_long)))
! ._img_warning();
if ($kill_cron) {
if ($kill_cron <= $how_long) {
variable_del('cron_semaphore'); /* turn off "cron started" flag */
***************
*** 545,551 ****
$download_op = NULL;
}
else {
! $downloads = t('Private') .'
';
$download_op = l($setting, 'admin/settings/file-system', array('query' => $dest));
}
--- 545,551 ----
$download_op = NULL;
}
else {
! $downloads = t('Private') ._img_warning();
$download_op = l($setting, 'admin/settings/file-system', array('query' => $dest));
}
***************
*** 555,564 ****
$menu_restrict = variable_get('menu_parent_items', NULL);
// "Show all menus" is Zero. Unless the setting has been changed it won't be present (NULL)
if ($menu_restrict) {
! $menu_msg = t('Restricted') .' ('. $menu_restrict .')
';
}
else {
! $menu_msg = t('Show all menus') .'
';
}
$rows[] = array(t('Content menu links'), $menu_msg, l($setting, 'admin/build/menu/settings', array('query' => $dest)));
--- 555,564 ----
$menu_restrict = variable_get('menu_parent_items', NULL);
// "Show all menus" is Zero. Unless the setting has been changed it won't be present (NULL)
if ($menu_restrict) {
! $menu_msg = t('Restricted') .' ('. $menu_restrict .') ' . _img_warning();
}
else {
! $menu_msg = t('Show all menus') ._img_ok();
}
$rows[] = array(t('Content menu links'), $menu_msg, l($setting, 'admin/build/menu/settings', array('query' => $dest)));
***************
*** 579,585 ****
$filter_op = NULL;
}
else {
! $filter_warn = ' ('. t('not set') .')
';
$filter_op = l($setting, 'admin/settings/filters', array('query' => $dest));
}
$rows[] = array(t('Default filter format'), $filter_name->name . $filter_warn, $filter_op);
--- 579,585 ----
$filter_op = NULL;
}
else {
! $filter_warn = ' ('. t('not set') .')' . _img_warning();
$filter_op = l($setting, 'admin/settings/filters', array('query' => $dest));
}
$rows[] = array(t('Default filter format'), $filter_name->name . $filter_warn, $filter_op);
***************
*** 655,661 ****
$rows[] = array(t('Display errors'), $disperr, NULL);
$mem_limit = ini_get('memory_limit');
! $rows[] = array(t('Memory limit'), $mem_limit ? $mem_limit : t('default') .'
', NULL);
// Changing the error level returns the previous level, so we'll turn errors off then set it back as it was.
$current = ini_get('error_reporting');
--- 655,661 ----
$rows[] = array(t('Display errors'), $disperr, NULL);
$mem_limit = ini_get('memory_limit');
! $rows[] = array(t('Memory limit'), $mem_limit ? $mem_limit : t('default') ._img_warning(), NULL);
// Changing the error level returns the previous level, so we'll turn errors off then set it back as it was.
$current = ini_get('error_reporting');
***************
*** 1003,1009 ****
return theme('table', $header, $rows);
}
else {
! return 'No index found.
';
}
}
--- 1003,1009 ----
return theme('table', $header, $rows);
}
else {
! return 'No index found.' . _img_warning();
}
}
***************
*** 1962,1972 ****
$output .= theme('table', $header, $rows);
if ($toobig) {
! $output .= '
'
. t('!count nodes exceed !size KB.', array('!count' => $toobig, '!size' => $max_size)) .'
'
. t('No nodes exceed !size KB.', array('!size' => $max_size)) .'
' . _img_warning() . t('!count nodes exceed !size KB.', array('!count' => $toobig, '!size' => $max_size)) .'
'; } else { ! $output .= '' . _img_ok() . t('No nodes exceed !size KB.', array('!size' => $max_size)) .'
'; } if (!empty($biggies)) { *************** *** 1991,1996 **** --- 1992,2008 ---- return; } + //helper functions to generate proper img tags + function _img_ok() { + return theme_image('misc/watchdog-ok.png', 'ok', 'ok'); + } + function _img_warning() { + return theme_image('misc/watchdog-warning.png', 'warning', 'warning'); + } + function _img_error() { + return theme_image('misc/watchdog-error.png', 'error', 'error'); + } + /** * Produce the node access summary. * *************** *** 2003,2013 **** // How many nodes are not represented in the node_access table. $result = db_fetch_object(db_query('SELECT COUNT(n.nid) as num_nodes FROM {node} n LEFT JOIN {node_access} na ON n.nid = na.nid WHERE na.nid IS NULL')); if ($num = $result->num_nodes) { ! $output .= '
'
. t('You have !num nodes in your node table which are not represented in your node_access table. If you have an access control module installed, these nodes may be hidden from all users. This could be caused by publishing nodes before enabling the access control module. If this is the case, manually updating each node should add it to the node_access table and fix the problem. Click here to !rebuild.', array('!num' => l($num, 'admin/build/sitedoc_node_access_view/'), '!rebuild' => l(t('rebuild permissions'), 'admin/content/node-settings/rebuild'))) ."
'
. t('All nodes are represented in the node_access table.') ."
' . _img_warning() . t('You have !num nodes in your node table which are not represented in your node_access table. If you have an access control module installed, these nodes may be hidden from all users. This could be caused by publishing nodes before enabling the access control module. If this is the case, manually updating each node should add it to the node_access table and fix the problem. Click here to !rebuild.', array('!num' => l($num, 'admin/build/sitedoc_node_access_view/'), '!rebuild' => l(t('rebuild permissions'), 'admin/content/node-settings/rebuild'))) ."
\n"; } else { ! $output .= '' . _img_ok() . t('All nodes are represented in the node_access table.') ."
\n"; } /* end else */ *************** *** 2621,2627 **** } $filter_stuff .= "\n"; ! $cache = $input['cache'] ? '
'
.'