1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

Code cleanup

This commit is contained in:
Cameron
2019-06-08 10:56:14 -07:00
parent 38ec49b94c
commit d50dc72c76
2 changed files with 23 additions and 4 deletions

View File

@@ -215,6 +215,24 @@ class e_admin_log
return $this; return $this;
} }
/**
* Alias for deprecated e_log_event
* @param $importance
* @param $source_call
* @param string $eventcode
* @param string $event_title
* @param string $explain
* @param bool $finished
* @param int $target_logs
* @param null $userData
* @return none
*/
public function addEvent($importance, $source_call, $eventcode = "GEN", $event_title = "Untitled", $explain = "", $finished = FALSE, $target_logs = LOG_TO_AUDIT, $userData=null )
{
return $this->e_log_event($importance, $source_call, $eventcode, $event_title, $explain, $finished, $target_logs, $userData);
}
/** /**
Generic log entry point Generic log entry point
----------------------- -----------------------
@@ -242,7 +260,7 @@ class e_admin_log
* @return none * @return none
* @todo - check microtime() call * @todo - check microtime() call
* @deprecated - use add() method instead. * @deprecated - use add() method instead or addEvent() as a direct replacement.
*/ */
public function e_log_event($importance, $source_call, $eventcode = "GEN", $event_title = "Untitled", $explain = "", $finished = FALSE, $target_logs = LOG_TO_AUDIT, $userData=null ) public function e_log_event($importance, $source_call, $eventcode = "GEN", $event_title = "Untitled", $explain = "", $finished = FALSE, $target_logs = LOG_TO_AUDIT, $userData=null )
{ {

View File

@@ -399,7 +399,7 @@ class e_signup_class
if($newID === false) if($newID === false)
{ {
$log->e_log_event(10,debug_backtrace(),'USER','Verification Fail', print_r($row,true),false, LOG_TO_ROLLING); $log->addEvent(10,debug_backtrace(),'USER','Verification Fail', print_r($row,true),false, LOG_TO_ROLLING);
return 'failed'; return 'failed';
} }
@@ -424,7 +424,7 @@ class e_signup_class
else else
{ {
// Invalid activation code // Invalid activation code
$log->e_log_event(10,debug_backtrace(),'USER','Invalid Verification URL', print_r($qs,true),false, LOG_TO_ROLLING); $log->addEvent(10,debug_backtrace(),'USER','Invalid Verification URL', print_r($qs,true),false, LOG_TO_ROLLING);
} }
} }
@@ -434,10 +434,11 @@ class e_signup_class
} }
/** /**
* Create email to send to user who just registered. * Create email to send to user who just registered.
*
* @param array $userInfo is the array of user-related DB variables * @param array $userInfo is the array of user-related DB variables
* @param bool $preview
* @return array of data for mailer - field names directly compatible * @return array of data for mailer - field names directly compatible
*/ */
function render_email($userInfo, $preview = FALSE) function render_email($userInfo, $preview = FALSE)