Skip to content

Commit 3256f88

Browse files
author
Mark Vincent
authored
Merge pull request #258 from WildcardSearch/maintenance
3.1.3 Release
2 parents 78a697c + 9715042 commit 3256f88

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Advanced-Sidebox 3.1.2
1+
## Advanced-Sidebox 3.1.3
22

33
<p align="center">
44
<img title="Advanced Sidebox Logo" alt="Advanced Sidebox Logo" src="http://i.imgur.com/4QWLq5V.png" />

Upload/inc/plugins/asb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// for modules
1616
define('IN_ASB', true);
1717
define('ASB_MODULES_DIR', MYBB_ROOT . 'inc/plugins/asb/modules');
18-
define('ASB_VERSION', '3.1.2');
18+
define('ASB_VERSION', '3.1.3');
1919

2020
// some basic functions used everywhere
2121
require_once MYBB_ROOT . 'inc/plugins/asb/functions.php';

Upload/inc/plugins/asb/install.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
function asb_info()
2222
{
23-
global $mybb, $lang, $cp_style;
23+
global $mybb, $lang, $cp_style, $cache;
2424

2525
if (!$lang->asb) {
2626
$lang->load('asb');
@@ -39,18 +39,29 @@ function asb_info()
3939
EOF;
4040
}
4141

42+
// only show Manage Sideboxes link if active
43+
$plugin_list = $cache->read('plugins');
44+
$manage_link = '';
45+
if (!empty($plugin_list['active']) &&
46+
is_array($plugin_list['active']) &&
47+
in_array('asb', $plugin_list['active'])) {
48+
$url = ASB_URL;
49+
$manage_link = <<<EOF
50+
<li style="list-style-image: url(styles/{$cp_style}/images/asb/manage.png)">
51+
<a href="{$url}" title="{$lang->asb_manage_sideboxes}">{$lang->asb_manage_sideboxes}</a>
52+
</li>
53+
EOF;
54+
}
55+
4256
$settings_link = <<<EOF
4357
<li style="list-style-image: url(styles/{$cp_style}/images/asb/settings.png)">
4458
{$settings_link}
4559
</li>
4660
EOF;
47-
$url = ASB_URL;
4861
$extra_links = <<<EOF
4962
<ul>
5063
{$settings_link}
51-
<li style="list-style-image: url(styles/{$cp_style}/images/asb/manage.png)">
52-
<a href="{$url}" title="{$lang->asb_manage_sideboxes}">{$lang->asb_manage_sideboxes}</a>
53-
</li>{$remove_link}
64+
{$manage_link}{$remove_link}
5465
<li style="list-style-image: url(styles/{$cp_style}/images/asb/help.png)">
5566
<a href="https://github.com/WildcardSearch/Advanced-Sidebox/wiki/Help-Installation" title="{$lang->asb_help}">{$lang->asb_help}</a>
5667
</li>

Upload/inc/plugins/asb/modules/recent_posts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function recent_posts_get_postlist($settings)
286286
}
287287

288288
$post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject']));
289-
$post['link'] = get_thread_link($post['tid']) . "&amp;pid={$post['pid']}#pid{$post['pid']}";
289+
$post['link'] = get_post_link($post['pid'], $post['tid']) . "#pid{$post['pid']}";
290290

291291
// we just need the text and smilies (we'll parse them after we check length)
292292
$pattern = "|[[\/\!]*?[^\[\]]*?]|si";

0 commit comments

Comments
 (0)