Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document reserved var names like viewtype (Trac #1332) #1332

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 16 comments
Closed

Document reserved var names like viewtype (Trac #1332) #1332

elgg-gitbot opened this issue Feb 16, 2013 · 16 comments
Labels

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/1332 on 39816029-05-21 by cash, assigned to unknown.

Elgg version: Github Master

elgg_view_entity_list() calls elgg_view on the view 'entities/entity_list'. It sets the viewtype parameter to get_input('search_viewtype','list'). This causes elgg_view to try to include /views/list/entities/entity_list.php.

The larger problem is that viewtype seems to be overloaded by Elgg. It is serving as the type indicator for the views system and for the search entity listing code (gallery vs list).

I think all that is needed is to correct the entity listing code to use search_viewtype.

@elgg-gitbot
Copy link
Author

brettp wrote on 39816043-11-25

Is this in 1.6 or trunk? If trunk, it would likely be a result of the new search.

@elgg-gitbot
Copy link
Author

cash wrote on 39816219-09-17

Sorry - didn't realize trunk was an option in the version drop down. It is trunk.

@elgg-gitbot
Copy link
Author

brettp wrote on 39816248-12-27

It wasn't an option but I had a hunch it should be ;)

Justin, if you don't mind, I've assigned this to you since it's concerning search. If you don't have time to check it out, feel free to assign it back to me and I'll have a look when I can. Thanks...

@elgg-gitbot
Copy link
Author

trac user jricher wrote on 39821118-05-18

Looks like Cash has it right. Do we have a list of such reserved variable names someplace? (Things like $CONFIG and $vars would go in there, too.)

@elgg-gitbot
Copy link
Author

cash wrote on 39821141-02-17

I've bumped into this type of thing enough that I've thought about documenting this on the wiki. Never got around to it. I'll at least create a page for it: http://docs.elgg.org/wiki/What_variables_are_reserved_by_Elgg%3F

@elgg-gitbot
Copy link
Author

Attachment added by trac user jricher on 39829653-02-18: search-viewtype.diff

@elgg-gitbot
Copy link
Author

cash wrote on 39959295-11-19

It looks like this has been partially patched. I still think there is possible issues in - I think the variable viewtype should be reserved and these files use it to refer to gallery versus lists rather than the standard default vs rss viewtype.

/mod/search/views/default/search/entity_list.php

/views/default/entities/entity_list.php

/views/default/navigation/viewtype.php

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8 by brettp on 40089635-03-08

@elgg-gitbot
Copy link
Author

Title changed from elgg_view_entity_list() is broken to Document all reserved get/post variables by brettp on 40089635-03-08

@elgg-gitbot
Copy link
Author

Title changed from Document all reserved get/post variables to Fix misused reserved var names by brettp on 40766449-11-18

@elgg-gitbot
Copy link
Author

brettp wrote on 40773908-09-07

Rels #2334.

@elgg-gitbot
Copy link
Author

cash wrote on 41144900-01-10

Looks like all the viewtype confusion has been cleaned up.

This is now a documentation ticket and we'll move it back.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.8.1 by cash on 41144900-01-10

@elgg-gitbot
Copy link
Author

Title changed from Fix misused reserved var names to Document reserved var names like viewtype by cash on 41144900-01-10

@elgg-gitbot
Copy link
Author

Milestone changed to Documentation by cash on 42070148-05-20

@ewinslow
Copy link
Contributor

ewinslow commented Nov 6, 2014

Closing because:

  • I don't see this ever happening in a heroic single-pass close-the-ticket kind of way.
  • Nor do I ever see it being "complete". This will be an ongoing process as the code keeps evolving.
  • No activity in years

@ewinslow ewinslow closed this as completed Nov 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants