Index: t3lib/class.t3lib_fullsearch.php =================================================================== --- t3lib/class.t3lib_fullsearch.php (Revision 7175) +++ t3lib/class.t3lib_fullsearch.php (Arbeitskopie) @@ -93,10 +93,14 @@ protected $formName = ''; + /** + * constructor + */ + public function __construct() { + $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_t3lib_fullsearch.xml'); + } - - /** * [Describe function...] * @@ -281,11 +285,15 @@ $saveStoreArray=0; $writeArray=array(); if (is_array($storeControl)) { + $msg = ''; if ($storeControl['LOAD']) { if ($storeIndex>0) { $writeArray=$this->loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray); - $saveStoreArray=1; - $msg="'".htmlspecialchars($storeArray[$storeIndex])."' query loaded!"; + $saveStoreArray = 1; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + sprintf($GLOBALS['LANG']->getLL('query_loaded'), htmlspecialchars($storeArray[$storeIndex])) + ); } elseif ($storeIndex<0 && t3lib_extMgm::isLoaded('sys_action')) { $actionRecord=t3lib_BEfunc::getRecord('sys_action',abs($storeIndex)); if (is_array($actionRecord)) { @@ -296,17 +304,28 @@ } $writeArray=$this->loadStoreQueryConfigs($dbSC,'0',$writeArray); $saveStoreArray=1; - $acTitle=htmlspecialchars($actionRecord['title']); - $msg="Query from action '".$acTitle."' loaded!"; + + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + sprintf($GLOBALS['LANG']->getLL('query_from_action_loaded'), htmlspecialchars($actionRecord['title'])) + ); } } } elseif ($storeControl['SAVE']) { if ($storeIndex<0) { $qOK = $this->saveQueryInAction(abs($storeIndex)); - if ($qOK) { - $msg='Query OK and saved.'; + if ($qOK) { + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $GLOBALS['LANG']->getLL('query_saved') + ); } else { - $msg='No query saved!'; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $GLOBALS['LANG']->getLL('query_notsaved'), + '', + t3lib_FlashMessage::ERROR + ); } } else { if (trim($storeControl['title'])) { @@ -319,16 +338,23 @@ } $storeQueryConfigs=$this->addToStoreQueryConfigs($storeQueryConfigs,$storeIndex); $saveStoreArray=1; - $msg="'".htmlspecialchars($storeArray[$storeIndex])."' query saved!"; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $GLOBALS['LANG']->getLL('query_saved') + ); } } } elseif ($storeControl['REMOVE']) { if ($storeIndex>0) { - $msg="'" . htmlspecialchars($storeArray[$storeControl['STORE']]) . "' query entry removed!"; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + sprintf($GLOBALS['LANG']->getLL('query_removed'), htmlspecialchars($storeArray[$storeControl['STORE']])) + ); unset($storeArray[$storeControl['STORE']]); // Removing $saveStoreArray=1; } } + $msg = $flashMessage->render(); } if ($saveStoreArray) { unset($storeArray[0]); // making sure, index 0 is not set! @@ -354,8 +380,8 @@ if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableStoreControl']) { $output.= $GLOBALS['SOBE']->doc->section('Load/Save Query',$this->makeStoreControl(),0,1); - if ($msg) { - $output.= $GLOBALS['SOBE']->doc->section('',''.$msg.''); + if ($msg) { + $output .= '
' . $msg; } $output.= $GLOBALS['SOBE']->doc->spacer(20); } @@ -812,6 +838,7 @@ $theList .= $this->getTreeList($row['uid'], $depth-1, $begin-1, $perms_clause); } } + $GLOBALS['TYPO3_DB']->sql_free_result($res); } return $theList; } Index: typo3/sysext/lang/locallang_t3lib_fullsearch.xml =================================================================== --- typo3/sysext/lang/locallang_t3lib_fullsearch.xml (Revision 0) +++ typo3/sysext/lang/locallang_t3lib_fullsearch.xml (Revision 0) @@ -0,0 +1,16 @@ + + + + Labels for t3lib_fullsearch + module + + + + + + + + + + + \ No newline at end of file