/[drupal]/contributions/modules/sna/sna.module
ViewVC logotype

Diff of /contributions/modules/sna/sna.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Thu Aug 17 14:53:04 2006 UTC revision 1.3, Tue Aug 22 11:50:18 2006 UTC
# Line 95  function sna_user($op, &$edit, &$account Line 95  function sna_user($op, &$edit, &$account
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  }  }
# Line 361  function sna_menu($may_cache) { Line 369  function sna_menu($may_cache) {
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'),
# Line 388  function sna_settings() { Line 396  function sna_settings() {
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',

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2