To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #240: aMediaTools.patch

File aMediaTools.patch, 0.8 KB (added by fotakis, 2 years ago)
  • aMediaTools.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: /opt/apostrophe/trunk/plugins/apostrophePlugin/lib/toolkit
    # 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.
     
    172172  { 
    173173    if ($actions->hasRequestParameter('slug')) 
    174174    { 
    175       $slug = preg_replace("/[^\w\-]/", "", $actions->getRequestParameter('slug')); 
     175      $slug = aTools::slugify($actions->getRequestParameter('slug')); 
     176                         
    176177      $item = Doctrine_Query::create()-> 
    177178        from('aMediaItem')-> 
    178179        where('slug = ?', array($slug))->