Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Makes sure that all node edit links are prefixed #5978

Merged
itsjoekent merged 5 commits intoDoSomethingArchive:devfrom
itsjoekent-archive:5952
Jan 5, 2016
Merged

Makes sure that all node edit links are prefixed #5978
itsjoekent merged 5 commits intoDoSomethingArchive:devfrom
itsjoekent-archive:5952

Conversation

@itsjoekent
Copy link
Contributor

What's this PR do?

Makes sure that the correct prefix is applied to node edit pages

How should this be manually tested?

Can you click/goto global edit links, and then view the page without error?
What about normal edit links?

Any background context you want to provide?

The node edit logic never cared about prefixes as they aren't required for the correct node edit page. The implications of this however are the cause of #5952

What are the relevant tickets?

Fixes #5952

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How dosomething_global_get_current_prefix() can return an empty string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global language

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then better use === operand and explain the logic in comment.
Also, !empty($prefix).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yeah Ill use the empty function

@itsjoekent
Copy link
Contributor Author

@sergii-tkachenko fixed!

@sergiitk
Copy link
Contributor

sergiitk commented Jan 5, 2016

I think it's better to use === '' for the first statement, as I explained in the #5978 (comment).

@sergiitk
Copy link
Contributor

sergiitk commented Jan 5, 2016

And explain in the comment after if that the function returns an empty string for Global language.

@itsjoekent
Copy link
Contributor Author

whats the difference between === ' ' and empty?

@sergiitk
Copy link
Contributor

sergiitk commented Jan 5, 2016

Empty = FALSE = '' = 0 = NULL = "0" = 0.0 = array(), etc...
=== '' just equals empty string.

@sergiitk
Copy link
Contributor

sergiitk commented Jan 5, 2016

@itsjoekent
Copy link
Contributor Author

@sergii-tkachenko updated, I think I got what you were suggesting now

@sergiitk
Copy link
Contributor

sergiitk commented Jan 5, 2016

Thanks @deadlybutter! 👍

itsjoekent pushed a commit that referenced this pull request Jan 5, 2016
Makes sure that all node edit links are prefixed
@itsjoekent itsjoekent merged commit dbe2e4f into DoSomethingArchive:dev Jan 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

clicking view on campaign edit without prefix, causes redirect loop

2 participants