Skip to content

Commit

Permalink
[BUGFIX] Issue schmitzal#32 - Use parent folder if set
Browse files Browse the repository at this point in the history
  • Loading branch information
JEsserTMG committed Nov 5, 2018
1 parent 56d296c commit 5f2054d
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 2,096 deletions.
6 changes: 5 additions & 1 deletion Classes/Command/CompressImagesCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ protected function compressImages(QueryResultInterface $files)
foreach ($files as $file) {
if ($file instanceof \Schmitzal\Tinyimg\Domain\Model\File) {
$file = $this->resourceFactory->getFileObject($file->getUid());
$folder = $this->resourceFactory->getFolderObjectFromCombinedIdentifier($file->getParentFolder());
$folder = $file->getParentFolder();
if (is_string($folder)) {
$folder = $this->resourceFactory->getFolderObjectFromCombinedIdentifier($file->getParentFolder());
}

if (filesize(GeneralUtility::getFileAbsFileName($file->getPublicUrl())) > 0) {
$this->compressImageService->initializeCompression($file, $folder);
}
Expand Down
6 changes: 1 addition & 5 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

if (!defined('TYPO3_COMPOSER_MODE')) {
define('TYPO3_COMPOSER_MODE', TRUE);
}

return ComposerAutoloaderInitd72d73ddddeccf950853a1890e328b60::getLoader();
return ComposerAutoloaderInite46cbeb353b3e575c6b2cd639664288e::getLoader();
2 changes: 1 addition & 1 deletion vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext)
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
Expand Down
274 changes: 15 additions & 259 deletions vendor/composer/autoload_classmap.php

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
$baseDir = dirname($vendorDir);

return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
'74ed299072414d276bb7568fe71d5b0c' => $vendorDir . '/tinify/tinify/lib/Tinify.php',
'9635627915aaea7a98d6d14d04ca5b56' => $vendorDir . '/tinify/tinify/lib/Tinify/Exception.php',
'36b1231e1ea912ee05f8f4f652a17ca9' => $baseDir . '/.Build/typo3/cms/typo3/sysext/core/Resources/PHP/GlobalDebugFunctions.php',
);
3 changes: 0 additions & 3 deletions vendor/composer/autoload_namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@
$baseDir = dirname($vendorDir);

return array(
'cogpowered\\FineDiff' => array($vendorDir . '/cogpowered/finediff/src'),
'PEAR' => array($vendorDir . '/pear/pear_exception'),
'HTTP_Request2' => array($vendorDir . '/pear/http_request2'),
);
59 changes: 0 additions & 59 deletions vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,5 @@

