Feature #19585 » 9758_v2.diff
typo3/sysext/lowlevel/config/index.php (working copy) | ||
---|---|---|
// Variable name:
|
||
if (t3lib_div::_GP('varname')) {
|
||
$this->content .= '<div id="lowlevel-config-var">
|
||
<strong>' . $GLOBALS['LANG']->getLL('variable', true) . '</strong><br />
|
||
<input type="text" name="_" value="'.trim(htmlspecialchars(t3lib_div::_GP('varname'))).'" size="120" /><br/>
|
||
' . $GLOBALS['LANG']->getLL('copyPaste', true) . '
|
||
</div>
|
||
';
|
||
$line = t3lib_div::_GP('_') ? t3lib_div::_GP('_') : t3lib_div::_GP('varname');
|
||
if (t3lib_div::_GP('writetoexttables')) {
|
||
// change value to $GLOBALS
|
||
$length = strpos($line, '[');
|
||
$var = substr($line, 0, $length);
|
||
$changedLine = '$GLOBALS[\'' . substr($line, 1, $length - 1) . '\']' . substr($line, $length);
|
||
// insert line in extTables.php
|
||
$extTables = file_get_contents(PATH_typo3conf . TYPO3_extTableDef_script);
|
||
$extTables = '<?php' . preg_replace('/<\?php|\?>/is', '', $extTables) . chr(10) . $changedLine . chr(10) . '?>';
|
||
file_put_contents(PATH_typo3conf . TYPO3_extTableDef_script, $extTables);
|
||
$this->content .= '<div id="lowlevel-config-var">' . sprintf($GLOBALS['LANG']->getLL('writeMessage', true), '<br />', '<strong>' . $changedLine . '</strong>') . '
|
||
<br /><input type="submit" name="goback" value="' . $GLOBALS['LANG']->getLL('goBack', true) . '" /></div>';
|
||
} else {
|
||
$this->content .= '<div id="lowlevel-config-var">
|
||
<strong>' . $GLOBALS['LANG']->getLL('variable', true) . '</strong><br />
|
||
<input type="text" name="_" value="'.trim(htmlspecialchars($line)).'" size="120" /><br/>';
|
||
if (TYPO3_extTableDef_script != '' && ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 4)) {
|
||
// write only for $TCA and TBE_STYLES if TYPO3_extTableDef_script is defined
|
||
$this->content .= '<br /><input type="submit" name="writetoexttables" value="' . $GLOBALS['LANG']->getLL('writeValue', true) . '" /></div>';
|
||
} else {
|
||
$this->content .= $GLOBALS['LANG']->getLL('copyPaste', true) . chr(10) . '</div>';
|
||
}
|
||
|
||
}
|
||
}
|
||
$this->content.= '<br/><table border="0" cellpadding="1" cellspacing="0">';
|
typo3/sysext/lowlevel/config/locallang.xml (working copy) | ||
---|---|---|
<label index="enterSearchPhrase">Enter search phrase:</label>
|
||
<label index="search">Search</label>
|
||
<label index="useRegExp">Use regular expression</label>
|
||
<label index="writeValue">Write value</label>
|
||
<label index="writeMessage">Following line was added to configuration: %s%s</label>
|
||
<label index="goBack">Back</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|
- « Previous
- 1
- 2
- 3
- 4
- Next »