Skip to content

Commit

Permalink
Merge pull request #270 from JoomJunk/development
Browse files Browse the repository at this point in the history
Update to v8.1.3
  • Loading branch information
C-Lodder authored Jun 13, 2016
2 parents c5d5225 + d19a7e9 commit 92930fb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
3 changes: 3 additions & 0 deletions changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
- -> Removed
! -> Note

Version 8.1.3
# Fixed profile link not working

Version 8.1.2
^ Cursor is now inserted between tags if they're empty
^ Error now thrown if session has expired
Expand Down
20 changes: 7 additions & 13 deletions mod_shoutbox/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function countShouts()
->from($db->qn('#__shoutbox'));

$db->setQuery($query);

return $db->loadResult();
}

Expand Down Expand Up @@ -378,11 +378,11 @@ public function postFiltering($shout, $user, $swearCounter, $swearNumber, $displ
// Ensure the max length of posts is the parameter value
if ($this->params->get('messagelength') == 1)
{
$length = $this->params->get('messagelength', '200');
$length = $this->params->get('messagelength', '200');
}
else
{
$length = false;
$length = false;
}
$message = JString::substr($message, 0, $length);

Expand All @@ -403,8 +403,8 @@ public function postFiltering($shout, $user, $swearCounter, $swearNumber, $displ
$messageFilter = JFilterInput::getInstance($acceptedtags,$acceptedAttribs);

// Do the filtering
$name = $nameFilter->clean($name, 'string');
$message = $messageFilter->clean($message, 'string');
$name = $nameFilter->clean($name, 'string');
$message = $messageFilter->clean($message, 'string');

// Start the email cloaking process
$searchEmail = '([\w\.\-\+]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-zA-Z0-9\-]{2,10}))';
Expand All @@ -420,7 +420,7 @@ public function postFiltering($shout, $user, $swearCounter, $swearNumber, $displ
// Replace the found address with the js cloaked email
$message = substr_replace($message, $replacement, $regs[1][1], strlen($mail));
}

if ($swearCounter == 0 || $swearCounter == 1 && (($nameSwears + $messageSwears) <= $swearNumber))
{
return $this->addShout($shout['type'], $shout['id'], $name, $message, $ip);
Expand Down Expand Up @@ -506,7 +506,7 @@ public function bbcodeFilter($message)
'<a href="#" data-jj-image="http$1://$2" data-jj-image-alt="$3" class="jj-image-modal">$3</a>',
'<a href="http$1://$2" target="_blank">$3</a>'
);

$message = preg_replace($search, $replace, $message);

return $message;
Expand Down Expand Up @@ -1092,12 +1092,6 @@ public function preRender($shout)
$profile = $this->params->get('profile');
$shout->name = $this->linkUser($profile, $shout->name, $shout->user_id);

// Strip <a> from the username
if (in_array($profile, array(1, 2, 3, 4)))
{
$shout->name = strip_tags($shout->name);
}

// Perform Smiley and BBCode filtering if required
if ($bbcode == 1)
{
Expand Down
2 changes: 1 addition & 1 deletion mod_shoutbox/layouts/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

?>
<div>
<div data-shout-id="<?php echo $post->id; ?>" data-shout-name="<?php echo $post->name; ?>" class="shout-header" <?php echo $title; ?>>
<div data-shout-id="<?php echo $post->id; ?>" data-shout-name="<?php echo strip_tags($post->name); ?>" class="shout-header" <?php echo $title; ?>>
<span class="avatar"><?php echo $avatar; ?></span> <?php echo $post->name; ?> - <?php echo $post->when; ?>
<div class="shout-actions">
<?php if (($params->get('editown', 1) == 1) && $user->id == $post->user_id) : ?>
Expand Down
2 changes: 1 addition & 1 deletion mod_shoutbox/mod_shoutbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-3.0.html</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.joomjunk.co.uk</authorUrl>
<version>8.1.2</version>
<version>8.1.3</version>
<description>JJSHOUTBOX_DESCRIPTION</description>

<install>
Expand Down
1 change: 1 addition & 0 deletions mod_shoutbox/sql/mysql/updates/8.1.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Placeholder file for database changes for version 8.1.3
1 change: 1 addition & 0 deletions mod_shoutbox/sql/postgresql/updates/8.1.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Placeholder file for database changes for version 8.1.3

0 comments on commit 92930fb

Please sign in to comment.