From 8189298fda5e4d42366a4579b79c9300580cb21f Mon Sep 17 00:00:00 2001 From: Franz Holzinger Date: Tue, 21 Dec 2021 14:22:15 +0100 Subject: [PATCH] remove debug statements --- ...anguagesWizardModuleFunctionController.php | 9 ------ ...mportFalWizardModuleFunctionController.php | 3 -- Classes/Utility/CreateLanguagesUtility.php | 6 ---- Classes/Utility/ImportFalUtility.php | 31 ------------------- Classes/Utility/MoveItemsUtility.php | 6 ---- 5 files changed, 55 deletions(-) diff --git a/Classes/Controller/Module/CreateLanguagesWizardModuleFunctionController.php b/Classes/Controller/Module/CreateLanguagesWizardModuleFunctionController.php index f96613f75..7c68d78db 100644 --- a/Classes/Controller/Module/CreateLanguagesWizardModuleFunctionController.php +++ b/Classes/Controller/Module/CreateLanguagesWizardModuleFunctionController.php @@ -151,14 +151,10 @@ public function main() if ($information == '') { $information = $GLOBALS['LANG']->getLL('no_alternative_product'); } - debug ($information, '$information Pos 2'); } else if ( isset($errorLanguageCodeArray) && is_array($errorLanguageCodeArray) ) { - debug ($errorLanguageCodeArray, '$errorLanguageCodeArray Pos 2'); foreach ($errorLanguageCodeArray as $table => $codeArray) { -debug ($table, '$table'); -debug ($codeArray, '$codeArray'); $code = ''; $parameter = ''; if (isset($codeArray['code'])) { @@ -167,13 +163,10 @@ public function main() if (isset($codeArray['parameter'])) { $parameter = $codeArray['parameter']; } -debug ($code, '$code'); switch ($code) { case 'no_texts': -debug ($code, '$code Pos 2'); $information .= $GLOBALS['LANG']->getLL($code); - debug ($information, '$information Pos 3'); break; case 'no_alternative_product': $information .= sprintf($GLOBALS['LANG']->getLL($code), $parameter); @@ -181,8 +174,6 @@ public function main() } } } - debug ($information, '$information Pos 4'); - $assigns['information'] = $information; } else { // CSH diff --git a/Classes/Controller/Module/ImportFalWizardModuleFunctionController.php b/Classes/Controller/Module/ImportFalWizardModuleFunctionController.php index 319f43ff3..457f19a0e 100644 --- a/Classes/Controller/Module/ImportFalWizardModuleFunctionController.php +++ b/Classes/Controller/Module/ImportFalWizardModuleFunctionController.php @@ -112,7 +112,6 @@ public function main() $infoArray, $_REQUEST['id'] ); - debug ($infoArray, '$infoArray '); $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName( 'EXT:' . TT_PRODUCTS_EXT . '/Resources/Private/Templates/ImportFalFinished.html' @@ -130,10 +129,8 @@ public function main() $assigns['menu'] = $menu; } -debug ($assigns, '$assigns'); $view->assignMultiple($assigns); $out = $view->render(); -debug ($out, 'main ENDE $out'); return $out; } diff --git a/Classes/Utility/CreateLanguagesUtility.php b/Classes/Utility/CreateLanguagesUtility.php index 4a23c491b..42a35048f 100644 --- a/Classes/Utility/CreateLanguagesUtility.php +++ b/Classes/Utility/CreateLanguagesUtility.php @@ -46,13 +46,9 @@ static public function createAll ( &$errorLanguageCodeArray, $currId ) { - debug($tmp, 'moveAll '); - debug ($_REQUEST, '$_REQUEST'); $result = true; $infoArray = array(); - debug ($currId, '$currId'); - if($currId) { $tableArray = array('tt_products_texts' => 'tt_products_texts_language'); // Initializes the module. Done in this function because we may need to re-initialize if data is submitted! @@ -173,8 +169,6 @@ static public function createAll ( } } - debug ($theOutput, 'MODFUNC1 ENDE $result'); - debug ($infoArray, 'MODFUNC1 ENDE $infoArray'); return $result; } } diff --git a/Classes/Utility/ImportFalUtility.php b/Classes/Utility/ImportFalUtility.php index 782db8fd6..c8c74d466 100644 --- a/Classes/Utility/ImportFalUtility.php +++ b/Classes/Utility/ImportFalUtility.php @@ -51,8 +51,6 @@ static public function importAll ( &$infoArray, $currId ) { - debug($tmp, 'importAll '); - debug ($_REQUEST, '$_REQUEST'); $result = true; $infoArray = array(); @@ -70,10 +68,6 @@ static public function importAll ( } else { $targetFolder = $storage->getFolder('/' . $targetDirectory); } - debug ($targetFolder, '$targetFolder +++'); - /** @var $fileRepository \TYPO3\CMS\Core\Resource\FileRepository */ -// $fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository'); - $content = ''; $pid = intval($currId); $tableMediaArray = array( @@ -85,7 +79,6 @@ static public function importAll ( foreach ($tableMediaArray as $tablename => $imageFieldnameArray) { $imageCount = 0; - debug ($tablename, '$tablename'); foreach ($imageFieldnameArray as $imageFieldname) { $imageFalFieldname = $imageFieldname . '_uid'; @@ -96,25 +89,19 @@ static public function importAll ( 'pid=' . $pid . ' AND deleted=0' ); - debug ($rowArray, '$rowArray'); - if (is_array($rowArray) && count($rowArray)) { foreach ($rowArray as $k => $row) { // if ($k != 3) continue; // Test - debug ($row, '$row'); if ($row[$imageFieldname] != '') { $imageArray = explode(',', $row[$imageFieldname]); $sysfileRowArray = array(); - debug ($imageArray, '$imageArray'); if (intval($row[$imageFalFieldname]) != 0) { - debug ($row[$imageFalFieldname], '$row['. $imageFalFieldname . '] TODO'); $where_clause = 'uid_foreign=' . intval($row['uid']) . ' AND tablenames="' . $tablename . '" AND fieldname="' . $imageFalFieldname . '"' ; $where_clause .= \JambageCom\Div2007\Utility\TableUtility::deleteClause('sys_file_reference'); - debug ($where_clause, '$where_clause'); $sysfileRowArray = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', @@ -125,16 +112,12 @@ static public function importAll ( '', 'uid_local' ); - debug ($sysfileRowArray, '$sysfileRowArray'); } - debug ($imageArray, '$imageArray vor Schleife'); if (!empty($imageArray)) { $imageCount = count($imageArray); $needsCountUpdate = false; foreach ($imageArray as $imageKey => $image) { - debug ($imageKey, '$imageKey'); - debug ($image, '$image'); $imageFile = '/user_upload/' . $image; $fileIdentifier = '1:' . $imageFile; @@ -146,11 +129,9 @@ static public function importAll ( if (!file_exists(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/' . $targetFileName)) { $fullSourceFileName = \TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/' . self::ORIGINAL_DIRECTORY . $image; - debug ($fullSourceFileName, '$fullSourceFileName'); // Move the file to the storage and index it (indexing creates the sys_file entry) $file = $storage->addFile($fullSourceFileName, $targetFolder, '', 'cancel'); // $fileRepository->addToIndex($file); - debug ($targetFolder, 'added to $targetFolder'); } if ( @@ -162,15 +143,11 @@ static public function importAll ( } $file = $resourceFactory->getFileObjectFromCombinedIdentifier($fileIdentifier); - debug ($file, '$file'); if ($file instanceof \TYPO3\CMS\Core\Resource\File) { $fileUid = $file->getUid(); // $properties = $file->getProperties(); // $fileInfo = $storage->getFileInfo($file); - debug ($fileUid, '$fileUid'); - debug ($sysfileRowArray[$fileUid], '$sysfileRowArray['.$fileUid.']'); - // debug ($properties, '$properties'); if ( empty($sysfileRowArray) || !isset($sysfileRowArray[$fileUid]) @@ -184,7 +161,6 @@ static public function importAll ( 'pid' => $pid, // parent id of the parent page 'table_local' => 'sys_file', ); -// $data[$tablename][$row['uid']] = array($imageFalFieldname => $imageCount); // set to the number of images if (!empty($sysfileRowArray)) { $needsCountUpdate = true; @@ -192,8 +168,6 @@ static public function importAll ( $data[$tablename][$row['uid']] = array($imageFalFieldname => 'NEW1234'); } - debug ($data, 'INSERT $data'); - /** @var \TYPO3\CMS\Core\DataHandling\DataHandler $tce */ $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\DataHandling\DataHandler'); // create TCE instance $tce->start($data, array()); @@ -206,8 +180,6 @@ static public function importAll ( } } } - debug ($imageKey, '$imageKey Pos 3'); - debug ($image, '$image Pos 3'); $imageCount++; } // foreach ($imageArray @@ -226,10 +198,7 @@ static public function importAll ( $infoArray[$tablename] = $imageCount; } // foreach - debug ($theOutput, 'MODFUNC3 ENDE $theOutput'); - return $result; } } - diff --git a/Classes/Utility/MoveItemsUtility.php b/Classes/Utility/MoveItemsUtility.php index 96652c628..40696c5b3 100644 --- a/Classes/Utility/MoveItemsUtility.php +++ b/Classes/Utility/MoveItemsUtility.php @@ -47,13 +47,9 @@ static public function moveAll ( $destId, $age ) { - debug($tmp, 'moveAll '); - debug ($_REQUEST, '$_REQUEST'); $result = true; $infoArray = array(); - debug ($currId, '$currId'); - if($currId && $destId) { $infoArray['rows'] = array(); $fieldsArray = array(); @@ -73,8 +69,6 @@ static public function moveAll ( } } - debug ($theOutput, 'MODFUNC1 ENDE $result'); - debug ($infoArray, 'MODFUNC1 ENDE $infoArray'); return $result; } }