Did some timing for $op's and realname came in fourth for 'validation' hook, which is a bit surprising considering it's not even using that hook.

Comments

Status: Needs review » Needs work

The last submitted patch, realname_nodeapi.patch, failed testing.

hefox’s picture

Status: Needs work » Needs review
StatusFileSize
new3.5 KB
+++ b/realname.module
@@ -428,64 +428,46 @@ function realname_user($op, &$edit, &$account, $category = NULL) {
-  static $type;

This didn't seem to help much, so removed it

+++ b/realname.module
@@ -428,64 +428,46 @@ function realname_user($op, &$edit, &$account, $category = NULL) {
-  static $accounts = array();

Having this static cached here seemed just wrong, so moved into actual function

+++ b/realname.module
@@ -428,64 +428,46 @@ function realname_user($op, &$edit, &$account, $category = NULL) {
-  if (!user_access('use realname')) {

This could cause bugs if calling node_save during drush, so moved it only to the places it matters, e.g. the replacement that is done so realname's display.

+++ b/realname.module
@@ -428,64 +428,46 @@ function realname_user($op, &$edit, &$account, $category = NULL) {
+      if (variable_get('realname_profile_type', NULL) && $node->type == variable_get('realname_profile_type', NULL)) {

This seems to be a faster equivalent to the original logic.

+++ b/realname.module
@@ -428,64 +428,46 @@ function realname_user($op, &$edit, &$account, $category = NULL) {
+        realname_make_name(realname_get_user($node->uid), TRUE);

If ya going to have a replacement for user_load, should use it.

Status: Needs review » Needs work

The last submitted patch, realname_1630900_nodeapi-1.patch, failed testing.

hefox’s picture

Status: Needs work » Needs review
StatusFileSize
new3.54 KB

Let's abuse testbot and see if I can trick it into believing I made this patch against dev

Status: Needs review » Needs work

The last submitted patch, realname_1630900_nodeapi-1.patch, failed testing.

hefox’s picture

Boo, obviously I can't fake out testbot and really need to roll it against -dev. Sigh, will get to it eventually hopefully..

hass’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)