Merge remote-tracking branch 'origin/3.0' into 3.1

Conflicts:
	dev/install/install.php5
	docs/en/index.md
	tests/core/CoreTest.php
This commit is contained in:
Ingo Schommer 2013-10-07 16:18:20 +02:00
commit 795d3e4b3b
9 changed files with 67 additions and 27 deletions

View File

@ -26,8 +26,7 @@ HtmlEditorConfig::get('cms')->setOptions(array(
. "dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],@[id,style,class]",
'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name"
. "|usemap|data*],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],"
. "object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]",
'spellchecker_rpc_url' => THIRDPARTY_DIR . '/tinymce-spellchecker/rpc.php'
. "object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"
));
HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen', 'inlinepopups');

View File

@ -18,8 +18,11 @@
ini_set('mysql.connect_timeout', 5);
// Don't die half was through installation; that does more harm than good
ini_set('max_execution_time', 0);
// Prevent a white-screen-of-death
ini_set('display_errors', 'on');
// set display_errors php setting to on to force installer to avoid blank screen of death.
// get the original value so it can be used in PHP requirement checks later in this script.
$originalDisplayErrorsValue = ini_get('display_errors');
ini_set('display_errors', '1');
error_reporting(E_ALL | E_STRICT);
@ -46,9 +49,9 @@ if ($dirsToCheck[0] == $dirsToCheck[1]) {
unset($dirsToCheck[1]);
}
foreach ($dirsToCheck as $dir) {
//check this dir and every parent dir (until we hit the base of the drive)
//check this dir and every parent dir (until we hit the base of the drive)
// or until we hit a dir we can't read
do {
do {
//add the trailing slash we need to concatenate properly
$dir .= DIRECTORY_SEPARATOR;
//if it's readable, go ahead
@ -70,7 +73,7 @@ foreach ($dirsToCheck as $dir) {
//go up a directory
$dir = dirname($dir);
//here we need to check that the path of the last dir and the next one are
// not the same, if they are, we have hit the root of the drive
// not the same, if they are, we have hit the root of the drive
} while (dirname($dir) != $dir);
}
@ -502,7 +505,14 @@ class InstallRequirements {
function suggestPHPSetting($settingName, $settingValues, $testDetails) {
$this->testing($testDetails);
// special case for display_errors, check the original value before
// it was changed at the start of this script.
if($settingName = 'display_errors') {
$val = $originalDisplayErrorsValue;
} else {
$val = ini_get($settingName);
}
if(!in_array($val, $settingValues) && $val != $settingValues) {
$testDetails[2] = "$settingName is set to '$val' in php.ini. $testDetails[2]";
$this->warning($testDetails);

View File

@ -4,6 +4,7 @@
* Security: Require ADMIN for `?flush=1` (stop denial of service attacks)
([#1692](https://github.com/silverstripe/silverstripe-framework/issues/1692))
* API: Disable discontinued Google Spellcheck in TinyMCE. Replaced by browser-based spellchecking if available (Chrome, Firefox)
## Details

View File

@ -0,0 +1,11 @@
# 3.0.8
### API Changes
* 2013-08-03 [0e7231f](https://github.com/silverstripe/sapphire/commit/0e7231f) Disable discontinued Google Spellcheck in TinyMCE (Ingo Schommer)
### Bugfixes
* 2013-10-04 [dd49834](https://github.com/silverstripe/sapphire/commit/dd49834) Fixing installer not checking display_errors correctly. (Sean Harvey)
* 2013-10-03 [f67b549](https://github.com/silverstripe/sapphire/commit/f67b549) Fixed cross-platform issues with test cases and file utilities (Damian Mooyman)
* 2013-10-01 [daf92e6](https://github.com/silverstripe/silverstripe-cms/commit/daf92e6) ReportAdmin report links regression (Ingo Schommer)

View File

@ -56,7 +56,3 @@ Please read our [guide to contributing documentation](misc/contributing/document
* [Contributing](misc/contributing)
* [Coding Conventions](misc/coding-conventions)
<div class="hint" markdown="1">
Looking for the old DokuWiki installation? See [doc.silverstripe.org/old](http://doc.silverstripe.org/old).
</div>

View File

@ -277,6 +277,29 @@ on your own editor wrapper. Note that the `[api:HtmlEditorConfig]` is currently
so its up to you to either convert existing configuration as applicable,
or start your own configuration.
### Integrating a Spellchecker for TinyMCE
The TinyMCE editor uses spellchecking integrated into the browser if possible
([docs](http://www.tinymce.com/wiki.php/Plugin3x:spellchecker)).
Most modern browsers support it, although Internet Explorer only has limited
support in IE10. Alternatively, you can use the PSpell PHP module for server side checks.
Assuming you have the module installed, here's how you enable its use in `mysite/_config.php`:
:::php
HtmlEditorConfig::get('cms')->enablePlugins('spellchecker');
HtmlEditorConfig::get('cms')->addButtonsToLine(2, 'spellchecker');
HtmlEditorConfig::get('cms')->setOption(
'spellchecker_rpc_url',
THIRDPARTY_DIR . '/tinymce-spellchecker/rpc.php'
);
HtmlEditorConfig::get('cms')->setOption('browser_spellcheck', false);
Now change the default spellchecker in `framework/thirdparty/tinymce-spellchecker/config.php`:
:::php
// ...
$config['general.engine'] = 'PSpell';
## Related
* [Howto: Extend the CMS Interface](../howto/extend-cms-interface)

View File

@ -86,6 +86,7 @@ class HtmlEditorConfig {
'safari_warning' => false,
'relative_urls' => true,
'verify_html' => true,
'browser_spellcheck' => true,
);
/**
@ -96,7 +97,6 @@ class HtmlEditorConfig {
'table' => null,
'emotions' => null,
'paste' => null,
'spellchecker' => null
);
/**
@ -106,7 +106,7 @@ class HtmlEditorConfig {
1 => array('bold','italic','underline','strikethrough','separator',
'justifyleft','justifycenter','justifyright','justifyfull','formatselect','separator',
'bullist','numlist','outdent','indent','blockquote','hr','charmap'),
2 => array('undo','redo','separator','cut','copy','paste','pastetext','pasteword','spellchecker','separator',
2 => array('undo','redo','separator','cut','copy','paste','pastetext','pasteword','separator',
'advcode','search','replace','selectall','visualaid','separator','tablecontrols'),
3 => array()
);

View File

@ -941,7 +941,7 @@ class Versioned extends DataExtension {
Session::set('readingMode', 'Stage.' . $stage);
}
if(isset($_GET['archiveDate'])) {
if(isset($_GET['archiveDate']) && strtotime($_GET['archiveDate'])) {
Session::set('readingMode', 'Archive.' . $_GET['archiveDate']);
}