Project

General

Profile

Bug #18328 ยป rtehtmlarea_bugfix_7698.patch

Administrator Admin, 2008-02-27 23:49

View differences:

typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy)
// Hiding the buttons
$show = array_diff($show, $this->conf_toolbar_hide, $hideButtons, t3lib_div::trimExplode(',',$this->thisConfig['hideButtons'],1));
// Apply toolbar constraints from registered plugins
foreach ($this->registeredPlugins as $pluginId => $plugin) {
if ($this->isPluginEnabled($pluginId) && method_exists($plugin, "applyToolbarConstraints")) {
$show = $plugin->applyToolbarConstraints($show);
}
}
// Adding the always show buttons
$show = array_unique(array_merge($show, $this->conf_toolbar_show));
$toolbarOrder = array_unique(array_merge($toolbarOrder, $this->conf_toolbar_show));
typo3/sysext/rtehtmlarea/extensions/TableOperations/class.tx_rtehtmlarea_tableoperations.php (working copy)
}
return $registerRTEinJavascriptString;
}
/**
* Return an updated array of toolbar enabled buttons
*
* @param array $show: array of toolbar elements that will be enabled, unless modified here
*
* @return array toolbar button array, possibly updated
*/
public function applyToolbarConstraints($show) {
// We will not allow any table operations button if the table button is not enabled
if (!in_array('table', $show)) {
return array_diff($show, t3lib_div::trimExplode(',', $this->pluginButtons));
} else {
return $show;
}
}
} // end of class
typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php (working copy)
if (in_array($button, $this->toolbar)) {
if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.']["buttons"]["'. $button .'"] = new Object();';
RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
}
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.'. $button .'.pathLinkModule = "../../mod3/browse_links.php";';
......
*
* @return string classesAnchor array definition
*/
function buildJSClassesAnchorArray() {
public function buildJSClassesAnchorArray() {
global $LANG, $TYPO3_CONF_VARS;
$linebreak = $TYPO3_CONF_VARS['EXTCONF'][$this->htmlAreaRTE->ID]['enableCompressedScripts'] ? '' : chr(10);
......
}
$JSClassesAnchorArray .= '];' . $linebreak;
return $JSClassesAnchorArray;
}
}
/**
* Return an updated array of toolbar enabled buttons
*
* @param array $show: array of toolbar elements that will be enabled, unless modified here
*
* @return array toolbar button array, possibly updated
*/
public function applyToolbarConstraints($show) {
// We will not allow unlink if link is not enabled
if (!in_array('link', $show)) {
return array_diff($show, t3lib_div::trimExplode(',', $this->pluginButtons));
} else {
return $show;
}
}
} // end of class
    (1-1/1)