Project

General

Profile

Bug #22217 » 13710_04.diff

Administrator Admin, 2010-04-12 22:05

View differences:

t3lib/class.t3lib_fullsearch.php (working copy)
protected $formName = '';
/**
* constructor
*/
public function __construct() {
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_t3lib_fullsearch.xml');
}
/**
* [Describe function...]
*
......
$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)) {
......
}
$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'])) {
......
}
$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;
}
}
if ($flashMessage) {
$msg = $flashMessage->render();
}
}
if ($saveStoreArray) {
unset($storeArray[0]); // making sure, index 0 is not set!
......
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('','<font color=red><strong>'.$msg.'</strong></font>');
if ($msg) {
$output .= '<br />' . $msg;
}
$output.= $GLOBALS['SOBE']->doc->spacer(20);
}
typo3/sysext/lang/locallang_t3lib_fullsearch.xml (revision 0)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<description>Labels for t3lib_fullsearch</description>
<type>module</type>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="query_loaded">Query "%s" loaded!</label>
<label index="query_from_action_loaded">Query from action "%s" loaded!</label>
<label index="query_saved">Query saved!</label>
<label index="query_notsaved">No query saved!</label>
<label index="query_removed">"%s" query entry removed!</label>
</languageKey>
</data>
</T3locallang>
(3-3/3)