return array(
'Tinify\\' => array($vendorDir . '/tinify/tinify/lib/Tinify'),
'TYPO3\\ClassAliasLoader\\' => array($vendorDir . '/typo3/class-alias-loader/src'),
'TYPO3\\CMS\\Workspaces\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/workspaces/Classes'),
'TYPO3\\CMS\\WizardSortpages\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/wizard_sortpages/Classes'),
'TYPO3\\CMS\\WizardCrpages\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/wizard_crpages/Classes'),
'TYPO3\\CMS\\Viewpage\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/viewpage/Classes'),
'TYPO3\\CMS\\Version\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/version/Classes'),
'TYPO3\\CMS\\Tstemplate\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/tstemplate/Classes'),
'TYPO3\\CMS\\Taskcenter\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/taskcenter/Classes'),
'TYPO3\\CMS\\T3editor\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/t3editor/Classes'),
'TYPO3\\CMS\\SysNote\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/sys_note/Classes'),
'TYPO3\\CMS\\SysAction\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/sys_action/Classes'),
'TYPO3\\CMS\\Sv\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/sv/Classes'),
'TYPO3\\CMS\\Setup\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/setup/Classes'),
'TYPO3\\CMS\\Scheduler\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/scheduler/Classes'),
'TYPO3\\CMS\\Saltedpasswords\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/saltedpasswords/Classes'),
'TYPO3\\CMS\\Rtehtmlarea\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/rtehtmlarea/Classes'),
'TYPO3\\CMS\\Rsaauth\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/rsaauth/Classes'),
'TYPO3\\CMS\\Reports\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/reports/Classes'),
'TYPO3\\CMS\\Recycler\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/recycler/Classes'),
'TYPO3\\CMS\\Recordlist\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/recordlist/Classes'),
'TYPO3\\CMS\\Opendocs\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/opendocs/Classes'),
'TYPO3\\CMS\\Lowlevel\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/lowlevel/Classes'),
'TYPO3\\CMS\\Linkvalidator\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/linkvalidator/Classes'),
'TYPO3\\CMS\\Lang\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/lang/Classes'),
'TYPO3\\CMS\\Install\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/install/Classes'),
'TYPO3\\CMS\\Info\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/info/Classes'),
'TYPO3\\CMS\\InfoPagetsconfig\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/info_pagetsconfig/Classes'),
'TYPO3\\CMS\\IndexedSearch\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/indexed_search/Classes'),
'TYPO3\\CMS\\IndexedSearchMysql\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/indexed_search_mysql/Classes'),
'TYPO3\\CMS\\Impexp\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/impexp/Classes'),
'TYPO3\\CMS\\Func\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/func/Classes'),
'TYPO3\\CMS\\Frontend\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/frontend/Classes'),
'TYPO3\\CMS\\Form\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/form/Classes'),
'TYPO3\\CMS\\Fluid\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/fluid/Classes'),
'TYPO3\\CMS\\FluidStyledContent\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/fluid_styled_content/Classes'),
'TYPO3\\CMS\\Filelist\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/filelist/Classes'),
'TYPO3\\CMS\\Felogin\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/felogin/Classes'),
'TYPO3\\CMS\\Feedit\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/feedit/Classes'),
'TYPO3\\CMS\\Extensionmanager\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/extensionmanager/Classes'),
'TYPO3\\CMS\\Extbase\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/extbase/Classes'),
'TYPO3\\CMS\\Documentation\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/documentation/Classes'),
'TYPO3\\CMS\\Dbal\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/dbal/Classes'),
'TYPO3\\CMS\\CssStyledContent\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/css_styled_content/Classes'),
'TYPO3\\CMS\\Cshmanual\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/cshmanual/Classes'),
'TYPO3\\CMS\\Core\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/core/Classes'),
'TYPO3\\CMS\\ContextHelp\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/context_help/Classes'),
'TYPO3\\CMS\\Composer\\' => array($vendorDir . '/typo3/cms-composer-installers/src'),
'TYPO3\\CMS\\Beuser\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/beuser/Classes'),
'TYPO3\\CMS\\Belog\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/belog/Classes'),
'TYPO3\\CMS\\Backend\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/backend/Classes'),
'TYPO3\\CMS\\Aboutmodules\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/aboutmodules/Classes'),
'TYPO3\\CMS\\About\\' => array($baseDir . '/.Build/typo3/cms/typo3/sysext/about/Classes'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Schmitzal\\Tinyimg\\' => array($baseDir . '/Classes'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
);
18 changes: 7 additions & 11 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitd72d73ddddeccf950853a1890e328b60
class ComposerAutoloaderInite46cbeb353b3e575c6b2cd639664288e
{
private static $loader;

Expand All @@ -19,19 +19,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitd72d73ddddeccf950853a1890e328b60', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInite46cbeb353b3e575c6b2cd639664288e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd72d73ddddeccf950853a1890e328b60', 'loadClassLoader'));

$includePaths = require __DIR__ . '/include_paths.php';
$includePaths[] = get_include_path();
set_include_path(implode(PATH_SEPARATOR, $includePaths));
spl_autoload_unregister(array('ComposerAutoloaderInite46cbeb353b3e575c6b2cd639664288e', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInitd72d73ddddeccf950853a1890e328b60::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInite46cbeb353b3e575c6b2cd639664288e::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand All @@ -52,19 +48,19 @@ public static function getLoader()
$loader->register(true);

if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitd72d73ddddeccf950853a1890e328b60::$files;
$includeFiles = Composer\Autoload\ComposerStaticInite46cbeb353b3e575c6b2cd639664288e::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequired72d73ddddeccf950853a1890e328b60($fileIdentifier, $file);
composerRequiree46cbeb353b3e575c6b2cd639664288e($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequired72d73ddddeccf950853a1890e328b60($fileIdentifier, $file)
function composerRequiree46cbeb353b3e575c6b2cd639664288e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
Expand Down
Loading

0 comments on commit 5f2054d

Please sign in to comment.