You are here

function bueditor_editors in BUEditor 6

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

Editor(s).

5 calls to bueditor_editors()
bueditor_admin in ./bueditor.admin.inc
Admin main page.
bueditor_check_page in ./bueditor.module
Check if the editor is visible in the page.
bueditor_editor_load in ./bueditor.module
load editor by id. used by menu system
bueditor_editor_options in ./bueditor.admin.inc
Editor options.
bueditor_settle in ./bueditor.module
Include necessary js and css files for editor settlement.
3 string references to 'bueditor_editors'
bueditor_editor_submit in ./bueditor.admin.inc
Save editor & buttons.
bueditor_insert_latest in ./bueditor.install
Insert the latest version of default editor.
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. Insert the latest version of…

File

./bueditor.module, line 63

Code

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