Skip to content

Commit

Permalink
Merge pull request #218 from WildcardSearch/maintenance
Browse files Browse the repository at this point in the history
3.2.4 Release
  • Loading branch information
Mark Vincent authored Jun 20, 2018
2 parents e43d037 + 54b787a commit bc2bfd4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## MentionMe 3.2.3
## MentionMe 3.2.4

A plugin for MyBB 1.8.x that allows Twitter-style tagging and integration with [MyAlerts](https://github.com/euantorano/MyAlerts)

Expand Down
26 changes: 11 additions & 15 deletions Upload/inc/plugins/MentionMe/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function mentionBuild($user)
$url = get_profile_link($user['uid']);

$target = '';
if ($mybb->settings['mention_format_names']) {
if ($mybb->settings['mention_open_link_in_new_window']) {
$target = ' target="_blank"';
}

Expand Down Expand Up @@ -377,28 +377,24 @@ function mentionMeXMLHTTPgetNameCache()
SELECT p.username, u.avatar
FROM {$db->table_prefix}posts p
LEFT JOIN {$db->table_prefix}users u ON (p.uid=u.uid)
WHERE p.pid IN (
SELECT MAX(pid)
FROM {$db->table_prefix}posts
WHERE tid='{$tid}'
GROUP BY username
)
WHERE p.tid='{$tid}'
ORDER BY p.pid DESC
LIMIT {$limit}
");
} else {
$query = $db->simple_select('posts', 'username', "pid IN (
SELECT MAX(pid)
FROM {$db->table_prefix}posts
WHERE tid='{$tid}'
GROUP BY username
)", array("order_by" => 'pid', "order_dir" => 'DESC', "limit" => $limit));
$query = $db->simple_select('posts', 'username', "tid='{$tid}'", array("order_by" => 'pid', "order_dir" => 'DESC'));
}

if ($db->num_rows($query) > 0) {
while ($user = $db->fetch_array($query)) {
$count = 0;
while ($count < $limit && $user = $db->fetch_array($query)) {
$key = mb_strtolower($user['username']);

if (isset($names['inThread'][$key])) {
continue;
}

$names['inThread'][$key] = $user;
$count++;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Upload/inc/plugins/mention.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// checked by other plugin files
define('IN_MENTIONME', true);
define('MENTIONME_VERSION', '3.2.3');
define('MENTIONME_VERSION', '3.2.4');

// register custom class autoloader
spl_autoload_register('mentionMeClassAutoLoad');
Expand Down

0 comments on commit bc2bfd4

Please sign in to comment.