浏览代码

autosave frequency to source

Signed-off-by: emanuele <[email protected]>
emanuele 12 年之前
父节点
当前提交
f8a063c978
共有 2 个文件被更改,包括 3 次插入1 次删除
  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>';
 	}