Move path_alias_whitelist to the state system
Move variable_get/_set/_delete to state()->get/set/delete

Files: 
CommentFileSizeAuthor
#11 path_alias_whitelist-1798884-11.patch1.78 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 42,324 pass(es). View
#8 path_alias_whitelist-1798884-8.patch2.01 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 42,183 pass(es). View
#7 path_alias_whitelist-1798884-7.patch1.06 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 42,187 pass(es). View
#5 path_alias_whitelist-1798884-5.patch2.01 KBLuukyb
PASSED: [[SimpleTest]]: [MySQL] 41,992 pass(es). View
#1 path_alias_whitelist-1798884.patch1.3 KBLuukyb
PASSED: [[SimpleTest]]: [MySQL] 41,900 pass(es). View

Comments

Luukyb’s picture

FileSize
1.3 KB
PASSED: [[SimpleTest]]: [MySQL] 41,900 pass(es). View
Luukyb’s picture

Status: Active » Needs review
alexpott’s picture

Status: Needs review » Needs work

The variable needs removing during Drupal 7 to 8 upgrade. See http://drupal.org/node/1787318 for how to do this.

alexpott’s picture

Issue tags: +State system
Luukyb’s picture

FileSize
2.01 KB
PASSED: [[SimpleTest]]: [MySQL] 41,992 pass(es). View

Ok cool, I added the namespace to the variable and the system_update function.
Thanks for reviewing.

Luukyb’s picture

Status: Needs work » Needs review
alexpott’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.06 KB
PASSED: [[SimpleTest]]: [MySQL] 42,187 pass(es). View

Looks good - bumped update to system_update_8028()

alexpott’s picture

FileSize
2.01 KB
PASSED: [[SimpleTest]]: [MySQL] 42,183 pass(es). View

The patch attached to #7 was bogus... not sure what happened there.

Anyhow... patch in #6 still looks good - just bumped update to system_update_8028()

webchick’s picture

Status: Reviewed & tested by the community » Fixed

8029* ;) Been a busy night!

Committed and pushed that (with the renumbering, and also a > 80 chars comment fix).

Lars Toomre’s picture

Status: Fixed » Needs work

I think that there was a problem with this patch. There is no second parameter in calls to state()->get.

If I understand correctly, variable_get('my_data', 'bar') should become:

$data = state()->get('my_data') ?: 'bar';

As a result, I am setting this back to needs work for the correction(s).

alexpott’s picture

FileSize
1.78 KB
PASSED: [[SimpleTest]]: [MySQL] 42,324 pass(es). View

And the upgrade is unnecessary :)

alexpott’s picture

Status: Needs work » Needs review
alexpott’s picture

btw... no need to provide a default as NULL will be return by the state system if it's not set... which is the same as the default.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Needs work

This shouldn't really be in the state system, it's a cache, it just happens to be a cache that's /extremely/ expensive to rebuild so it was stuffed into variables.

I'd rather do #1209226: Avoid slow query for path alias whitelists (which was getting a lot closer last time I looked).

catch’s picture

This shouldn't really be in the state system, it's a cache, it just happens to be a cache that's /extremely/ expensive to rebuild so it was stuffed into variables.

I'd rather do #1209226: Avoid slow query for path alias whitelists (which was getting a lot closer last time I looked).

miro_dietiker’s picture

Status: Needs work » Postponed

Postponing, hope the other issue will fix it. The other first.
#1209226: Avoid slow query for path alias whitelists

sun’s picture

Component: configuration system » routing system

Not sure what the proper component for this is, but configuration system isn't. :)

Berdir’s picture

Status: Postponed » Closed (duplicate)

Also, I think this was already done as part of the alias/path refactoring.