mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-30 09:28:39 +00:00
backup
This commit is contained in:
parent
e513f0a950
commit
7f52d076e6
|
|
@ -1092,7 +1092,7 @@ final class ApiController extends Controller
|
|||
$data['guard'] = __DIR__ . '/../Files';
|
||||
}
|
||||
} else {
|
||||
if (!isset($data, $data['guard'])) {
|
||||
if (empty($data) || !isset($data['guard'])) {
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::HIDDEN, '', '', []);
|
||||
$response->header->status = RequestStatusCode::R_403;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,15 @@ use \phpOMS\Uri\UriFactory;
|
|||
|
||||
?>
|
||||
<style>html, body, iframe { margin: 0; padding: 0; border: 0; }</style>
|
||||
<iframe class="col-simple" id="iMediaFrame" width="100%" height="100%" src="<?= UriFactory::build('/Resources/mozilla/Pdf/web/viewer.html?file=' . \urlencode(UriFactory::build('{/api}media/export?id=' . $this->media->id))); ?>" allowfullscreen></iframe>
|
||||
<iframe
|
||||
class="col-simple"
|
||||
id="iMediaFrame"
|
||||
width="100%"
|
||||
height="100%"
|
||||
src="<?= UriFactory::build(
|
||||
'/Resources/mozilla/Pdf/web/viewer.html?file='
|
||||
. ($this->media->id === 0
|
||||
? \urlencode(UriFactory::build('{/api}media/export?path=' . $this->media->getPath()))
|
||||
: \urlencode(UriFactory::build('{/api}media/export?id=' . $this->media->id)
|
||||
)));
|
||||
?>" allowfullscreen></iframe>
|
||||
|
|
@ -302,7 +302,7 @@ if (\defined('RESET') && RESET === '1') {
|
|||
$db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['masters']['admin']['database']);
|
||||
$db->exec('CREATE DATABASE IF NOT EXISTS ' . $CONFIG['db']['core']['masters']['admin']['database']);
|
||||
$db = null;
|
||||
} catch (\Throwable $t) {
|
||||
} catch (\Throwable $_) {
|
||||
echo "\nCouldn't connect to MYSQL DB\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -317,7 +317,7 @@ if (\defined('RESET') && RESET === '1') {
|
|||
$db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['postgresql']['admin']['database']);
|
||||
$db->exec('CREATE DATABASE ' . $CONFIG['db']['core']['postgresql']['admin']['database']);
|
||||
$db = null;
|
||||
} catch (\Throwable $t) {
|
||||
} catch (\Throwable $_) {
|
||||
echo "\nCouldn't connect to POSTGRESQL DB\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -332,7 +332,7 @@ if (\defined('RESET') && RESET === '1') {
|
|||
$db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['mssql']['admin']['database']);
|
||||
$db->exec('CREATE DATABASE ' . $CONFIG['db']['core']['mssql']['admin']['database']);
|
||||
$db = null;
|
||||
} catch (\Throwable $t) {
|
||||
} catch (\Throwable $_) {
|
||||
echo "\nCouldn't connect to MSSQL DB\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user