Skip to content

Commit

Permalink
fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbltr committed Oct 13, 2016
1 parent d244795 commit 4d7439a
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions Classes/indexer/class.tx_kesearch_indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class tx_kesearch_indexer
public $extConfPremium = array(); // extension configuration of ke_search_premium, if installed
public $indexerConfig = array(); // saves the indexer configuration of current loop
public $lockFile = '';
public $additionalFields = '';
public $additionalFields = array();
public $indexingErrors = array();
public $startTime;
public $currentRow = array(); // current row which have to be inserted/updated to database
Expand Down Expand Up @@ -162,9 +162,9 @@ public function startIndexing($verbose = true, $extConf = array(), $mode = '')
$content .= "\n\n" . '<br /><br /><br /><b>INDEXING ERRORS ('
. sizeof($this->indexingErrors)
. ')<br /><br />'
. CHR(10);
. chr(10);
foreach ($this->indexingErrors as $error) {
$content .= $error . '<br />' . CHR(10);
$content .= $error . '<br />' . chr(10);
}
}

Expand Down Expand Up @@ -193,6 +193,8 @@ public function startIndexing($verbose = true, $extConf = array(), $mode = '')
if ($verbose) {
return $content;
}

return '';
}

/**
Expand Down Expand Up @@ -519,14 +521,27 @@ public function storeInIndex(
$where = 'uid=' . intval($this->currentRow['uid']);
unset($fieldValues['crdate']);
if ($debugOnly) { // do not process - just debug query
t3lib_utility_Debug::debug($GLOBALS['TYPO3_DB']->UPDATEquery($table, $where, $fieldValues), 1);
\TYPO3\CMS\Core\Utility\DebugUtility::debug(
$GLOBALS['TYPO3_DB']->UPDATEquery(
$table,
$where,
$fieldValues
),
1
);
} else { // process storing of index record and return uid
$this->updateRecordInIndex($fieldValues);
return true;
}
} else { // insert new record
if ($debugOnly) { // do not process - just debug query
t3lib_utility_Debug::debug($GLOBALS['TYPO3_DB']->INSERTquery($table, $fieldValues, false));
\TYPO3\CMS\Core\Utility\DebugUtility::debug(
$GLOBALS['TYPO3_DB']->INSERTquery(
$table,
$fieldValues,
false
)
);
} else { // process storing of index record and return uid
$this->insertRecordIntoIndex($fieldValues);
return $GLOBALS['TYPO3_DB']->sql_insert_id();
Expand Down

0 comments on commit 4d7439a

Please sign in to comment.