Skip to content

Commit

Permalink
remove debug statements and the temporary file temporaer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
franzholz committed Jul 5, 2017
1 parent 8ea504f commit b7294aa
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 125 deletions.
11 changes: 1 addition & 10 deletions Classes/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public function importTableFile (
$firstLineFieldnames = FALSE
)
{
debug ($pid, 'importTableFile $pid');

$result = false;

if (
Expand All @@ -75,13 +73,10 @@ public function importTableFile (
$header
) {
$keysRow = $row;
debug ($keysRow, '$keysRow +++');
$headerRow = array_flip($keysRow);
$header = false;
debug ($headerRow, '$headerRow +++');
continue;
}
debug ($row, '$row vorher');
if ($keysRow) {
$row = array_combine($keysRow, $row);
}
Expand All @@ -98,24 +93,20 @@ public function importTableFile (
$mode
)
);
debug ($slotResult, '$slotResult +++');

debug ($headerRow['uid'], '$headerRow[\'uid\']');
if (isset($headerRow['uid'])) {
$where_clause = 'uid=' . intval($row['uid']);
debug ($where_clause, '$where_clause +++');
$currentRow = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid',
$tableName,
$where_clause
);
debug ($currentRow, '$currentRow +++');

if ($currentRow) {
continue;
}
}
// TODO: insert the row into the table

}

fclose($file);
Expand Down
17 changes: 0 additions & 17 deletions Classes/Controller/ImportTablesWizardModuleFunctionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,17 @@ public function main()
$menu
)
);
debug ($_REQUEST, '$_REQUEST +++');

if (
isset($slotResult) &&
is_array($slotResult)
) {
debug ($slotResult['1'], '$slotResult 1');
debug ($slotResult['2'], '$slotResult 2');
if (isset($slotResult['1'])) {
$menu = $slotResult['1'];
}
// if (isset($slotResult['2'])) {
// $files = $slotResult['2'];
// }
}
debug ($menu, '$menu');

$execute = GeneralUtility::_GP('execute');
debug ($execute, '$execute');
debug ($this->pObj->id, 'pid +++');

if ($execute) {
$requiredTables = GeneralUtility::_GP('import-table');
Expand All @@ -95,8 +86,6 @@ public function main()
}
}

debug ($importTables, '$importTables +++');

$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
'EXT:' . IMPORT_EXT . '/Resources/Private/Templates/ImportFinished.html'
));
Expand Down Expand Up @@ -124,19 +113,13 @@ public function main()
));

$assigns['menu'] = $menu;
debug ($assigns, '$assigns +++');
}

$view->assignMultiple($assigns);
$out = $view->render();

debug ($out, '$out +++');

// $out = '<p>Importiere in die Tabellen von TYPO3</p>';
return $out;
}


/**
* Returns LanguageService
*
Expand Down
92 changes: 0 additions & 92 deletions Classes/Controller/temporaer.php

This file was deleted.

6 changes: 0 additions & 6 deletions Classes/Slots/ExampleSlots.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function importTables (
array $paramTables
)
{
debug ($paramTables, 'import $paramTables +++');
// Rendering of the output via fluid
$api = GeneralUtility::makeInstance(Api::class);

Expand All @@ -70,9 +69,7 @@ public function importTables (
GeneralUtility::getFileAbsFileName(
'EXT:' . IMPORT_EXT . '/Resources/Private/Files/' . $table . '.csv'
);
debug ($file, 'import $file +++');
$api->importTableFile($table, $file, $pid, ',', '"', 0, true);

}
}
}
Expand All @@ -90,9 +87,6 @@ public function processImport (
$mode
)
{
debug ($tableName, 'processImport $tableName');
debug ($row, '$row');

$result = array(
$tableName,
$row,
Expand Down

0 comments on commit b7294aa

Please sign in to comment.