concretecms / concrete5-legacy

Legacy repository for concrete5
http://www.concrete5.org
559 stars 323 forks source link

Fix PageSelector helper #1945

Closed ArniPL closed 6 months ago

ArniPL commented 8 years ago

This fixes any code, that wants to change the default sitemap selector callback function.

Read more here.

Remo commented 8 years ago

Isn't that going to break existing code?

ArniPL commented 8 years ago

Correct me if I'm wrong but I don't think so. However, I did some further digging and I'm confused now.

On one hand, it seems that this was intended in the past, but never implemented here. File /concrete/tools/sitemap_search_selector.php expects this callback parameter, but /concrete/core/helpers/form/page_selector.php never passes it further. This is what my pull request fixes. (And this also fixes multi_page_selector_attribute_legacy package referenced above, but I truly don't know why it worked in the past).

On the other hand, file page_selector.php has some code that uses the $javascriptFunc variable and tries to change the default callback. But it doesn't work (or I don't get it). And if it did work, then why would sitemap_search_selector.php and every file deeper in the "include chain" look for callback parameter?

Can you shed some light on it? Thanks.

Remo commented 8 years ago

Well, I didn't write any of that myself, will have to do some digging myself. You have to give me some time as I'm super busy at the moment. I just want to ensure that we don't break anything..