Feature #19585 » 9758.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')) {
|
||
// insert line in extTables.php
|
||
$extTables = file_get_contents(PATH_typo3conf . 'extTables.php');
|
||
$extTables = '<?php' . chr(10) . preg_replace('/<\?php|\?>/is', '', $extTables) . chr(10) . $line . chr(10) . '?>';
|
||
file_put_contents(PATH_typo3conf . 'extTables.php', $extTables);
|
||
$this->content .= '<div id="lowlevel-config-var">' . sprintf($GLOBALS['LANG']->getLL('writeMessage', true), PATH_typo3conf . 'extTables.php', '<br />', '<strong>' . $line . '</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 ($this->MOD_SETTINGS['function'] != 3 and $this->MOD_SETTINGS['function'] != 5) {
|
||
// no write for $TYPO3_LOADED_EXT and $BE_USER->uc
|
||
$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 to extTables.php</label>
|
||
<label index="writeMessage">Following line was added to "%s": %s%s</label>
|
||
<label index="goBack"><< back</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|