function ueditor_settings_form_validate_uploadpath in UEditor - 百度编辑器 7
Same name and namespace in other branches
- 7.3 editors/ueditor.inc \ueditor_settings_form_validate_uploadpath()
- 7.2 editors/ueditor.inc \ueditor_settings_form_validate_uploadpath()
Deal with settings form submit.
1 string reference to 'ueditor_settings_form_validate_uploadpath'
- ueditor_settings_form in editors/
ueditor.inc - Enhances the editor profile settings form for UEditor.
File
- editors/
ueditor.inc, line 164 - Editor integration functions for ueditor.
Code
function ueditor_settings_form_validate_uploadpath($element, &$form_state) {
$uploadpath = array();
if (!empty($element['imagePath']['#value'])) {
$uploadpath['imagePathFormat'] = $element['imagePath']['#value'];
}
if (!empty($element['scrawlPath']['#value'])) {
$uploadpath['scrawlPathFormat'] = $element['scrawlPath']['#value'];
}
if (!empty($element['filePath']['#value'])) {
$uploadpath['filePathFormat'] = $element['filePath']['#value'];
}
if (!empty($element['catcherPath']['#value'])) {
$uploadpath['catcherPathFormat'] = $element['catcherPath']['#value'];
}
if (!empty($element['imageManagerPath']['#value'])) {
$uploadpath['imageManagerListPath'] = $element['imageManagerPath']['#value'];
}
if (!empty($element['snapscreenPath']['#value'])) {
$uploadpath['snapscreenPathFormat'] = $element['snapscreenPath']['#value'];
}
if (!empty($element['videoPath']['#value'])) {
$uploadpath['videoPathFormat'] = $element['videoPath']['#value'];
}
if (!empty($uploadpath) && !empty($form_state['wysiwyg']['editor'])) {
_ueditor_modify_config($form_state['wysiwyg']['editor'], $uploadpath);
}
}