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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Luukyb’s picture

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

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

Looks good - bumped update to system_update_8028()

alexpott’s picture

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

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.