Browse Source

autosave frequency to source

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
f8a063c978
2 changed files with 3 additions and 1 deletions
  1. 2 0
      Sources/Subs-Editor.php
  2. 1 1
      Themes/default/GenericControls.template.php

+ 2 - 0
Sources/Subs-Editor.php

@@ -1467,6 +1467,8 @@ function create_control_richedit($editorOptions)
 	{
 		// Some general stuff.
 		$settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set'];
+		if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
+			$context['drafts_autosave_frequency'] = empty($modSettings['drafts_autosave_frequency']) ? 60000 : $modSettings['drafts_autosave_frequency'] * 1000;
 
 		// This really has some WYSIWYG stuff.
 		loadTemplate('GenericControls', 'jquery.sceditor');

+ 1 - 1
Themes/default/GenericControls.template.php

@@ -165,7 +165,7 @@ function template_control_richedit_buttons($editor_id)
 				sSceditorID: \'', $editor_id, '\',
 				sType: \'post\',
 				iBoard: ', (empty($context['current_board']) ? 0 : $context['current_board']), ',
-				iFreq: ', (empty($modSettings['drafts_autosave_frequency']) ? 60000 : $modSettings['drafts_autosave_frequency'] * 1000), '
+				iFreq: ', $context['drafts_autosave_frequency'], '
 			});
 		// ]]></script>';
 	}