mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
commit
795d3e4b3b
@ -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]",
|
. "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"
|
'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],"
|
. "|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]",
|
. "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'
|
|
||||||
));
|
));
|
||||||
|
|
||||||
HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen', 'inlinepopups');
|
HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen', 'inlinepopups');
|
||||||
|
@ -18,8 +18,11 @@
|
|||||||
ini_set('mysql.connect_timeout', 5);
|
ini_set('mysql.connect_timeout', 5);
|
||||||
// Don't die half was through installation; that does more harm than good
|
// Don't die half was through installation; that does more harm than good
|
||||||
ini_set('max_execution_time', 0);
|
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);
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
@ -46,31 +49,31 @@ if ($dirsToCheck[0] == $dirsToCheck[1]) {
|
|||||||
unset($dirsToCheck[1]);
|
unset($dirsToCheck[1]);
|
||||||
}
|
}
|
||||||
foreach ($dirsToCheck as $dir) {
|
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
|
// or until we hit a dir we can't read
|
||||||
do {
|
do {
|
||||||
//add the trailing slash we need to concatenate properly
|
//add the trailing slash we need to concatenate properly
|
||||||
$dir .= DIRECTORY_SEPARATOR;
|
$dir .= DIRECTORY_SEPARATOR;
|
||||||
//if it's readable, go ahead
|
//if it's readable, go ahead
|
||||||
if (@is_readable($dir)) {
|
if (@is_readable($dir)) {
|
||||||
//if the file exists, then we include it, set relevant vars and break out
|
//if the file exists, then we include it, set relevant vars and break out
|
||||||
if (file_exists($dir . $envFile)) {
|
if (file_exists($dir . $envFile)) {
|
||||||
include_once($dir . $envFile);
|
include_once($dir . $envFile);
|
||||||
$envFileExists = true;
|
$envFileExists = true;
|
||||||
//legacy variable assignment
|
//legacy variable assignment
|
||||||
$usingEnv = true;
|
$usingEnv = true;
|
||||||
//break out of BOTH loops because we found the $envFile
|
//break out of BOTH loops because we found the $envFile
|
||||||
break(2);
|
break(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//break out of the while loop, we can't read the dir
|
//break out of the while loop, we can't read the dir
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//go up a directory
|
//go up a directory
|
||||||
$dir = dirname($dir);
|
$dir = dirname($dir);
|
||||||
//here we need to check that the path of the last dir and the next one are
|
//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);
|
} while (dirname($dir) != $dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +505,14 @@ class InstallRequirements {
|
|||||||
function suggestPHPSetting($settingName, $settingValues, $testDetails) {
|
function suggestPHPSetting($settingName, $settingValues, $testDetails) {
|
||||||
$this->testing($testDetails);
|
$this->testing($testDetails);
|
||||||
|
|
||||||
$val = ini_get($settingName);
|
// 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) {
|
if(!in_array($val, $settingValues) && $val != $settingValues) {
|
||||||
$testDetails[2] = "$settingName is set to '$val' in php.ini. $testDetails[2]";
|
$testDetails[2] = "$settingName is set to '$val' in php.ini. $testDetails[2]";
|
||||||
$this->warning($testDetails);
|
$this->warning($testDetails);
|
||||||
@ -986,7 +996,7 @@ class InstallRequirements {
|
|||||||
foreach($varNames as $varName) {
|
foreach($varNames as $varName) {
|
||||||
if(!isset($_SERVER[$varName]) || !$_SERVER[$varName]) {
|
if(!isset($_SERVER[$varName]) || !$_SERVER[$varName]) {
|
||||||
$missing[] = '$_SERVER[' . $varName . ']';
|
$missing[] = '$_SERVER[' . $varName . ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$missing) {
|
if(!$missing) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
* Security: Require ADMIN for `?flush=1` (stop denial of service attacks)
|
* Security: Require ADMIN for `?flush=1` (stop denial of service attacks)
|
||||||
([#1692](https://github.com/silverstripe/silverstripe-framework/issues/1692))
|
([#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
|
## Details
|
||||||
|
|
||||||
|
11
docs/en/changelogs/3.0.8.md
Normal file
11
docs/en/changelogs/3.0.8.md
Normal 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)
|
@ -55,8 +55,4 @@ Please read our [guide to contributing documentation](misc/contributing/document
|
|||||||
### Level 4: Contributing to the SilverStripe core
|
### Level 4: Contributing to the SilverStripe core
|
||||||
|
|
||||||
* [Contributing](misc/contributing)
|
* [Contributing](misc/contributing)
|
||||||
* [Coding Conventions](misc/coding-conventions)
|
* [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>
|
|
@ -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,
|
so its up to you to either convert existing configuration as applicable,
|
||||||
or start your own configuration.
|
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
|
## Related
|
||||||
|
|
||||||
* [Howto: Extend the CMS Interface](../howto/extend-cms-interface)
|
* [Howto: Extend the CMS Interface](../howto/extend-cms-interface)
|
||||||
|
@ -86,6 +86,7 @@ class HtmlEditorConfig {
|
|||||||
'safari_warning' => false,
|
'safari_warning' => false,
|
||||||
'relative_urls' => true,
|
'relative_urls' => true,
|
||||||
'verify_html' => true,
|
'verify_html' => true,
|
||||||
|
'browser_spellcheck' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,7 +97,6 @@ class HtmlEditorConfig {
|
|||||||
'table' => null,
|
'table' => null,
|
||||||
'emotions' => null,
|
'emotions' => null,
|
||||||
'paste' => null,
|
'paste' => null,
|
||||||
'spellchecker' => null
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,7 +106,7 @@ class HtmlEditorConfig {
|
|||||||
1 => array('bold','italic','underline','strikethrough','separator',
|
1 => array('bold','italic','underline','strikethrough','separator',
|
||||||
'justifyleft','justifycenter','justifyright','justifyfull','formatselect','separator',
|
'justifyleft','justifycenter','justifyright','justifyfull','formatselect','separator',
|
||||||
'bullist','numlist','outdent','indent','blockquote','hr','charmap'),
|
'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'),
|
'advcode','search','replace','selectall','visualaid','separator','tablecontrols'),
|
||||||
3 => array()
|
3 => array()
|
||||||
);
|
);
|
||||||
|
@ -941,7 +941,7 @@ class Versioned extends DataExtension {
|
|||||||
|
|
||||||
Session::set('readingMode', 'Stage.' . $stage);
|
Session::set('readingMode', 'Stage.' . $stage);
|
||||||
}
|
}
|
||||||
if(isset($_GET['archiveDate'])) {
|
if(isset($_GET['archiveDate']) && strtotime($_GET['archiveDate'])) {
|
||||||
Session::set('readingMode', 'Archive.' . $_GET['archiveDate']);
|
Session::set('readingMode', 'Archive.' . $_GET['archiveDate']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ class CoreTest extends SapphireTest {
|
|||||||
if(file_exists($path)) {
|
if(file_exists($path)) {
|
||||||
rmdir($path . DIRECTORY_SEPARATOR . $user);
|
rmdir($path . DIRECTORY_SEPARATOR . $user);
|
||||||
rmdir($path);
|
rmdir($path);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user