*** 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.') .' <img src="/misc/watchdog-error.png" width="17" height="17">'),
        );
      $output .=  theme('fieldset', $fieldset);
      $output .= "</div>\n";
--- 325,331 ----
        '#title' => t('Roles'),
        '#collapsible' => TRUE,
        '#collapsed' => FALSE,
!       '#value' => $rpt ? $rpt : (t('No roles found.') .' '. _img_error()),
        );
      $output .=  theme('fieldset', $fieldset);
      $output .= "</div>\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)))
!                   .'<img src="/misc/watchdog-warning.png" width="17" height="17">';
      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') .'<img src="/misc/watchdog-warning.png" width="17" height="17">'; 
      $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 .') <img src="/misc/watchdog-warning.png" width="17" height="17">';
    }
    else {
!     $menu_msg = t('Show all menus') .'<img src="/misc/watchdog-ok.png" width="17" height="17">';
    }
    $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 = ' <em>('. t('not set') .')</em><img src="/misc/watchdog-warning.png" width="17" height="17"> ';
      $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 = ' <em>('. t('not set') .')</em>' . _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') .' <img src="/misc/watchdog-warning.png" width="17" height="17">', 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 '<span class="admin-missing">No index found.</span> <img src="/misc/watchdog-warning.png" width="17" height="17">'; 
    }
  }
  
--- 1003,1009 ----
      return theme('table', $header, $rows);
    }
    else {
!     return '<span class="admin-missing">No index found.</span>' . _img_warning(); 
    }
  }
  
***************
*** 1962,1972 ****
    $output .= theme('table', $header, $rows);
  
    if ($toobig) {
!     $output .= '<p><img src="/misc/watchdog-warning.png" width="17" height="17"> '
        . t('!count nodes exceed !size KB.', array('!count' => $toobig, '!size' => $max_size)) .'</p>';
    }
    else {
!     $output .= '<p><img src="/misc/watchdog-ok.png" width="17" height="17"> '
        . t('No nodes exceed !size KB.', array('!size' => $max_size)) .'</p>';
    }
    if (!empty($biggies)) {  
--- 1962,1972 ----
    $output .= theme('table', $header, $rows);
  
    if ($toobig) {
!     $output .= '<p>'  . _img_warning()
        . t('!count nodes exceed !size KB.', array('!count' => $toobig, '!size' => $max_size)) .'</p>';
    }
    else {
!     $output .= '<p>' . _img_ok()
        . t('No nodes exceed !size KB.', array('!size' => $max_size)) .'</p>';
    }
    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 .= '<p><img src="/misc/watchdog-warning.png" width="17" height="17">'
        . 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'))) ."</p>\n";
    }
    else {
!     $output .= '<p><img src="/misc/watchdog-ok.png" width="17" height="17">'
        . t('All nodes are represented in the node_access table.') ."</p>\n";
    } /* end else */
  
--- 2015,2025 ----
    // 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 .= '<p>' . _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'))) ."</p>\n";
    }
    else {
!     $output .= '<p>' . _img_ok()
        . t('All nodes are represented in the node_access table.') ."</p>\n";
    } /* end else */
  
***************
*** 2621,2627 ****
      }
      $filter_stuff .= "</table>\n";
  
!     $cache = $input['cache'] ? '<img src="/misc/watchdog-ok.png"' : '<img src="/misc/watchdog-warning.png"';
  
      $output .= '<td valign="top">'. $format .'</td>'
        .'<td valign="top">'. l($name, 'admin/settings/filters/'. $format) .'</td>'
--- 2633,2639 ----
      }
      $filter_stuff .= "</table>\n";
  
!     $cache = $input['cache'] ? _img_ok() : _img_warning();
  
      $output .= '<td valign="top">'. $format .'</td>'
        .'<td valign="top">'. l($name, 'admin/settings/filters/'. $format) .'</td>'
