39 foreach ($dbFields as $table => $fields) {
40 if (is_array($dbFields[$table][
'fields'])) {
43 $insertStatements = $this->
dumpTableContent($table, $dbFields[$table][
'fields']);
44 $out .= $header . self::MULTI_LINEBREAKS . $tableHeader . self::MULTI_LINEBREAKS . $insertStatements . self::MULTI_LINEBREAKS;
57 # TYPO3 Extension Manager dump 1.1 59 # Host: ' . TYPO3_db_host .
' Database: ' . TYPO3_db .
' 60 #-------------------------------------------------------- 72 protected function dumpTableHeader($table, array $fieldKeyInfo, $dropTableIfExists = FALSE) {
76 if (is_array($fieldKeyInfo[
'fields'])) {
77 foreach ($fieldKeyInfo[
'fields'] as $fieldN => $data) {
78 $lines[] =
' ' . $fieldN .
' ' . $data;
82 if (is_array($fieldKeyInfo[
'keys'])) {
83 foreach ($fieldKeyInfo[
'keys'] as $fieldN => $data) {
84 $lines[] =
' ' . $data;
91 # Table structure for table "' . $table .
'" 93 ' . ($dropTableIfExists ?
'DROP TABLE IF EXISTS ' . $table .
'; 94 ' :
'') .
'CREATE TABLE ' . $table .
' ( 95 ' . implode((
',' . LF), $lines) .
' 113 $search = array(
'\\',
'\'',
"\0",
"\n",
"\r",
"\x1A");
114 $replace = array(
'\\\\',
'\\\'',
'\\0',
'\\n',
'\\r',
'\\Z');
121 foreach ($fieldStructure as $field => $structure) {
122 $values[] = isset($row[$field]) ?
'\'' . str_replace($search, $replace, $row[$field]) .
'\'' :
'NULL';
124 $lines[] =
'INSERT INTO ' . $table .
' VALUES (' . implode(
', ', $values) .
');';
129 return implode(LF, $lines);
dumpTableHeader($table, array $fieldKeyInfo, $dropTableIfExists=FALSE)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
dumpStaticTables($dbFields)
dumpTableContent($table, array $fieldStructure)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]