Permalink controller cleanup
Merge pull request #892 from romainneutron/permalinks-cleanup

[3.8] Permalink controller cleanup