cakephp / api_generator

[Unmaintained] Official CakePHP API Generator Git Repository
113 stars 31 forks source link

ApiDocHelper::fileLink returns wrong url on Operating Systems that use "\" as DS #18

Open ghost opened 11 years ago

ghost commented 11 years ago

Created by Frank Förster, 25th Aug 2012. (originally Lighthouse ticket #88):


What to expect

On an OS that uses the backslash "\" as directory separator, the fileLink helper function of the ApiDoc Helper should return a link like this:

http://path_to_cake_app/file/Controller/AppController.php

What happened

Instead it returns the links like this:

http://path_to_cake_app/file/Controller\AppController.php

What I did

Replace the backslash with forward slash after line 122

$trimmedFile = preg_replace('/\\\/', '/', $trimmedFile);