You are here

function panels_load_panels in Panels 5

3 calls to panels_load_panels()
panels_delete_confirm in ./panels.module
panels_edit_page in ./panels.module
panels_panels_page in ./panels.module

File

./panels.module, line 676

Code

function panels_load_panels($did) {
  $panels = db_fetch_object(db_query("SELECT * FROM {panels_info} WHERE did = %d", $did));
  if (!$panels) {
    return NULL;
  }
  $panels->content = array();
  $panels->access = $panels->access ? explode(', ', $panels->access) : array();
  $result = db_query("SELECT * FROM {panels_area} WHERE did = %d ORDER BY area, position", $did);
  while ($area = db_fetch_object($result)) {
    $area->configuration = unserialize($area->configuration);
    $panels->content[$area->area][] = $area;
  }
  return $panels;
}