*/
require_once(dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))).'/config.php'); // moodle hack
+@error_reporting(E_ALL ^ E_NOTICE); // hide notices even if Moodle is configured to show them
// General settings
$config['general.engine'] = get_config('editor_tinymce', 'spellengine') ? get_config('editor_tinymce', 'spellengine') : 'GoogleSpell';
//$config['general.engine'] = 'PSpellShell';
//$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';
- // PSpell settings
- $config['PSpell.mode'] = PSPELL_FAST;
- $config['PSpell.spelling'] = "";
- $config['PSpell.jargon'] = "";
- $config['PSpell.encoding'] = "";
+ if ($config['general.engine'] === 'PSpell' or $config['general.engine'] === 'PSpellShell') {
+ // PSpell settings
+ $config['PSpell.mode'] = PSPELL_FAST;
+ $config['PSpell.spelling'] = "";
+ $config['PSpell.jargon'] = "";
+ $config['PSpell.encoding'] = "";
- // PSpellShell settings
- $config['PSpellShell.mode'] = PSPELL_FAST;
- $config['PSpellShell.aspell'] = $CFG->aspellpath;
- $config['PSpellShell.tmp'] = '/tmp';
+ // PSpellShell settings
+ $config['PSpellShell.mode'] = PSPELL_FAST;
+ $config['PSpellShell.aspell'] = $CFG->aspellpath;
+ $config['PSpellShell.tmp'] = '/tmp';
- // Windows PSpellShell settings
- //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
- //$config['PSpellShell.tmp'] = 'c:/temp';
+ // Windows PSpellShell settings
+ //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"';
+ //$config['PSpellShell.tmp'] = 'c:/temp';
+ }
?>
*
* @package MCManager.includes
* @author Moxiecode
- * @copyright Copyright © 2007, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright � 2007, Moxiecode Systems AB, All rights reserved.
*/
@error_reporting(E_ALL ^ E_NOTICE);
$log->info(implode(', ', $args));
}
-function error($msg) {
+function xx_error($msg) { // collides with our moodle error(), it does not look to be used at all
$args = func_get_args();
$log = getLogger();