? .cvsignore
? move_function.patch
Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.146
diff -u -p -r1.146 privatemsg.module
--- privatemsg.module	17 Aug 2010 13:05:41 -0000	1.146
+++ privatemsg.module	27 Sep 2010 14:06:44 -0000
@@ -2105,6 +2105,59 @@ function privatemsg_views_api() {
 }
 
 /**
+ * Returns a table header definition based on the submitted keys.
+ *
+ * Uses @link theming theme patterns @endlink to theme single headers.
+ *
+ * @param $has_posts
+ *   TRUE when there is at least one row. Decides if the select all checkbox
+ *   should be displayed.
+ * @param $keys
+ *   Array with the keys which are present in the query/should be displayed.
+ * @return
+ *   Array with header defintions for tablesort_sql and theme('table').
+ */
+function _privatemsg_list_headers($has_posts, $keys) {
+  $select_header = $has_posts ? theme('table_select_header_cell') : '';
+  $select_header['#weight'] = -50;
+
+  // theme() doesn't include the theme file for patterns, we need to do it manually.
+  include_once drupal_get_path('module', 'privatemsg') .'/privatemsg.theme.inc';
+
+  $header = array($select_header);
+  foreach ($keys as $key) {
+    // First, try to load a specific theme for that header, if not present, use the default.
+    if ($return = theme(array('privatemsg_list_header__'. $key, 'privatemsg_list_header'))) {
+      // The default theme returns nothing, only store the value if we have something.
+      $header[$key] = $return;
+    }
+  }
+  if (count($header) == 1) {
+    // No header definition returned, fallback to the default.
+    $header += _privatemsg_list_headers_fallback($keys);
+  }
+  return $header;
+}
+
+/**
+ * Table header definition for themes that don't support theme patterns.
+ *
+ * @return
+ *   Array with the correct headers.
+ */
+function _privatemsg_list_headers_fallback($keys) {
+  $header = array();
+  foreach ($keys as $key) {
+    $theme_function = 'phptemplate_privatemsg_list_header__' . $key;
+    if (function_exists($theme_function)) {
+      $header[$key] = $theme_function();
+    }
+  }
+
+  return $header;
+}
+
+/**
  * Privatemsg wrapper function for user_load() with a static cache.
  *
  * The function additionaly also adds the privatemsg specific recipient id (uid)
Index: privatemsg.pages.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.pages.inc,v
retrieving revision 1.15
diff -u -p -r1.15 privatemsg.pages.inc
--- privatemsg.pages.inc	8 Sep 2010 21:59:11 -0000	1.15
+++ privatemsg.pages.inc	27 Sep 2010 14:06:46 -0000
@@ -549,60 +549,6 @@ function _privatemsg_action_form() {
   return $form;
 }
 
-
-/**
- * Returns a table header definition based on the submitted keys.
- *
- * Uses @link theming theme patterns @endlink to theme single headers.
- *
- * @param $has_posts
- *   TRUE when there is at least one row. Decides if the select all checkbox
- *   should be displayed.
- * @param $keys
- *   Array with the keys which are present in the query/should be displayed.
- * @return
- *   Array with header defintions for tablesort_sql and theme('table').
- */
-function _privatemsg_list_headers($has_posts, $keys) {
-  $select_header = $has_posts ? theme('table_select_header_cell') : '';
-  $select_header['#weight'] = -50;
-
-  // theme() doesn't include the theme file for patterns, we need to do it manually.
-  include_once drupal_get_path('module', 'privatemsg') .'/privatemsg.theme.inc';
-
-  $header = array($select_header);
-  foreach ($keys as $key) {
-    // First, try to load a specific theme for that header, if not present, use the default.
-    if ($return = theme(array('privatemsg_list_header__'. $key, 'privatemsg_list_header'))) {
-      // The default theme returns nothing, only store the value if we have something.
-      $header[$key] = $return;
-    }
-  }
-  if (count($header) == 1) {
-    // No header definition returned, fallback to the default.
-    $header += _privatemsg_list_headers_fallback($keys);
-  }
-  return $header;
-}
-
-/**
- * Table header definition for themes that don't support theme patterns.
- *
- * @return
- *   Array with the correct headers.
- */
-function _privatemsg_list_headers_fallback($keys) {
-  $header = array();
-  foreach ($keys as $key) {
-    $theme_function = 'phptemplate_privatemsg_list_header__' . $key;
-    if (function_exists($theme_function)) {
-      $header[$key] = $theme_function();
-    }
-  }
-
-  return $header;
-}
-
 /**
  * Formats a row in the message list.
  *
