From 425467e15f4510aca3e271c256ce7946adc6258c Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Mon, 14 Feb 2022 16:01:08 +0100 Subject: [PATCH] related to #1609 Renamed 'cat_move' to 'albums' and linked variables so it works with new name --- admin.php | 4 ++-- admin/{cat_move.php => albums.php} | 6 +++--- admin/cat_list.php | 2 +- admin/cat_modify.php | 2 +- admin/include/functions.php | 2 +- admin/themes/default/js/{cat_move.js => albums.js} | 0 admin/themes/default/template/admin.tpl | 2 +- admin/themes/default/template/{cat_move.tpl => albums.tpl} | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename admin/{cat_move.php => albums.php} (97%) rename admin/themes/default/js/{cat_move.js => albums.js} (100%) rename admin/themes/default/template/{cat_move.tpl => albums.tpl} (98%) diff --git a/admin.php b/admin.php index 287f05521..dea47b07e 100644 --- a/admin.php +++ b/admin.php @@ -187,7 +187,7 @@ $template->assign( 'U_CONFIG_LANGUAGES' => $link_start.'languages', 'U_CONFIG_THEMES'=> $link_start.'themes', 'U_CATEGORIES'=> $link_start.'cat_list', - 'U_CAT_MOVE'=> $link_start.'cat_move', + 'U_ALBUMS'=> $link_start.'albums', 'U_CAT_OPTIONS'=> $link_start.'cat_options', 'U_CAT_SEARCH'=> $link_start.'cat_search', 'U_CAT_UPDATE'=> $link_start.'site_update&site=1', @@ -300,7 +300,7 @@ if ( or ( !empty($_POST) and in_array($page['page'], array( 'album', // public/private; lock/unlock, permissions - 'cat_move', + 'albums', 'cat_options', // public/private; lock/unlock 'user_list', // group assoc; user level 'user_perm', diff --git a/admin/cat_move.php b/admin/albums.php similarity index 97% rename from admin/cat_move.php rename to admin/albums.php index eaca205b4..d2a1319f9 100644 --- a/admin/cat_move.php +++ b/admin/albums.php @@ -115,11 +115,11 @@ $template->assign('open_cat', $open_cat); // +-----------------------------------------------------------------------+ // | template initialization | // +-----------------------------------------------------------------------+ -$template->set_filename('cat_move', 'cat_move.tpl'); +$template->set_filename('albums', 'albums.tpl'); $template->assign( array( - 'F_ACTION' => get_root_url().'admin.php?page=cat_move', + 'F_ACTION' => get_root_url().'admin.php?page=albums', ) ); @@ -190,7 +190,7 @@ $template->assign('PWG_TOKEN', get_pwg_token()); // | sending html code | // +-----------------------------------------------------------------------+ -$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_move'); +$template->assign_var_from_handle('ADMIN_CONTENT', 'albums'); // +-----------------------------------------------------------------------+ // | functions | diff --git a/admin/cat_list.php b/admin/cat_list.php index 1b7317ac1..3a2a9da96 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -324,7 +324,7 @@ foreach ($categories as $category) 'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'], 'U_EDIT' => $base_url.'album-'.$category['id'], 'U_ADD_PHOTOS_ALBUM' => $base_url.'photos_add&album='.$category['id'], - 'U_MOVE' => $base_url.'cat_move#cat-'.$category['id'], + 'U_MOVE' => $base_url.'albums#cat-'.$category['id'], 'IS_VIRTUAL' => empty($category['dir']) ); diff --git a/admin/cat_modify.php b/admin/cat_modify.php index a4dd56084..cc6cf1430 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -226,7 +226,7 @@ $template->assign( 'U_ADD_PHOTOS_ALBUM' => $base_url.'photos_add&album='.$category['id'], 'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'], 'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify', - 'U_MOVE' => $base_url.'cat_move#cat-'.$category['id'], + 'U_MOVE' => $base_url.'albums#cat-'.$category['id'], 'F_ACTION' => $form_action, ) diff --git a/admin/include/functions.php b/admin/include/functions.php index 0486a28e1..0ac5a9722 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -2699,7 +2699,7 @@ function get_active_menu($menu_page) case 'album': case 'cat_list': - case 'cat_move': + case 'albums': case 'cat_options': case 'cat_search': case 'permalinks': diff --git a/admin/themes/default/js/cat_move.js b/admin/themes/default/js/albums.js similarity index 100% rename from admin/themes/default/js/cat_move.js rename to admin/themes/default/js/albums.js diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index f7b6f97d4..60ee8489e 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -73,7 +73,7 @@ jQuery(document).ready(function() {
diff --git a/admin/themes/default/template/cat_move.tpl b/admin/themes/default/template/albums.tpl similarity index 98% rename from admin/themes/default/template/cat_move.tpl rename to admin/themes/default/template/albums.tpl index 10797f639..f0831abbf 100644 --- a/admin/themes/default/template/cat_move.tpl +++ b/admin/themes/default/template/albums.tpl @@ -23,7 +23,7 @@ var delay_autoOpen = {$delay_before_autoOpen} {combine_script id='jtree' load='footer' path='themes/default/js/plugins/tree.jquery.js'} {combine_css path="admin/themes/default/fontello/css/animation.css" order=10} {* order 10 is required, see issue 1080 *} -{combine_script id='cat_move' load='footer' path='admin/themes/default/js/cat_move.js'} +{combine_script id='albums' load='footer' path='admin/themes/default/js/albums.js'}

{'Move albums'|@translate}