You are here

function bueditor_editors in BUEditor 5

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

Editor(s).

8 calls to bueditor_editors()
bueditor_admin in ./bueditor.module
Admin main page.
bueditor_confirm_delete in ./bueditor.module
Confirm editor delete
bueditor_confirm_delete_form_submit in ./bueditor.module
bueditor_form_admin in ./bueditor.module
Admin form.
bueditor_form_editor in ./bueditor.module
Editor form.

... See full list

File

./bueditor.module, line 369

Code

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