diff --git a/README.md b/README.md
index 64eb9a9..f30b478 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Advanced-Sidebox 3.1.15
+## Advanced-Sidebox 3.1.16
diff --git a/Upload/inc/plugins/asb.php b/Upload/inc/plugins/asb.php
index b801e91..5ae64b5 100644
--- a/Upload/inc/plugins/asb.php
+++ b/Upload/inc/plugins/asb.php
@@ -15,7 +15,7 @@
// for modules
define('IN_ASB', true);
define('ASB_MODULES_DIR', MYBB_ROOT.'inc/plugins/asb/modules');
-define('ASB_VERSION', '3.1.15');
+define('ASB_VERSION', '3.1.16');
define('ASB_CUSTOM_VERSION', '2.0');
define('ASB_SCRIPT_VERSION', '2.0');
diff --git a/Upload/inc/plugins/asb/classes/AdvancedSideboxCache.php b/Upload/inc/plugins/asb/classes/AdvancedSideboxCache.php
index e201406..c31ef24 100644
--- a/Upload/inc/plugins/asb/classes/AdvancedSideboxCache.php
+++ b/Upload/inc/plugins/asb/classes/AdvancedSideboxCache.php
@@ -72,28 +72,28 @@ public function buildCache(&$data)
$data['has_changed'] = false;
// get all the active scripts' info
- $all_scripts = asb_get_all_scripts();
+ $allScripts = asbGetAllScripts();
// no scripts, no work to do
- if (!is_array($all_scripts) ||
- empty($all_scripts)) {
+ if (!is_array($allScripts) ||
+ empty($allScripts)) {
return;
}
// store the script definitions and a master list
- foreach ($all_scripts as $filename => $script) {
+ foreach ($allScripts as $filename => $script) {
$data['scripts'][$filename] = $script;
}
- $data['all_scripts'] = array_keys($all_scripts);
+ $data['all_scripts'] = array_keys($allScripts);
// load all detected modules
- $addons = asb_get_all_modules();
+ $addons = asbGetAllModules();
// get any custom boxes
- $custom = asb_get_all_custom();
+ $custom = asbGetAllCustomBoxes();
// get any sideboxes
- $sideboxes = asb_get_all_sideboxes();
+ $sideboxes = asbGetAllSideBoxes();
if (!is_array($sideboxes) ||
empty($sideboxes)) {
diff --git a/Upload/inc/plugins/asb/classes/AdvancedSideboxInstaller.php b/Upload/inc/plugins/asb/classes/AdvancedSideboxInstaller.php
index 7883db2..e71bb2b 100644
--- a/Upload/inc/plugins/asb/classes/AdvancedSideboxInstaller.php
+++ b/Upload/inc/plugins/asb/classes/AdvancedSideboxInstaller.php
@@ -30,7 +30,7 @@ static public function getInstance()
* @param string path to the install data
* @return void
*/
- public function __construct($path = '')
+ public function __construct($path='')
{
parent::__construct(MYBB_ROOT.'inc/plugins/asb/install_data.php');
}
diff --git a/Upload/inc/plugins/asb/classes/CustomSidebox.php b/Upload/inc/plugins/asb/classes/CustomSidebox.php
index c5b1bc8..d546359 100644
--- a/Upload/inc/plugins/asb/classes/CustomSidebox.php
+++ b/Upload/inc/plugins/asb/classes/CustomSidebox.php
@@ -45,7 +45,7 @@ class CustomSidebox extends PortableObject010001
* @param array|int data or id
* @return void
*/
- public function __construct($data = '')
+ public function __construct($data='')
{
$this->noStore[] = 'baseName';
parent::__construct($data);
@@ -72,7 +72,7 @@ public function load($data)
* @param bool prevent removal of sideboxes of this type?
* @return bool success/fail
*/
- public function remove($noCleanup = false)
+ public function remove($noCleanup=false)
{
// unless specifically requested otherwise clean up
if (!$noCleanup) {
@@ -106,11 +106,11 @@ public function buildTemplate($template_variable)
global $$template_variable, $mybb, $lang;
$content = $this->content;
- $ret_val = true;
+ $returnVal = true;
// if the user doesn't want content then at least make it validate
if (strlen($content) == 0) {
- $ret_val = false;
+ $returnVal = false;
$content = '
|
@@ -119,7 +119,7 @@ public function buildTemplate($template_variable)
$content = str_replace("\\'", "'", addslashes($content));
eval("\${$template_variable} = \"{$content}\";");
}
- return $ret_val;
+ return $returnVal;
}
}
diff --git a/Upload/inc/plugins/asb/classes/SideboxExternalModule.php b/Upload/inc/plugins/asb/classes/SideboxExternalModule.php
index 263656b..a64ba94 100644
--- a/Upload/inc/plugins/asb/classes/SideboxExternalModule.php
+++ b/Upload/inc/plugins/asb/classes/SideboxExternalModule.php
@@ -143,7 +143,7 @@ public function load($module)
* @param bool remove install data before beginning?
* @return void
*/
- public function install($cleanup = true)
+ public function install($cleanup=true)
{
global $db;
@@ -162,7 +162,7 @@ public function install($cleanup = true)
return;
}
- $insert_array = array();
+ $insertArray = array();
foreach ($this->templates as $template) {
$template['sid'] = -2;
$query = $db->simple_select('templates', '*', "title='{$template['title']}' AND sid IN('-2', '-1')");
@@ -172,12 +172,12 @@ public function install($cleanup = true)
$db->update_query('templates', $template, "title='{$template['title']}' AND sid IN('-2', '-1')");
} else {
// if not, create a new template
- $insert_array[] = $template;
+ $insertArray[] = $template;
}
}
- if (!empty($insert_array)) {
- $db->insert_query_multiple('templates', $insert_array);
+ if (!empty($insertArray)) {
+ $db->insert_query_multiple('templates', $insertArray);
}
}
@@ -188,7 +188,7 @@ public function install($cleanup = true)
* @param bool remove children
* @return void
*/
- public function uninstall($cleanup = true)
+ public function uninstall($cleanup=true)
{
$this->unsetCacheVersion();
@@ -203,15 +203,15 @@ public function uninstall($cleanup = true)
}
// remove them all
- $delete_list = $sep = '';
+ $deleteList = $sep = '';
foreach ($this->templates as $template) {
- $delete_list .= "{$sep}'{$template['title']}'";
+ $deleteList .= "{$sep}'{$template['title']}'";
$sep = ',';
}
- if ($delete_list) {
+ if ($deleteList) {
global $db;
- $db->delete_query('templates', "title IN({$delete_list})");
+ $db->delete_query('templates', "title IN({$deleteList})");
}
}
@@ -232,14 +232,14 @@ protected function upgrade()
// if any templates were dropped in this version
if (is_array($this->discarded_templates)) {
// delete them
- $delete_list = $sep = '';
+ $deleteList = $sep = '';
foreach ($this->discarded_templates as $template) {
- $delete_list .= "{$sep}'{$template}'";
+ $deleteList .= "{$sep}'{$template}'";
$sep = ',';
}
- if ($delete_list) {
- $db->delete_query('templates', "title IN({$delete_list})");
+ if ($deleteList) {
+ $db->delete_query('templates', "title IN({$deleteList})");
}
}
@@ -438,9 +438,9 @@ public function doSettingsLoad()
*/
public function doSettingsSave($settings)
{
- $retval = $this->run('settings_save', $settings);
- if ($retval) {
- return $retval;
+ $returnVal = $this->run('settings_save', $settings);
+ if ($returnVal) {
+ return $returnVal;
}
return $settings;
}
diff --git a/Upload/inc/plugins/asb/classes/SideboxObject.php b/Upload/inc/plugins/asb/classes/SideboxObject.php
index fb49028..517054d 100644
--- a/Upload/inc/plugins/asb/classes/SideboxObject.php
+++ b/Upload/inc/plugins/asb/classes/SideboxObject.php
@@ -75,7 +75,7 @@ class SideboxObject extends StorableObject010000
* @param array|int data or id
* @return void
*/
- function __construct($data = '')
+ function __construct($data='')
{
$this->noStore[] = 'hasSettings';
parent::__construct($data);
diff --git a/Upload/inc/plugins/asb/modules/latest_threads.php b/Upload/inc/plugins/asb/modules/latest_threads.php
index 9ccb01a..d66540d 100644
--- a/Upload/inc/plugins/asb/modules/latest_threads.php
+++ b/Upload/inc/plugins/asb/modules/latest_threads.php
@@ -275,13 +275,13 @@ function asb_latest_threads_get_threadlist($settings, $width)
}
// build the exclude conditions
- $show['fids'] = asb_build_id_list($settings['forum_show_list'], 't.fid');
- $show['tids'] = asb_build_id_list($settings['thread_show_list'], 't.tid');
- $hide['fids'] = asb_build_id_list($settings['forum_hide_list'], 't.fid');
- $hide['tids'] = asb_build_id_list($settings['thread_hide_list'], 't.tid');
- $where['show'] = asb_build_SQL_where($show, ' OR ');
- $where['hide'] = asb_build_SQL_where($hide, ' OR ', ' NOT ');
- $query_where = $new_threads.$important_threads.$unviewwhere.$inactivewhere.asb_build_SQL_where($where, ' AND ', ' AND ');
+ $show['fids'] = asbBuildIdList($settings['forum_show_list'], 't.fid');
+ $show['tids'] = asbBuildIdList($settings['thread_show_list'], 't.tid');
+ $hide['fids'] = asbBuildIdList($settings['forum_hide_list'], 't.fid');
+ $hide['tids'] = asbBuildIdList($settings['thread_hide_list'], 't.tid');
+ $where['show'] = asbBuildSqlWhere($show, ' OR ');
+ $where['hide'] = asbBuildSqlWhere($hide, ' OR ', ' NOT ');
+ $query_where = $new_threads.$important_threads.$unviewwhere.$inactivewhere.asbBuildSqlWhere($where, ' AND ', ' AND ');
$altbg = alt_trow();
$threadlist = '';
diff --git a/Upload/inc/plugins/asb/modules/rand_quote.php b/Upload/inc/plugins/asb/modules/rand_quote.php
index e796eb9..6070165 100644
--- a/Upload/inc/plugins/asb/modules/rand_quote.php
+++ b/Upload/inc/plugins/asb/modules/rand_quote.php
@@ -229,13 +229,13 @@ function asb_rand_quote_get_quote($settings, $width)
}
// build the exclude conditions
- $show['fids'] = asb_build_id_list($settings['forum_show_list'], 'p.fid');
- $show['tids'] = asb_build_id_list($settings['thread_show_list'], 'p.tid');
- $hide['fids'] = asb_build_id_list($settings['forum_hide_list'], 'p.fid');
- $hide['tids'] = asb_build_id_list($settings['thread_hide_list'], 'p.tid');
- $where['show'] = asb_build_SQL_where($show, ' OR ');
- $where['hide'] = asb_build_SQL_where($hide, ' OR ', ' NOT ');
- $query_where = $important_threads.$unviewwhere.$inactivewhere.asb_build_SQL_where($where, ' AND ', ' AND ');
+ $show['fids'] = asbBuildIdList($settings['forum_show_list'], 'p.fid');
+ $show['tids'] = asbBuildIdList($settings['thread_show_list'], 'p.tid');
+ $hide['fids'] = asbBuildIdList($settings['forum_hide_list'], 'p.fid');
+ $hide['tids'] = asbBuildIdList($settings['thread_hide_list'], 'p.tid');
+ $where['show'] = asbBuildSqlWhere($show, ' OR ');
+ $where['hide'] = asbBuildSqlWhere($hide, ' OR ', ' NOT ');
+ $query_where = $important_threads.$unviewwhere.$inactivewhere.asbBuildSqlWhere($where, ' AND ', ' AND ');
$post_query = $db->query("
SELECT
@@ -265,7 +265,7 @@ function asb_rand_quote_get_quote($settings, $width)
// we just need the text and smilies (we'll parse them after we check length)
$pattern = "|[[\/\!]*?[^\[\]]*?]|si";
- $new_message = asb_strip_url(preg_replace($pattern, '$1', $rand_post['message']));
+ $new_message = asbStripUrls(preg_replace($pattern, '$1', $rand_post['message']));
// get some dimensions that make sense in relation to column width
$asb_width = (int) $width;
diff --git a/Upload/inc/plugins/asb/modules/recent_posts.php b/Upload/inc/plugins/asb/modules/recent_posts.php
index 5064ec5..029d215 100644
--- a/Upload/inc/plugins/asb/modules/recent_posts.php
+++ b/Upload/inc/plugins/asb/modules/recent_posts.php
@@ -196,13 +196,13 @@ function recent_posts_get_postlist($settings)
}
// build the exclude conditions
- $show['fids'] = asb_build_id_list($settings['forum_show_list'], 'p.fid');
- $show['tids'] = asb_build_id_list($settings['thread_show_list'], 'p.tid');
- $hide['fids'] = asb_build_id_list($settings['forum_hide_list'], 'p.fid');
- $hide['tids'] = asb_build_id_list($settings['thread_hide_list'], 'p.tid');
- $where['show'] = asb_build_SQL_where($show, ' OR ');
- $where['hide'] = asb_build_SQL_where($hide, ' OR ', ' NOT ');
- $query_where = $important_threads.$unviewwhere.$inactivewhere.asb_build_SQL_where($where, ' AND ', ' AND ');
+ $show['fids'] = asbBuildIdList($settings['forum_show_list'], 'p.fid');
+ $show['tids'] = asbBuildIdList($settings['thread_show_list'], 'p.tid');
+ $hide['fids'] = asbBuildIdList($settings['forum_hide_list'], 'p.fid');
+ $hide['tids'] = asbBuildIdList($settings['thread_hide_list'], 'p.tid');
+ $where['show'] = asbBuildSqlWhere($show, ' OR ');
+ $where['hide'] = asbBuildSqlWhere($hide, ' OR ', ' NOT ');
+ $query_where = $important_threads.$unviewwhere.$inactivewhere.asbBuildSqlWhere($where, ' AND ', ' AND ');
$altbg = alt_trow();
$maxtitlelen = 48;
@@ -272,7 +272,7 @@ function recent_posts_get_postlist($settings)
// we just need the text and smilies (we'll parse them after we check length)
$pattern = "|[[\/\!]*?[^\[\]]*?]|si";
- $post_excerpt = strip_tags(str_replace('
', '', asb_strip_url(preg_replace($pattern, '$1', $post['message']))));
+ $post_excerpt = strip_tags(str_replace('
', '', asbStripUrls(preg_replace($pattern, '$1', $post['message']))));
if ($settings['max_length'] &&
strlen($post_excerpt) > $settings['max_length']) {
diff --git a/Upload/inc/plugins/asb/modules/slideshow.php b/Upload/inc/plugins/asb/modules/slideshow.php
index 4b98e5e..2b0c5e5 100644
--- a/Upload/inc/plugins/asb/modules/slideshow.php
+++ b/Upload/inc/plugins/asb/modules/slideshow.php
@@ -167,7 +167,7 @@ function asb_slideshow_build_template($args)
$rate = (int) $settings['rate'] ? (int) $settings['rate'] : 10;
$fade_rate = (float) $settings['fade_rate'] ? (int) ($settings['fade_rate'] * 1000) : 400;
- $filenames = asb_get_folder_images($folder, '', $settings['recursive']);
+ $filenames = asbGetImagesFromPath($folder, '', $settings['recursive']);
if (!$filenames) {
$$template_var = <<
diff --git a/Upload/inc/plugins/asb/modules/staff_online_box.php b/Upload/inc/plugins/asb/modules/staff_online_box.php
index 6d378ce..07f69be 100644
--- a/Upload/inc/plugins/asb/modules/staff_online_box.php
+++ b/Upload/inc/plugins/asb/modules/staff_online_box.php
@@ -170,11 +170,11 @@ function asb_staff_online_box_get_online_staff($settings, $width)
$users = array();
// build user group exclusions (if any)
- $show = asb_build_id_list($settings['group_show_list'], 'gid');
- $hide = asb_build_id_list($settings['group_hide_list'], 'gid');
- $where['show'] = asb_build_SQL_where($show, ' OR ');
- $where['hide'] = asb_build_SQL_where($hide, ' OR ', ' NOT ');
- $group_where = asb_build_SQL_where($where, ' AND ', ' AND ');
+ $show = asbBuildIdList($settings['group_show_list'], 'gid');
+ $hide = asbBuildIdList($settings['group_hide_list'], 'gid');
+ $where['show'] = asbBuildSqlWhere($show, ' OR ');
+ $where['hide'] = asbBuildSqlWhere($hide, ' OR ', ' NOT ');
+ $group_where = asbBuildSqlWhere($where, ' AND ', ' AND ');
// get all the groups admin has specified should be shown on showteam.php
$query = $db->simple_select('usergroups', 'gid, title, usertitle, image', "showforumteam=1{$group_where}", array('order_by' => 'disporder'));
diff --git a/Upload/inc/plugins/asb/modules/top_poster.php b/Upload/inc/plugins/asb/modules/top_poster.php
index 0f204d8..2c34e5e 100644
--- a/Upload/inc/plugins/asb/modules/top_poster.php
+++ b/Upload/inc/plugins/asb/modules/top_poster.php
@@ -211,11 +211,11 @@ function asb_top_poster_build_template($args)
}
// build user group exclusions (if any)
- $show = asb_build_id_list($settings['group_show_list'], 'u.usergroup');
- $hide = asb_build_id_list($settings['group_hide_list'], 'u.usergroup');
- $where['show'] = asb_build_SQL_where($show, ' OR ');
- $where['hide'] = asb_build_SQL_where($hide, ' OR ', ' NOT ');
- $group_where = asb_build_SQL_where($where, ' AND ', ' AND ');
+ $show = asbBuildIdList($settings['group_show_list'], 'u.usergroup');
+ $hide = asbBuildIdList($settings['group_hide_list'], 'u.usergroup');
+ $where['show'] = asbBuildSqlWhere($show, ' OR ');
+ $where['hide'] = asbBuildSqlWhere($hide, ' OR ', ' NOT ');
+ $group_where = asbBuildSqlWhere($where, ' AND ', ' AND ');
$forum_where = $thread_where = $extraCongrats = '';
$tid = (int) $settings['tid'];