Index: devel.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel.info,v
retrieving revision 1.11
diff -u -p -r1.11 devel.info
--- devel.info	27 Jan 2010 23:45:52 -0000	1.11
+++ devel.info	8 Dec 2010 21:54:38 -0000
@@ -7,3 +7,4 @@ core = 7.x
 files[] = devel.module
 files[] = devel.install
 configure = admin/config/development/devel
+tags[] = developer
Index: devel.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel.module,v
retrieving revision 1.459
diff -u -p -r1.459 devel.module
--- devel.module	7 Dec 2010 21:45:14 -0000	1.459
+++ devel.module	8 Dec 2010 21:54:38 -0000
@@ -219,7 +219,7 @@ function devel_menu() {
   $items['node/%node/devel'] = array(
     'title' => 'Devel',
     'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'node'),
+    'page arguments' => array('node', 1),
     'access arguments' => array('access devel information'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'devel.pages.inc',
@@ -227,10 +227,6 @@ function devel_menu() {
   );
   $items['node/%node/devel/load'] = array(
     'title' => 'Load',
-    'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'node'),
-    'access arguments' => array('access devel information'),
-    'file' => 'devel.pages.inc',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
   $items['node/%node/devel/render'] = array(
@@ -245,7 +241,7 @@ function devel_menu() {
   $items['comment/%comment/devel'] = array(
     'title' => 'Devel',
     'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'comment'),
+    'page arguments' => array('comment', 1),
     'access arguments' => array('access devel information'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'devel.pages.inc',
@@ -253,11 +249,7 @@ function devel_menu() {
   );
   $items['comment/%comment/devel/load'] = array(
     'title' => 'Load',
-    'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'comment'),
-    'access arguments' => array('access devel information'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
-    'file' => 'devel.pages.inc',
   );
   $items['comment/%comment/devel/render'] = array(
     'title' => 'Render',
@@ -271,7 +263,7 @@ function devel_menu() {
   $items['user/%user/devel'] = array(
     'title' => 'Devel',
     'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'user'),
+    'page arguments' => array('user', 1),
     'access arguments' => array('access devel information'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'devel.pages.inc',
@@ -279,10 +271,6 @@ function devel_menu() {
   );
   $items['user/%user/devel/load'] = array(
     'title' => 'Load',
-    'page callback' => 'devel_load_object',
-    'page arguments' => array(1, 'user'),
-    'access arguments' => array('access devel information'),
-    'file' => 'devel.pages.inc',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
   $items['user/%user/devel/render'] = array(
@@ -297,7 +285,7 @@ function devel_menu() {
   $items['taxonomy/term/%taxonomy_term/devel'] = array(
     'title' => 'Devel',
     'page callback' => 'devel_load_object',
-    'page arguments' => array(2, 'term'),
+    'page arguments' => array('taxonomy_term', 2, 'term'),
     'access arguments' => array('access devel information'),
     'file' => 'devel.pages.inc',
     'type' => MENU_LOCAL_TASK,
@@ -305,16 +293,12 @@ function devel_menu() {
   );
   $items['taxonomy/term/%taxonomy_term/devel/load'] = array(
     'title' => 'Load',
-    'page callback' => 'devel_load_object',
-    'page arguments' => array(2, 'term'),
-    'access arguments' => array('access devel information'),
-    'file' => 'devel.pages.inc',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
   $items['taxonomy/term/%taxonomy_term/devel/render'] = array(
     'title' => 'Render',
-    'page callback' => 'devel_render_term',
-    'page arguments' => array(2),
+    'page callback' => 'devel_render_object',
+    'page arguments' => array('taxonomy_term', 2, 'term'),
     'access arguments' => array('access devel information'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'devel.pages.inc',
@@ -726,7 +710,8 @@ function devel_switch_user_list() {
       // If authenticated users have this permission, just grab
       // the last $list_size users, since there won't be records in
       // {user_roles} and every user on the system can switch.
-      $accounts = db_query_range("SELECT DISTINCT u.uid, u.name, u.access FROM {users} u WHERE u.uid > 0 AND u.status > 0 ORDER BY u.access DESC", 0, $list_size);
+      $uids = db_query_range("SELECT DISTINCT u.uid FROM {users} u WHERE u.uid > 0 AND u.status > 0 ORDER BY u.access DESC", 0, $list_size)->fetchCol();
+      $accounts = user_load_multiple($uids);
     }
     else {
       $where = array('u.uid = 1');
@@ -734,11 +719,12 @@ function devel_switch_user_list() {
         $where[] = 'r.rid IN ('. implode(',', array_keys($roles)) .')';
       }
       $where_sql = implode(' OR ', $where);
-      $accounts = db_query_range("SELECT DISTINCT u.uid, u.name, u.access FROM {users} u LEFT JOIN {users_roles} r ON u.uid = r.uid WHERE ($where_sql) AND u.status > 0 ORDER BY u.access DESC", 0, $list_size);
+      $uids = db_query_range("SELECT DISTINCT u.uid FROM {users} u LEFT JOIN {users_roles} r ON u.uid = r.uid WHERE ($where_sql) AND u.status > 0 ORDER BY u.access DESC", 0, $list_size)->fetchCol();
+      $accounts = user_load_multiple($uids);
     }
     foreach ($accounts as $account) {
       $links[$account->uid] = array(
-        'title' => drupal_placeholder($account->name),
+        'title' => check_plain(format_username($account)),
         'href' => 'devel/switch/'. $account->name,
         'query' => $dest,
         'attributes' => array('title' => t('This user can switch back.')),
@@ -749,10 +735,11 @@ function devel_switch_user_list() {
     $num_links = count($links);
     if ($num_links < $list_size) {
       // If we don't have enough, add distinct uids until we hit $list_size.
-      $accounts = db_query_range('SELECT uid, name, access FROM {users} WHERE uid > 0 AND uid NOT IN ('. implode(',', array_keys($links)) .') AND status > 0 ORDER BY access DESC', 0, $list_size - $num_links);
+      $uids = db_query_range('SELECT uid FROM {users} WHERE uid > 0 AND uid NOT IN ('. implode(',', array_keys($links)) .') AND status > 0 ORDER BY access DESC', 0, $list_size - $num_links)->fetchCol();
+      $accounts = user_load_multiple($uids);
       foreach ($accounts as $account) {
         $links[$account->uid] = array(
-          'title' => $account->name ? $account->name : 'anon',
+          'title' => check_plain(format_username($account)),
           'href' => 'devel/switch/'. $account->name,
           'query' => $dest,
           'attributes' => array('title' => t('Caution: this user will be unable to switch back.')),
@@ -1665,7 +1652,6 @@ function devel_empty_dir($dir) {
  * migration related functions
  */
 
-
 /**
  * Regenerate the data in node_comment_statistics table. Technique comes from
  * http://www.artfulsoftware.com/infotree/queries.php?&bw=1280#101
Index: devel.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/devel/devel.pages.inc,v
retrieving revision 1.10
diff -u -p -r1.10 devel.pages.inc
--- devel.pages.inc	8 Nov 2010 17:58:09 -0000	1.10
+++ devel.pages.inc	8 Dec 2010 21:54:38 -0000
@@ -333,42 +333,23 @@ function devel_session() {
 }
 
 /**
- * Menu callback; prints the render structure of a term.
- */
-function devel_render_term($term) {
-  $build = array();
-  $build += field_attach_view('taxonomy_term', $term);
-  if (!empty($term->description)) {
-    $build['term_description'] = array(
-      '#markup' => filter_xss_admin($term->description),
-      '#weight' => -1,
-      '#prefix' => '<div class="taxonomy-term-description">',
-      '#suffix' => '</div>',
-    );
-  }
-  return kdevel_print_object($build, '$term->');
-}
-
-/**
  * Menu callback; prints the loaded structure of the current node/user.
  */
-function devel_load_object($object, $name = NULL) {
-  $title = isset($object->title) ? $object->title : $object->name;
-  drupal_set_title($title);
+function devel_load_object($type, $object, $name = NULL) {
+  $title = entity_label($type, $object);
+  $name = isset($name) ? $name : $type;
   return kdevel_print_object($object, '$'. $name .'->');
 }
 
 /**
  * Menu callback; prints the render structure of the current object (currently node or user).
  */
-function devel_render_object($type, $object) {
-  $output = '';
-  $title = isset($object->title) ? $object->title : $object->name;
-  // not sure why menu system doesn't give us a reasonable title here.
-  drupal_set_title($title);
-  $function = $type .'_build_content';
-  $function($object);
-  return kdevel_print_object($object->content, '$'. $type .'->');
+function devel_render_object($type, $object, $name = NULL) {
+  $title = entity_label($type, $object);
+  $name = isset($name) ? $name : $type;
+  $function = $type . '_view';
+  $build = $function($object);
+  return kdevel_print_object($build, '$'. $name .'->');
 }
 
 function devel_elements_page() {
