Browse Source

Other tweaks for hooks

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
6dd288eeda
4 changed files with 5 additions and 5 deletions
  1. 1 1
      Sources/Errors.php
  2. 1 1
      Sources/Security.php
  3. 1 1
      Sources/Subs-Auth.php
  4. 2 2
      Sources/Subs-Membergroups.php

+ 1 - 1
Sources/Errors.php

@@ -235,7 +235,7 @@ function error_handler($error_level, $error_string, $file, $line)
 	$message = log_error($error_level . ': ' . $error_string, $error_type, $file, $line);
 
 	// Let's give integrations a chance to ouput a bit differently
-	call_integration_hook('integrate_output_error', array(&$message, &$error_type, &$error_level, &$file, &$line));
+	call_integration_hook('integrate_output_error', array($message, $error_type, $error_level, $file, $line));
 
 	// Dying on these errors only causes MORE problems (blank pages!)
 	if ($file == 'Unknown')

+ 1 - 1
Sources/Security.php

@@ -34,7 +34,7 @@ function validateSession($type = 'admin')
 
 	// Validate what type of session check this is.
 	$types = array();
-	call_integration_hook('integrate_validateSession', array($types));
+	call_integration_hook('integrate_validateSession', array(&$types));
 	$type = in_array($type, $types) || $type == 'moderate' ? $type : 'admin';
 
 	// If we're using XML give an additional ten minutes grace as an admin can't log on in XML mode.

+ 1 - 1
Sources/Subs-Auth.php

@@ -202,7 +202,7 @@ function adminLogin($type = 'admin')
 
 	// Validate what type of session check this is.
 	$types = array();
-	call_integration_hook('integrate_validateSession', array($types));
+	call_integration_hook('integrate_validateSession', array(&$types));
 	$type = in_array($type, $types) || $type == 'moderate' ? $type : 'admin';
 
 	// They used a wrong password, log it and unset that.

+ 2 - 2
Sources/Subs-Membergroups.php

@@ -560,6 +560,8 @@ function addMembersToGroup($members, $group, $type = 'auto', $permissionCheckDon
 	else
 		trigger_error('addMembersToGroup(): Unknown type \'' . $type . '\'', E_USER_WARNING);
 
+	call_integration_hook('integrate_add_members_to_group', array($members, $group, &$group_names));
+
 	// Update their postgroup statistics.
 	updateStats('postgroups', $members);
 
@@ -568,8 +570,6 @@ function addMembersToGroup($members, $group, $type = 'auto', $permissionCheckDon
 	foreach ($members as $member)
 		logAction('added_to_group', array('group' => $group_names[$group], 'member' => $member), 'admin');
 
-	call_integration_hook('integrate_add_members_to_group');
-
 	return true;
 }