plugins: [ 'wutil', 'wmonkeypatch', 'wbutton', 'wbbcode', 'wfontcolor', 'wfontfamily', 'wfontsize' ],
wautosave: {
active: ($autosave) ? true : false,
- key: ($autosave) ? $autosave : '',
+ key: ($autosave) ? '{@$__wcf->getAutosavePrefix()}_' + $autosave : '',
saveOnInit: {if !$errorField|empty}true{else}false{/if}
}
};
return RouteHandler::secureConnection();
}
+ /**
+ * Returns a 8 character prefix for editor autosave.
+ *
+ * @return string
+ */
+ public function getAutosavePrefix() {
+ return substr(sha1(preg_replace('~^https~', 'http', WCF::getPath())), 0, 8);
+ }
+
/**
* Initialises the cronjobs.
*/