WordPress.org

Make WordPress Core

Ticket #17846: wp-filesystem-ftpext.patch

File wp-filesystem-ftpext.patch, 772 bytes (added by Oded, 7 years ago)

Patch to add parsing of link details and normalization of the link name

  • wp-admin/includes/class-wp-filesystem-ftpext.php

     
    324324                               $b['time'] = strtotime( sprintf('%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute']) );
    325325                               $b['name'] = $lucifer[8];
    326326                       }
     327                       if ($b['islink'] && preg_match('/(\s*->\s*.*)$/', $b['name'], $match)) {
     328                           $b['name'] = str_replace($match[1],'',$b['name']);
     329                       }
    327330               }
    328331
    329332               return $b;