Skip to content

Commit

Permalink
Merge pull request #230 from fschaeffer/patch-2
Browse files Browse the repository at this point in the history
[BUGFIX] Update tx_fed_fcefile to FluidBT namespace
  • Loading branch information
misterboe committed Nov 9, 2015
2 parents 9744d79 + 764b6a5 commit 911b7eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions class.ext_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public function access() {
*/
public function main() {

//select all Contentelements from Fluidcontent_bootstrap and migrate them
//select all Contentelements from Fluidcontent_bootstrap and migrate them - new version

$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', '`tx_fed_fcefile` LIKE "FluidTYPO3.Fluidcontentbootstrap:%"', 'tx_fed_fcefile', '', '');
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', '(`tx_fed_fcefile` LIKE "FluidTYPO3.Fluidcontentbootstrap:%" OR `tx_fed_fcefile` LIKE "fluidcontent_bootstrap:%" OR `tx_fed_fcefile` LIKE "fluidcontent_twitterbootstrap:%" OR `tx_fed_fcefile` LIKE "fluidbootstraptheme:%")', 'tx_fed_fcefile', '', '');

while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$replaced = str_replace('FluidTYPO3.FluidcontentBootstrap', 'fluidbootstraptheme', $row['tx_fed_fcefile']);
$replaced = str_replace(array('FluidTYPO3.FluidcontentBootstrap','fluidcontent_bootstrap','fluidcontent_twitterbootstrap','fluidbootstraptheme'), 'FluidBT.Fluidbootstraptheme', $row['tx_fed_fcefile']);

$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'tx_fed_fcefile = "'.$row['tx_fed_fcefile'].'"', array('tx_fed_fcefile' => $replaced));
$updated.= $GLOBALS['TYPO3_DB']->sql_affected_rows() . ' rows have been updated for '.$row['tx_fed_fcefile'].'';
Expand Down

0 comments on commit 911b7eb

Please sign in to comment.