mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-06 12:38:41 +00:00
inspection fixes
This commit is contained in:
parent
601fdf7567
commit
b95bc398fd
|
|
@ -429,7 +429,7 @@ final class ApiController extends Controller
|
|||
$mediaCollection->addSource(new NullMedia((int) $file));
|
||||
}
|
||||
|
||||
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? '/'));
|
||||
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? '/'));
|
||||
|
||||
$outputDir = '';
|
||||
if (empty($request->getData('path'))) {
|
||||
|
|
@ -502,10 +502,10 @@ final class ApiController extends Controller
|
|||
*/
|
||||
public function apiMediaCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||
{
|
||||
$path = \urldecode((string) ($request->getData('path') ?? ''));
|
||||
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? ''));
|
||||
$fileName = (string) ($request->getData('fileName') ?? ($request->getData('name') ?? ''));
|
||||
$fileName .= \strripos($fileName, '.') === false ? '.txt' : '';
|
||||
$path = \urldecode((string) ($request->getData('path') ?? ''));
|
||||
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? ''));
|
||||
$fileName = (string) ($request->getData('fileName') ?? ($request->getData('name') ?? ''));
|
||||
$fileName .= \strripos($fileName, '.') === false ? '.txt' : '';
|
||||
|
||||
$outputDir = '';
|
||||
if (empty($request->getData('path'))) {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ final class BackendController extends Controller
|
|||
/** @var string[] $glob */
|
||||
$glob = $collection->isAbsolute()
|
||||
? $collection->getPath() . '/' . $collection->getName() . '/*'
|
||||
: \glob(__DIR__ . '/../Files' . '/' . \rtrim($collection->getPath(), '/') . '/' . $collection->getName() . '/*');
|
||||
: \glob(__DIR__ . '/../Files/' . \rtrim($collection->getPath(), '/') . '/' . $collection->getName() . '/*');
|
||||
$glob = $glob === false ? [] : $glob;
|
||||
|
||||
foreach ($glob as $file) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user