function ckeditor_profile_load in CKEditor - WYSIWYG HTML editor 6
Same name and namespace in other branches
- 7 ckeditor.module \ckeditor_profile_load()
Load all profiles. Just load one profile if $name is passed in.
15 calls to ckeditor_profile_load()
- ckeditor_admin_global_profile_form in includes/
ckeditor.admin.inc - ckeditor_admin_profile_form in includes/
ckeditor.admin.inc - Form builder for a normal profile
- ckeditor_admin_profile_form_validate in includes/
ckeditor.admin.inc - Profile validation.
- ckeditor_file_download in ./
ckeditor.module - Implementation of hook_file_download(). Support for private downloads. CKEditor does not implement any kind of potection on private files.
- ckeditor_get_settings in ./
ckeditor.module
File
- ./
ckeditor.module, line 461 - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Code
function ckeditor_profile_load($name = '', $clear = FALSE) {
static $profiles = array();
if (empty($profiles) || $clear === TRUE) {
$result = db_query("SELECT * FROM {ckeditor_settings} ORDER BY name");
while ($data = db_fetch_object($result)) {
$data->settings = unserialize($data->settings);
$data->rids = array();
$profiles[$data->name] = $data;
}
$roles = user_roles();
$result = db_query("SELECT name, rid FROM {ckeditor_role}");
while ($data = db_fetch_object($result)) {
$profiles[$data->name]->rids[$data->rid] = $roles[$data->rid];
}
}
return $name ? isset($profiles[urldecode($name)]) ? $profiles[urldecode($name)] : FALSE : $profiles;
}