Fixes
This commit is contained in:
parent
70d096f866
commit
140badb63e
@ -8,7 +8,16 @@ services:
|
||||
- ${APPLICATION_CODE_PATH_HOST?}:${APPLICATION_CODE_PATH_CONTAINER?}
|
||||
php-cron:
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG?}
|
||||
- APP_ENV=dev
|
||||
networks:
|
||||
- network
|
||||
cap_add:
|
||||
- "SYS_PTRACE"
|
||||
security_opt:
|
||||
- "seccomp=unconfined"
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
web:
|
||||
@ -28,18 +37,6 @@ services:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
|
||||
php-cron:
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG?}
|
||||
networks:
|
||||
- network
|
||||
cap_add:
|
||||
- "SYS_PTRACE"
|
||||
security_opt:
|
||||
- "seccomp=unconfined"
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
chrome:
|
||||
ports:
|
||||
- "7900:7900"
|
||||
|
||||
@ -21,7 +21,11 @@ class Kernel extends BaseKernel
|
||||
|
||||
try {
|
||||
if (extension_loaded('mongodb')) {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
$plugins = $collection->find(array('installed' => true));
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
*/
|
||||
class PSCShopThemeBundle extends Bundle
|
||||
{
|
||||
|
||||
public function build(ContainerBuilder $container)
|
||||
{
|
||||
parent::build($container);
|
||||
@ -33,7 +32,12 @@ class PSCShopThemeBundle extends Bundle
|
||||
|
||||
try {
|
||||
if (extension_loaded('mongodb')) {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
$plugins = $collection->find(array('installed' => true));
|
||||
|
||||
foreach ($plugins as $plugin) {
|
||||
|
||||
@ -18,7 +18,12 @@ class PluginCompiler implements CompilerPassInterface
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
try {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
$plugins = $collection->find(array('installed' => true));
|
||||
/**
|
||||
* @var Plugin $plugin
|
||||
|
||||
@ -47,7 +47,12 @@ class PSCSystemPluginExtension extends Extension implements PrependExtensionInte
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
try {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
$plugins = $collection->find(array('installed' => true));
|
||||
foreach ($plugins as $plugin) {
|
||||
if (file_exists($container->getParameter('kernel.project_dir') . '/var/plugins/' . $plugin['path'] . '/Resources/config/services.yml')) {
|
||||
|
||||
@ -25,7 +25,12 @@ class RequestListener
|
||||
public function onKernelRequest(RequestEvent $event)
|
||||
{
|
||||
try {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -37,7 +37,12 @@ class PluginRouteLoader extends Loader
|
||||
{
|
||||
$routes = new RouteCollection();
|
||||
try {
|
||||
if ($_ENV['APP_ENV'] == 'test') {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
|
||||
} else {
|
||||
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
|
||||
}
|
||||
|
||||
$plugins = $collection->find(array('installed' => true));
|
||||
/** @var Plugin $plugin */
|
||||
foreach ($plugins as $plugin) {
|
||||
|
||||
@ -157,8 +157,6 @@ trait RefreshDatabaseTrait
|
||||
$doc->clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $kernel;
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
*/
|
||||
class PreflightController extends TP_Controller_Action
|
||||
{
|
||||
|
||||
protected $_extAllow = 'ppt,inx,idml,indd,qxd,ps,cdr,cdx,jpg,gif,pdf,xls,docx,png,doc,jpeg,tif,tiff,ai,eps,psd,phtml,zip,jrxml,ttf,otf,plt,csv,docx,xlsx,pptx,svg';
|
||||
|
||||
protected function FileSize($file, $setup = null)
|
||||
@ -47,8 +46,7 @@ class PreflightController extends TP_Controller_Action
|
||||
return number_format($FZ / pow(1024, $I = floor(log($FZ, 1024))), ($i >= 1) ? 2 : 0) . ' ' . $FS[$I];
|
||||
} elseif ($setup == 'INT') {
|
||||
return number_format($FZ);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return number_format($FZ / pow(1024, $setup), ($setup >= 1) ? 2 : 0) . ' ' . $FS[$setup];
|
||||
}
|
||||
}
|
||||
@ -193,7 +191,7 @@ class PreflightController extends TP_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
if ($isPdf && ((int)$check->check_site_count > 0 || $check->check_site_count_rel != "")) {
|
||||
if (false && $isPdf && ((int)$check->check_site_count > 0 || $check->check_site_count_rel != "")) {
|
||||
|
||||
try {
|
||||
$p = new pdflib();
|
||||
@ -372,7 +370,7 @@ class PreflightController extends TP_Controller_Action
|
||||
$boxes[] = "ArtBox";
|
||||
}
|
||||
|
||||
if ($isPdf && $check->check_fonts_embedded) {
|
||||
if (false && $isPdf && $check->check_fonts_embedded) {
|
||||
$p = new pdflib();
|
||||
$indoc = $p->open_pdi_document($file, "");
|
||||
|
||||
@ -391,7 +389,7 @@ class PreflightController extends TP_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
if ($isPdf && count($boxes) > 0 && count($checks) > 0) {
|
||||
if (false && $isPdf && count($boxes) > 0 && count($checks) > 0) {
|
||||
|
||||
$isFormat = false;
|
||||
|
||||
@ -529,7 +527,7 @@ class PreflightController extends TP_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
if ($isPdf && ((int)$check->check_site_count || $check->check_site_count_rel)) {
|
||||
if (false && $isPdf && ((int)$check->check_site_count || $check->check_site_count_rel)) {
|
||||
|
||||
$p = new pdflib();
|
||||
$indoc = $p->open_pdi_document($file, "");
|
||||
@ -673,7 +671,7 @@ class PreflightController extends TP_Controller_Action
|
||||
$boxes[] = "ArtBox";
|
||||
}
|
||||
|
||||
if ($isPdf && $check->check_fonts_embedded) {
|
||||
if (false && $isPdf && $check->check_fonts_embedded) {
|
||||
$p = new pdflib();
|
||||
$indoc = $p->open_pdi_document($file, "");
|
||||
|
||||
@ -692,7 +690,7 @@ class PreflightController extends TP_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
if ($isPdf && count($boxes) > 0 && count($checks) > 0) {
|
||||
if (false && $isPdf && count($boxes) > 0 && count($checks) > 0) {
|
||||
|
||||
$isFormat = false;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user