function tinymce_profile_load in TinyMCE 6.2
Same name and namespace in other branches
- 5.2 tinymce.module \tinymce_profile_load()
- 5 tinymce.module \tinymce_profile_load()
- 6 tinymce.module \tinymce_profile_load()
Load all profiles. Just load one profile if $name is passed in.
4 calls to tinymce_profile_load()
- tinymce_admin in ./
tinymce.admin.inc - Controller for tinymce administrative settings.
- tinymce_process_textarea in ./
tinymce.module - Attach tinymce to a textarea
- tinymce_profile_overview in ./
tinymce.admin.inc - Controller for tinymce profiles.
- tinymce_user_get_profile in ./
tinymce.module
File
- ./
tinymce.module, line 694 - Integrate the TinyMCE editor (http://tinymce.moxiecode.com/) into Drupal.
Code
function tinymce_profile_load($name = '') {
static $profiles = array();
if (!$profiles) {
$roles = user_roles();
$result = db_query('SELECT * FROM {tinymce_settings}');
while ($data = db_fetch_object($result)) {
$data->settings = unserialize($data->settings);
$result2 = db_query("SELECT rid FROM {tinymce_role} WHERE name = '%s'", $data->name);
$role = array();
while ($r = db_fetch_object($result2)) {
$role[$r->rid] = $roles[$r->rid];
}
$data->rids = $role;
$profiles[$data->name] = $data;
}
}
return $name ? $profiles[$name] : $profiles;
}