Skip to content

Commit

Permalink
V1.2 bugfixes
Browse files Browse the repository at this point in the history
Fixed a couple instances where $list->value was used. There is no value field in $list returned by function getLists(). Changed this to name.
  • Loading branch information
bascherz authored Apr 17, 2023
1 parent cac2dae commit b5fb3be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cb.mailster_sub.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
Name: CB Mailster Subscriptions
Version: 1.1, native for Joomla 4
Date: March 2023
Version: 1.2, native for Joomla 4
Date: April 2023
Author: Bruce Scherzinger
Email: [email protected]
URL: http://joomla.org
Expand Down Expand Up @@ -228,7 +228,7 @@ function afterNewUser($user, $cbUser, $stored = false, $something = true)
{
/* Add the subscription */
$result = $this->SubscribeAddress($user->email, $list->group_id, $user->name);
$message .= str_replace(array('[LIST]','[EMAIL]'),array($list->value,$user->email),$params->get('autosubscribe_email_msg',DEFAULT_AUTOSUBSCRIBE_MSG));
$message .= str_replace(array('[LIST]','[EMAIL]'),array($list->name,$user->email),$params->get('autosubscribe_email_msg',DEFAULT_AUTOSUBSCRIBE_MSG));
$number++;
}
}
Expand Down Expand Up @@ -846,7 +846,7 @@ function UpdateSubscriptions ($user, &$message)
}
}
// Replace notice message placeholders
$message = str_replace(array('[LIST]','[EMAIL]'),array($list->value,$user->email),$message);
$message = str_replace(array('[LIST]','[EMAIL]'),array($list->name,$user->email),$message);
}
elseif ($field->type == 'multicheckbox' || $field->type == 'codemulticheckbox' || $field->type == 'querymulticheckbox' ||
$field->type == 'multiselect' || $field->type == 'codemultiselect' || $field->type == 'querymultiselect')
Expand Down
4 changes: 2 additions & 2 deletions cb.mailster_sub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://github.com/bascherz/Mailster-Subscriptions-CB-Plugin</authorUrl>
<version>2.0</version>
<release>1.1</release>
<release>1.2</release>
<description>
<![CDATA[
<h3>Mailster Subscriptions Community Builder Plug-In v1.1</h3>
<h3>Mailster Subscriptions Community Builder Plug-In v1.2</h3>
<address>&copy; Bruce Scherzinger</address>
<p>Allows users to subscribe/unsubscribe to Mailster mailing lists from their CB profiles.</p>
<p>Special tags you can insert into email notice message fragments are as follows:</p>
Expand Down

0 comments on commit b5fb3be

Please sign in to comment.