Skip to content

Commit

Permalink
Little code updates
Browse files Browse the repository at this point in the history
  • Loading branch information
iMattPro committed Sep 4, 2021
1 parent dc490a6 commit 2d5dfe6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions adm/style/acp_abbc3_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
const select = document.querySelector("select[name='abbc3_icons_type']");
document.querySelector(".abbc3-icons-" + select.value).classList.toggle("hidden");
select.addEventListener("change", () => {
document.querySelectorAll(".abbc3-bar").forEach(bar => {
for (const bar of document.querySelectorAll(".abbc3-bar")) {
bar.classList.toggle("hidden");
});
}
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion core/acp_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function resynchronize_bbcode_order()
$order = 0;
while ($row = $this->db->sql_fetchrow($result))
{
if (++$order != $row['bbcode_order'])
if (++$order !== (int) $row['bbcode_order'])
{
$this->db->sql_query($this->update_bbcode_order($row['bbcode_id'], $order));
}
Expand Down
2 changes: 1 addition & 1 deletion core/bbcodes_display.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function display_custom_bbcodes($custom_tags, $row)
$icon_tag = strtolower(rtrim($row['bbcode_tag'], '='));

$custom_tags['BBCODE_IMG'] = isset($icons[$icon_tag]) ? $icons[$icon_tag] : '';
$custom_tags['S_CUSTOM_BBCODE_ALLOWED'] = !empty($row['bbcode_group']) ? $this->user_in_bbcode_group($row['bbcode_group']) : true;
$custom_tags['S_CUSTOM_BBCODE_ALLOWED'] = empty($row['bbcode_group']) || $this->user_in_bbcode_group($row['bbcode_group']);

return $custom_tags;
}
Expand Down
2 changes: 1 addition & 1 deletion core/bbcodes_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function get_max_bbcode_id()
*
* @param string $bbcode_name Name of bbcode
* @param string $bbcode_tag Tag name of bbcode
* @return mixed Existing bbcode data array or false if not found
* @return array|false Existing bbcode data array or false if not found
* @access protected
*/
public function bbcode_exists($bbcode_name, $bbcode_tag)
Expand Down

0 comments on commit 2d5dfe6

Please sign in to comment.