|
@@ -54,13 +54,6 @@ function tripal_analysis_kegg_menu() {
|
|
|
'access arguments' => array('access chado_analysis_kegg content'),
|
|
|
'type' => MENU_CALLBACK
|
|
|
);
|
|
|
- $items['node/%/kegg'] = array(
|
|
|
- 'title' => t('KEGG'),
|
|
|
- 'page callback' => 'tripal_analysis_kegg_organism_results',
|
|
|
- 'page arguments' => array(1,3),
|
|
|
- 'access arguments' => array('access chado_analysis_kegg content'),
|
|
|
- 'type' => MENU_CALLBACK
|
|
|
- );
|
|
|
return $items;
|
|
|
}
|
|
|
/*******************************************************************************
|
|
@@ -82,26 +75,28 @@ function tripal_analysis_kegg_perm(){
|
|
|
* perform actions on data managed by this module
|
|
|
*/
|
|
|
function chado_analysis_kegg_access($op, $node, $account){
|
|
|
- if ($op == 'create') {
|
|
|
- return user_access('create chado_analysis_kegg content', $account);
|
|
|
- }
|
|
|
-
|
|
|
- if ($op == 'update') {
|
|
|
- if (user_access('edit chado_analysis_kegg content', $account)) {
|
|
|
- return TRUE;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($op == 'delete') {
|
|
|
- if (user_access('delete chado_analysis_kegg content', $account)) {
|
|
|
- return TRUE;
|
|
|
+ if ($op == 'create') {
|
|
|
+ if(!user_access('create chado_analysis_kegg content', $account)){
|
|
|
+ return FALSE;
|
|
|
}
|
|
|
- }
|
|
|
- if ($op == 'view') {
|
|
|
- if (user_access('access chado_analysis_kegg content', $account) && tripal_check_permission_by_node_id($node->nid)) {
|
|
|
- return TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($op == 'update') {
|
|
|
+ if (!user_access('edit chado_analysis_kegg content', $account)) {
|
|
|
+ return FALSE;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($op == 'delete') {
|
|
|
+ if (!user_access('delete chado_analysis_kegg content', $account)) {
|
|
|
+ return FALSE;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($op == 'view') {
|
|
|
+ if(!user_access('access chado_analysis_kegg content', $account)){
|
|
|
+ return FALSE;
|
|
|
}
|
|
|
- }
|
|
|
- return FALSE;
|
|
|
+ }
|
|
|
+ return NULL;
|
|
|
}
|
|
|
|
|
|
/*******************************************************************************
|
|
@@ -249,12 +244,12 @@ function chado_analysis_kegg_form ($node){
|
|
|
'results that cannot be linked to a feature will be '.
|
|
|
'discarded.'),
|
|
|
);
|
|
|
- $form['kegg']['keggkeywordjob'] = array(
|
|
|
+/* $form['kegg']['keggkeywordjob'] = array(
|
|
|
'#type' => 'checkbox',
|
|
|
'#title' => t('Submit a job to extract keywords from the KEGG html output'),
|
|
|
'#description' => t('Note: KEGG results are only searchable after keywords are extracted.'),
|
|
|
);
|
|
|
-
|
|
|
+*/
|
|
|
return $form;
|
|
|
}
|
|
|
/**
|
|
@@ -1108,14 +1103,9 @@ function tripal_analysis_kegg_get_settings() {
|
|
|
}
|
|
|
/************************************************************************
|
|
|
*/
|
|
|
-function tripal_analysis_kegg_organism_results($node, $ana_id = NULL) {
|
|
|
- $content = "";
|
|
|
- if ($ana_id) {
|
|
|
- $content .= "<input type=\"hidden\" id=\"analysis_id_for_kegg_report\" value=\"$ana_id\">";
|
|
|
- }
|
|
|
+function tripal_analysis_kegg_organism_results($node) {
|
|
|
$node = node_load($node);
|
|
|
- $content .= theme('tripal_organism_kegg_summary', $node);
|
|
|
- return $content;
|
|
|
+ return tripal_analysis_kegg_organism_add($node);
|
|
|
}
|
|
|
/************************************************************************
|
|
|
*/
|
|
@@ -1198,9 +1188,7 @@ function tripal_analysis_kegg_select_form(&$form_state = NULL,$node){
|
|
|
$analyses = array();
|
|
|
$analyses[''] = '';
|
|
|
while($analysis = db_fetch_object($results)){
|
|
|
- if (tripal_analysis_check_permission($analysis->analysis_id)) {
|
|
|
$analyses[$analysis->analysis_id] = "$analysis->analysis_name";
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
global $base_url;
|