Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit cfe70b0

Browse files
author
deadlybutter
committed
Moves logic to bottom
1 parent f64f07e commit cfe70b0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/modules/dosomething/dosomething_signup/dosomething_signup.module

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ function dosomething_signup_create($nid, $uid = NULL, $source = NULL, $timestamp
243243
return FALSE;
244244
}
245245

246-
if (module_exists('stathat')) {
247-
// The source is often a string longer than just "reportback", this logic accounts for that.
248-
if (strpos($source, 'reportback') === 0) {
249-
stathat_send_ez_count('drupal - Signup - permalink signup', 1);
250-
}
251-
}
252-
253246
$values = array(
254247
'nid' => $nid,
255248
'uid' => $uid,
@@ -264,6 +257,14 @@ function dosomething_signup_create($nid, $uid = NULL, $source = NULL, $timestamp
264257
// The SignupEntityController save method handles any NULL values.
265258
$entity->save();
266259
if (isset($entity->sid)) {
260+
261+
if (module_exists('stathat')) {
262+
// The source is often a string longer than just "reportback", but always starts with it if the page is a permalink
263+
if (strpos($source, 'reportback') === 0) {
264+
stathat_send_ez_count('drupal - Signup - permalink signup', 1);
265+
}
266+
}
267+
267268
return $entity->sid;
268269
}
269270
return FALSE;

0 commit comments

Comments
 (0)