@@ 174-177 (lines=4) @@ | ||
171 | $plgPaths = Configure::read('App.paths.plugins'); |
|
172 | foreach ($plgPaths as $plgPath) { |
|
173 | $plgPath = ltrim(FS::clean($plgPath, '/'), '/'); |
|
174 | if (preg_match('(' . quotemeta($plgPath) . ')', $path)) { |
|
175 | $path = str_replace($plgPath, '', $path); |
|
176 | return [true, $path]; |
|
177 | } |
|
178 | } |
|
179 | ||
180 | foreach (Configure::read('plugins') as $name => $plgPath) { |
|
@@ 182-185 (lines=4) @@ | ||
179 | ||
180 | foreach (Configure::read('plugins') as $name => $plgPath) { |
|
181 | $plgPath = FS::clean($plgPath, '/'); |
|
182 | if (preg_match('(' . quotemeta($plgPath) . ')', $path)) { |
|
183 | $path = Str::low($name) . '/' . str_replace($plgPath, '', $path); |
|
184 | return [true, $path]; |
|
185 | } |
|
186 | } |
|
187 | ||
188 | return [$isPlugin, $path]; |