You are here

function bueditor_editors in BUEditor 6.2

Same name and namespace in other branches
  1. 5 bueditor.module \bueditor_editors()
  2. 6 bueditor.module \bueditor_editors()
  3. 7 bueditor.inc \bueditor_editors()

Editor(s).

6 calls to bueditor_editors()
bueditor_admin in admin/bueditor.admin.inc
Admin main page.
bueditor_check_page in ./bueditor.inc
Check if the editor is visible in the page.
bueditor_editor_options in admin/bueditor.admin.inc
Editor options.
bueditor_eop in admin/bueditor.admin.inc
Prepare and execute if there is any valid editor operation that doesn't require form submission.
bueditor_update_6200 in ./bueditor.install
6.x-1.x to 6.x-2.x Change {bueditor_editors}.librarypath field type from varchar to text. It now stores file paths rather than a directory path.

... See full list

4 string references to 'bueditor_editors'
bueditor_update_6000 in ./bueditor.install
Update from 4|5.x to 6.x Add new fields: {bueditor_editors}.iconpath, {bueditor_editors}.librarypath. Change {bueditor_buttons}.accesskey field type from char to varchar. Update {bueditor_buttons}.content field values. Delete needless cron variable.
bueditor_update_6200 in ./bueditor.install
6.x-1.x to 6.x-2.x Change {bueditor_editors}.librarypath field type from varchar to text. It now stores file paths rather than a directory path.
bueditor_update_6201 in ./bueditor.install
Add sprite support
bueditor_write_editor in admin/bueditor.admin.inc
Update/insert an editor.

File

./bueditor.inc, line 11
Implements commonly used functions for bueditor.

Code

function bueditor_editors($eid = 0) {
  if (empty($eid)) {
    return FALSE;
  }
  static $editors = array(), $gotall = FALSE;
  if ($eid === 'all') {
    if (!$gotall) {
      $gotall = TRUE;
      $result = db_query("SELECT * FROM {bueditor_editors} ORDER BY name");
      while ($editor = db_fetch_object($result)) {
        $editors[$editor->eid] = $editor;
      }
    }
    return $editors;
  }
  elseif (!isset($editors[$eid]) && !$gotall && is_numeric($eid) && $eid > 0) {
    $editors[$eid] = db_fetch_object(db_query("SELECT * FROM {bueditor_editors} WHERE eid = %d", $eid));
  }
  return isset($editors[$eid]) ? $editors[$eid] : FALSE;
}