From 8149793149951c48fdac160350ec607192020962 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Sun, 6 Sep 2026 21:49:09 +0200 Subject: [PATCH] Bump Bratonien Tools to 0.9.7.1.45 --- main.inc.php | 168 +-------------------------------------------------- 1 file changed, 2 insertions(+), 166 deletions(-) diff --git a/main.inc.php b/main.inc.php index f05c897..00e97d4 100644 --- a/main.inc.php +++ b/main.inc.php @@ -1,7 +1,7 @@ 0) - { - continue; - } - - bratonien_tools_grant_private_album_access($category_id, $user_id); - $changed = true; - } - - if ($changed && function_exists('invalidate_user_cache')) - { - invalidate_user_cache(true); - } - }); -} - -function bratonien_tools_grant_private_album_access($category_id, $user_id) -{ - $category_id = (int)$category_id; - $user_id = (int)$user_id; - if ($category_id < 1 || $user_id < 1) - { - return; - } - - $query = '\nSELECT 1\n FROM '.USER_ACCESS_TABLE.'\n WHERE user_id = '.$user_id.'\n AND cat_id = '.$category_id.'\n LIMIT 1\n;'; - $result = pwg_query($query); - if (pwg_db_num_rows($result) > 0) - { - return; - } - - single_insert( - USER_ACCESS_TABLE, - array( - 'user_id' => $user_id, - 'cat_id' => $category_id, - ) - ); -} - -function bratonien_tools_fix_admin_album_stat_tile() -{ - global $template; - - if (!defined('IN_ADMIN')) - { - return; - } - - $template->set_prefilter('intro', 'bratonien_tools_prefilter_admin_album_stat_tile'); -} - -function bratonien_tools_prefilter_admin_album_stat_tile($source) -{ - return str_replace('{if $NB_ALBUMS > 1}', '{if $NB_ALBUMS > 0}', $source); -} - -function bratonien_tools_add_legal_footer_links() -{ - global $template; - - if (defined('IN_ADMIN')) - { - return; - } - - $template->append( - 'footer_elements', - ' - Impressum' - .' - Datenschutzerklärung' - ); -} function bratonien_tools_admin_menu($menu) { $menu[] = array( 'NAME' => 'Bratonien Tools', - 'URL' => get_root_url() . 'admin.php?page=plugin-' . BRATONIEN_TOOLS_ID, + 'URL' => get_root_url().'admin.php?page=plugin-'.BRATONIEN_TOOLS_ID, ); return $menu; } -?> \ No newline at end of file