function _ueditor_realpath in UEditor - 百度编辑器 7.3
Same name and namespace in other branches
- 8 ueditor.module \_ueditor_realpath()
- 7 editors/ueditor.inc \_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_controller in ./
ueditor.module - The main entrance of ueditor command.
File
- ./
ueditor.module, line 204 - Integration ueditor for wysiwyg.
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;
}