modxbot / migrate

A testground for migrating issues and other such fun
0 stars 0 forks source link

Move modResource.cleanAlias to modX.cleanAlias #10222

Open modxbot opened 11 years ago

modxbot commented 11 years ago

markh created Redmine issue ID 10222

The cleanAlias function is super useful in 3PCs that deal with custom urls, as it does all the translit magic and makes sure the urls are safe to use. Unfortunately you need a modResource object (which for example is not available in the OnPageNotFound event) to use it, which is sort of hacky and doesn't feel like a general-purpose function.

I'd like to propose moving the cleanAlias function to the main modX class to encourage usage in 3PCs. To maintain backwards compatibility, the modResource.cleanAlias function could be deprecated and simply pass along the properties to $this->xpdo->cleanAlias.

modxbot commented 11 years ago

markh submitted:

PR sent: https://github.com/modxcms/revolution/pull/620

modxbot commented 11 years ago

markh submitted:

Additional proposal by Jason here: https://github.com/modxcms/revolution/pull/634

garryn commented 10 years ago

Closing this as it's been handled by Jason's proposal :)