| 95 |
$draws[] = l(t('Draw user\'s tree of breadth-first search'), 'sna/tree_draw/' . $account->uid . '/' . ROUTE_MIN_STEP); |
$draws[] = l(t('Draw user\'s tree of breadth-first search'), 'sna/tree_draw/' . $account->uid . '/' . ROUTE_MIN_STEP); |
| 96 |
$output[] = array('title' => t('Visualization'), 'value' => theme_item_list($draws)); |
$output[] = array('title' => t('Visualization'), 'value' => theme_item_list($draws)); |
| 97 |
} |
} |
| 98 |
|
/* Collect all the direct connections into a user list */ |
| 99 |
|
if (isset($edges[$account->uid])) { |
| 100 |
|
foreach (array_keys($edges[$account->uid]) as $direct_conn) { |
| 101 |
|
$group[] = user_load(array('uid' => $direct_conn)); |
| 102 |
|
} |
| 103 |
|
$output[] = array('title' => t('Direct connections'), |
| 104 |
|
'value' => theme_box(t('From this user'), theme('user_list', $group))); |
| 105 |
|
} |
| 106 |
return array(t("Social network informations") => $output); |
return array(t("Social network informations") => $output); |
| 107 |
} |
} |
| 108 |
} |
} |
| 369 |
'callback' => str_replace('/', '_', $ops[$i]['path']) , |
'callback' => str_replace('/', '_', $ops[$i]['path']) , |
| 370 |
'access' => user_access($ops[$i]['access'])); |
'access' => user_access($ops[$i]['access'])); |
| 371 |
} |
} |
| 372 |
$items[] = array('path' => 'sna/_to_b', |
$items[] = array('path' => 'sna/a_to_b', |
| 373 |
'title' => t('Search routes'), |
'title' => t('Search routes'), |
| 374 |
'callback' => 'sna_a_to_b_show', |
'callback' => 'sna_a_to_b_show', |
| 375 |
'access' => user_access('access sna'), |
'access' => user_access('access sna'), |
| 396 |
/*if (!user_access("access administration pages")) { |
/*if (!user_access("access administration pages")) { |
| 397 |
return message_access(); |
return message_access(); |
| 398 |
}*/ |
}*/ |
| 399 |
if (array_search(DBA_HANDLER, array_keys(dba_handlers())) === FALSE) { |
if (array_search(DBA_HANDLER, array_keys(dba_handlers())) === FALSE || !SNA_CACHE_ENABLED) { |
| 400 |
drupal_set_message(t('The proper dba_handler support is missing.'), 'error'); |
drupal_set_message(t('The proper dba_handler support is missing.'), 'error'); |
| 401 |
drupal_set_message(t('You have to choose a valid dba_handler in common.php'), 'status'); |
drupal_set_message(t('You have to choose a valid dba_handler in common.php'), 'status'); |
| 402 |
} |
} |
| 403 |
|
drupal_set_message(t('The network database is updated: ') . date('F d Y H:i:s', filemtime(DATA_PATH)), 'status'); |
| 404 |
|
|
| 405 |
$form['sna_data_source'] = array('#title' => t('Data source of the network'), |
$form['sna_data_source'] = array('#title' => t('Data source of the network'), |
| 406 |
'#type' => 'select', |
'#type' => 'select', |