Skip to content
Snippets Groups Projects
Commit a91a3a56 authored by rde's avatar rde Committed by Jeremy Kersten
Browse files

[IMP] website: warn user about key change when editing special file name

The idea is to warn user if he created a special file (website.page with
supported extension) and he wants to change the file's name, which will at the
end also change the key).
If this special file has been t-called elsewhere, they t-call wont work anymore
This is why warning user is needed.

Note that this is different than the already existing page_search_dependencies
that is just checking if the URL is present in menus, templates, blog or pages.
This is about checking if the key is present somewhere. (we assume that if the
key is present, it is surely about a t-call.

Technically, the flow is:
1. Get supported extension
2. Get key dependencies
3. Check if user modify name
4. If name changed and it is/was a supported extension (special file) and it
   has dependencies (surely t-call) then warn user these call wont work anymore

--

search_page_dependencies is also improved by returning links to be clickable
(on delete dialog eg) and splitting template/page results.

it also refactor dependencies warning that was creating HTML in javascript into
using XML template
parent a8fc544c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment