Ticket #229: sluggify-patch.patch
| File sluggify-patch.patch, 1.7 KB (added by fotakis, 2 years ago) |
|---|
-
apps/frontend/config/app.yml
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /opt/apostrophe/1.3 # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process.
1 1 # default values 2 2 all: 3 3 a: 4 slugger_class: aSluggifier 4 5 # If true, there will be a language switcher next to the login/logout button 5 6 i18n_switch: true 6 7 i18n_languages: [en, fr, de, es] -
plugins/apostrophePlugin/lib/action/BaseaActions.class.php
201 201 $title = trim($this->getRequestParameter('title')); 202 202 $this->flunkUnless(strlen($title)); 203 203 204 $ pathComponent = $title;205 $pathComponent = strtolower(preg_replace("/[\W]+/", "-", $title));204 $slugger = sfConfig::get('app_a_slugger_class'); 205 $pathComponent = $slugger::sluggify($title,aTools::getUserCulture()); 206 206 207 207 $base = $parent->getSlug(); 208 208 if ($base === '/') -
plugins/apostrophePlugin/lib/slugger/aSluggifier.class.php
1 class aSluggifier{ 2 3 public static function sluggify($text, $culture="en"){ 4 return strtolower(preg_replace("/[\W]+/", "-", $title)); 5 } 6 7 } 8 No newline at end of file

