| 1 |
<?php |
<?php |
| 2 |
// $Id: og_blueprints.module,v 1.1.2.20 2008/09/15 19:25:47 sdboyer Exp $ |
// $Id: og_blueprints.module,v 1.1.2.21 2009/02/17 07:50:26 sdboyer Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file og_blueprints.module |
* @file og_blueprints.module |
| 776 |
function og_blueprints_list($refresh = FALSE) { |
function og_blueprints_list($refresh = FALSE) { |
| 777 |
static $blueprints; |
static $blueprints; |
| 778 |
if (empty($blueprints) || $refresh) { |
if (empty($blueprints) || $refresh) { |
| 779 |
if ($refresh || !$blueprints = variable_get('og_blueprints_list', FALSE)) { |
$blueprints = array(); |
| 780 |
$blueprints = array(); |
$result = db_query("SELECT DISTINCT bpid, bpname FROM {og_blueprint}"); |
| 781 |
$result = db_query("SELECT DISTINCT bpid, bpname FROM {og_blueprint}"); |
while ($row = db_fetch_array($result)) { |
| 782 |
while ($row = db_fetch_array($result)) { |
$blueprints[$row['bpid']] = $row['bpname']; |
|
$blueprints[$row['bpid']] = $row['bpname']; |
|
|
} |
|
|
variable_set('og_blueprints_list', $blueprints); |
|
| 783 |
} |
} |
| 784 |
} |
} |
| 785 |
return $blueprints; |
return $blueprints; |