You are here

function freelinking_page in Freelinking 6

Same name and namespace in other branches
  1. 5 freelinking.module \freelinking_page()
  2. 6.2 freelinking.module \freelinking_page()
1 string reference to 'freelinking_page'
freelinking_menu in ./freelinking.module

File

./freelinking.module, line 41

Code

function freelinking_page($thetitle = NULL) {
  if (isset($_POST['operation']) && $_POST['operation'] == 'delete' && isset($_POST['links'])) {
    return drupal_get_form('freelinking_multiple_delete_confirm', $_POST['links']);
  }
  elseif (isset($_POST['operation']) && $_POST['operation'] == 'delete-all') {
    return drupal_get_form('freelinking_delete_all_confirm');
  }
  if ($thetitle) {

    // find the matching title
    $freelink = _freelinking_make_link($thetitle);
    drupal_goto($freelink['path'], isset($freelink['options']['query']) ? $freelink['options']['query'] : '');
  }
  else {

    // no title was passed -- show a list of wikiwords and status
    return drupal_get_form('freelinking_page_form');
  }
}