function _ueditor_realpath in UEditor - 百度编辑器 7
Same name and namespace in other branches
- 8 ueditor.module \_ueditor_realpath()
- 7.3 ueditor.module \_ueditor_realpath()
- 7.2 ueditor.module \_ueditor_realpath()
Change %path to realpath.
2 calls to _ueditor_realpath()
- ueditor_settings_form in editors/
ueditor.inc - Enhances the editor profile settings form for UEditor.
- _ueditor_modify_config in editors/
ueditor.inc - Modify the config.json file data.
File
- editors/
ueditor.inc, line 236 - Editor integration functions for ueditor.
Code
function _ueditor_realpath($path, $auto = FALSE) {
global $user;
$lib_path = 'sites/all/libraries';
$mod_path = drupal_get_path('module', 'ueditor');
$path = strtr($path, array(
'%b' => base_path(),
'%m' => $mod_path,
'%l' => $lib_path,
'%f' => variable_get('file_public_path', conf_path() . '/files'),
'%d' => strtr(DRUPAL_ROOT, '\\', '/'),
'%u' => $user->uid,
));
$path = strtr($path, '\\', '/');
if ($auto) {
$path .= '/';
}
$path = str_replace('//', '/', $path);
return $path;
}