Bladeren bron

Applied patch provided by Nathan SWH relating to permissions

Stephen Ficklin 10 jaren geleden
bovenliggende
commit
b999613847

+ 1 - 1
tripal_analysis/tripal_analysis.module

@@ -139,7 +139,7 @@ function tripal_analysis_permission() {
       'title' => t('Edit Analyses'),
       'description' => t('Allow users to edit analysis pages.'),
     ),
-    'adminster tripal analysis' => array(
+    'administer tripal analysis' => array(
       'title' => t('Administer Analyses'),
       'description' => t('Allow users to administer all analyses.'),
     ),

+ 1 - 1
tripal_contact/tripal_contact.module

@@ -266,7 +266,7 @@ function tripal_contact_permission() {
       'title' => t('Edit Contacts'),
       'description' => t('Allow users to edit contact pages.'),
     ),
-    'adminster tripal contact' => array(
+    'administer tripal contact' => array(
       'title' => t('Administer Contacts'),
       'description' => t('Allow users to administer all contacts.'),
     ),

+ 2 - 4
tripal_core/api/tripal_core.chado_query.api.inc

@@ -645,7 +645,7 @@ function chado_update_record($table, $match, $values, $options = NULL) {
   }
 
   // get the values used for updating
-  foreach ($values as $field => $value) {
+  foreach ($values as $field => &$value) {
     if (is_array($value)) {
       $foreign_options = array();
       // select the value from the foreign key relationship for this value
@@ -1298,14 +1298,12 @@ function chado_select_record($table, $columns, $values, $options = NULL) {
 function chado_query($sql, $args = array()) {
   $is_local = $GLOBALS["chado_is_local"];
 
-
   // Args should be an array
   if (!is_array($args)) {
     tripal_report_error('tripal_core', TRIPAL_ERROR,
       'chado_query; Need to pass an array to chado_query, "%value" passed instead. Query: %query',
       array('%value' => $args, '%query' => $sql)
     );
-    $args = array($args);
     return FALSE;
   }
 
@@ -1318,7 +1316,7 @@ function chado_query($sql, $args = array()) {
     // the featureloc table has some indexes that use function that call other functions
     // and those calls do not reference a schema, therefore, any tables with featureloc
     // must automaticaly have the chado schema set as active to find
-    if(preg_match('/chado.featureloc/i', $sql)) {
+    if (preg_match('/chado.featureloc/i', $sql)) {
       $previous_db = chado_set_active('chado') ;
       $results = db_query($sql, $args);
       chado_set_active($previous_db);

+ 1 - 1
tripal_example/tripal_example.module

@@ -50,7 +50,7 @@ function tripal_example_permisssions() {
       'title' => t('Edit Examples'),
       'description' => t('Allow users to edit example pages.'),
     ),
-    'adminster tripal example' => array(
+    'administer tripal example' => array(
       'title' => t('Administer Examples'),
       'description' => t('Allow users to administer all examples.'),
     ),

+ 48 - 64
tripal_feature/includes/tripal_feature.fasta_loader.inc

@@ -442,6 +442,10 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
   $re_subject, $parent_type, $method, $uid, $analysis_id,
   $match_type, $job = NULL) {
 
+  // open the temporary loading file
+  $tmp_file = tempnam(sys_get_temp_dir(), 'tripal_fasta_');
+  $fh = fopen($tmp_file, 'wb');
+    
   $transaction = db_transaction();
   print "\nNOTE: Loading of this GFF file is performed using a database transaction. \n" .
        "If the load fails or is terminated prematurely then the entire set of \n" .
@@ -449,11 +453,13 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
   try {
 
     // first get the type for this sequence
-    $cvtermsql = "SELECT CVT.cvterm_id
-                 FROM {cvterm} CVT
-                    INNER JOIN {cv} CV on CVT.cv_id = CV.cv_id
-                    LEFT JOIN {cvtermsynonym} CVTS on CVTS.cvterm_id = CVT.cvterm_id
-                 WHERE cv.name = :cvname and (CVT.name = :name or CVTS.synonym = :synonym)";
+    $cvtermsql = "
+      SELECT CVT.cvterm_id
+      FROM {cvterm} CVT
+        INNER JOIN {cv} CV on CVT.cv_id = CV.cv_id
+        LEFT JOIN {cvtermsynonym} CVTS on CVTS.cvterm_id = CVT.cvterm_id
+      WHERE cv.name = :cvname and (CVT.name = :name or CVTS.synonym = :synonym)
+    ";
     $cvterm = chado_query($cvtermsql, array(':cvname' => 'sequence', ':name' => $type, ':synonym' => $type))->fetchObject();
     if (!$cvterm) {
       tripal_report_error("T_fasta_loader", TRIPAL_ERROR, "Cannot find the term type: '%type'", array('%type' => $type));
@@ -511,7 +517,7 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
         // if we have a feature name then we are starting a new sequence
         // so lets handle the previous one before moving on
         if ($name or $uname) {
-          tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id,
+          tripal_feature_fasta_loader_handle_feature($fh, $name, $uname, $db_id,
             $accession, $subject, $rel_type, $parent_type, $analysis_id, $organism_id, $cvterm,
             $source, $residues, $method, $re_name, $match_type, $parentcvterm, $relcvterm);
           $residues = '';
@@ -602,7 +608,7 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
     }
   
     // now load the last sequence in the file
-    tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id,
+    tripal_feature_fasta_loader_handle_feature($fh, $name, $uname, $db_id,
       $accession, $subject, $rel_type, $parent_type, $analysis_id, $organism_id, $cvterm,
       $source, $residues, $method, $re_name, $match_type, $parentcvterm, $relcvterm);
   }
@@ -612,15 +618,19 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
     watchdog_exception('T_fasta_loader', $e);
     print "FAILED: Rolling back database changes...\n";
   }
-  
+  close($fh);
   print "\nDone\n";
 }
 
 /**
  * A helper function for tripal_feature_load_fasta() to load a single feature
  *
+ * @param $fh
+ *   The file handle where the temporary loading file is stored
  * @param $name
+ *   The name of the feature to insert/update
  * @param $uname
+ *   The uniquename of the feature to insert/udpate
  * @param $db_id
  * @param $accession
  * @param $parent
@@ -639,9 +649,9 @@ function tripal_feature_load_fasta($dfile, $organism_id, $type,
  *
  * @ingroup fasta_loader
  */
-function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $accession,
+function tripal_feature_fasta_loader_handle_feature($fh, $name, $uname, $db_id, $accession,
   $parent, $rel_type, $parent_type, $analysis_id, $organism_id, $cvterm,
-  $source, $residues, $method, $re_name, $match_type, $parentcvterm, $relcvterm) {
+  $source, &$residues, $method, $re_name, $match_type, $parentcvterm, $relcvterm) {
 
   // check to see if this feature already exists if the match_type is 'Name'
   if (strcmp($match_type, 'Name')==0) {
@@ -650,8 +660,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'name' => $name,
       'type_id' => $cvterm->cvterm_id,
     );
-    $options = array('statement_name' => 'sel_feature_ornaty');
-    $results = chado_select_record('feature', array('feature_id'), $values, $options);
+    $results = chado_select_record('feature', array('feature_id'), $values);
     if (count($results) > 1) {
       tripal_report_error('T_fasta_loader', "Multiple features exist with the name '%name' of type
                '%type' for the organism.  skipping", array('%name' => $name, '%type' => $type));
@@ -669,8 +678,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'type_id' => $cvterm->cvterm_id,
     );
 
-    $options = array('statement_name' => 'sel_feature_oruqty');
-    $results = chado_select_record('feature', array('feature_id'), $values, $options);
+    $results = chado_select_record('feature', array('feature_id'), $values);
     if (count($results) > 1) {
       tripal_report_error('T_fasta_loader', "Multiple features exist with the name '%name' of type
                '%type' for the organism.  skipping", array('%name' => $name, '%type' => $type));
@@ -691,6 +699,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
   // if we don't have a feature and we're doing an insert then do the insert
   $inserted = 0;
   if (!$feature and (strcmp($method, 'Insert only')==0 or strcmp($method, 'Insert and update')==0)) {
+    print "!feature && (Insert only || Insert and update)\n\n";
     // if we have a unique name but not a name then set them to be the same and vice versa
     if (!$uname) {
       $uname = $name;
@@ -704,15 +713,12 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'organism_id' => $organism_id,
       'name' => $name,
       'uniquename' => $uname,
-      'residues' => $residues,
+      'residues' => &$residues,
       'seqlen' => drupal_strlen($residues),
       'md5checksum' => md5($residues),
       'type_id' => $cvterm->cvterm_id,
-      'is_analysis' => 'FALSE',
-      'is_obsolete' => 'FALSE',
     );
-    $options = array('statement_name' => 'ins_feature_all');
-    $success = chado_insert_record('feature', $values, $options);
+    $success = chado_insert_record('feature', $values);
     if (!$success) {
       tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to insert feature '%name (%uname)'",
         array('%name' => $name, '%uname' => $numane));
@@ -725,8 +731,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'uniquename' => $uname,
       'type_id' => $cvterm->cvterm_id,
     );
-    $options = array('statement_name' => 'sel_feature_oruqty');
-    $results = chado_select_record('feature', array('feature_id'), $values, $options);
+    $results = chado_select_record('feature', array('feature_id'), $values);
     if (count($results) == 1) {
        $inserted = 1;
        $feature = $results[0];
@@ -747,6 +752,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
 
   // if we do have a feature and this is an update then proceed with the update
   if ($feature and !$inserted and (strcmp($method, 'Update only')==0 or strcmp($method, 'Insert and update')==0)) {
+    print "feature && !inserted and (Update only || Insert and update)\n\n";
     // if the user wants to match on the Name field
     if (strcmp($match_type, 'Name')==0) {
       // if we're matching on the name but do not have a unique name then we don't want to update the uniquename.
@@ -759,8 +765,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
           'uniquename' => $uname,
           'type_id' => $cvterm->cvterm_id,
         );
-        $options = array('statement_name' => 'sel_feature_oruqty');
-        $results = chado_select_record('feature', array('feature_id'), $values, $options);
+        $results = chado_select_record('feature', array('feature_id'), $values);
         if (count($results) > 0) {
           tripal_report_error('T_fasta_loader', "Cannot update the feature '%name' with a uniquename of '%uname' and type of '%type' as it
             conflicts with an existing feature with the same uniquename and type.",
@@ -771,38 +776,32 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
         // the changes to the uniquename don't conflict so proceed with the update
         $values = array(
           'uniquename' => $uname,
-          'residues' => $residues,
+          'residues' => &$residues,
           'seqlen' => drupal_strlen($residues),
           'md5checksum' => md5($residues),
-          'is_analysis' => 'false',
-          'is_obsolete' => 'false',
         );
         $match = array(
           'name' => $name,
           'organism_id' => $organism_id,
           'type_id' => $cvterm->cvterm_id,
         );
-        $options = array('statement_name' => 'upd_feature_resemdisis_naorty_un');
       }
       // if we do not have a new unique name then don't change the existing uniquename field
       else {
         $values = array(
-          'residues' => $residues,
+          'residues' => &$residues,
           'seqlen' => drupal_strlen($residues),
           'md5checksum' => md5($residues),
-          'is_analysis' => 'false',
-          'is_obsolete' => 'false',
         );
         $match = array(
           'name' => $name,
           'organism_id' => $organism_id,
           'type_id' => $cvterm->cvterm_id,
         );
-        $options = array('statement_name' => 'upd_feature_unresemdisis_naorty');
       }
 
       // perform the update
-      $success = chado_update_record('feature', $match, $values, $options);
+      $success = chado_update_record('feature', $match, $values);
       if (!$success) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR,
           "Failed to update feature '%name' ('%name')",
@@ -816,36 +815,30 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       if ($name) {
         $values = array(
           'name' => $name,
-          'residues' => $residues,
-          'seqlen' => drupal_strlen($residues),
-          'md5checksum' => md5($residues),
-          'is_analysis' => 'false',
-          'is_obsolete' => 'false',
+           'residues' => &$residues,
+           'seqlen' => drupal_strlen($residues),
+           'md5checksum' => md5($residues),
         );
         $match = array(
           'uniquename' => $uname,
           'organism_id' => $organism_id,
           'type_id' => $cvterm->cvterm_id,
         );
-        $options = array('statement_name' => 'upd_feature_resemdisis_unorty_na');
       }
       // if we have a unique name then update it after matching by the name
       else {
         $values = array(
-          'residues' => $residues,
-          'seqlen' => drupal_strlen($residues),
-          'md5checksum' => md5($residues),
-          'is_analysis' => 'false',
-          'is_obsolete' => 'false',
+           'residues' => &$residues,
+           'seqlen' => drupal_strlen($residues),
+           'md5checksum' => md5($residues),
         );
         $match = array(
           'uniquename' => $uname,
           'organism_id' => $organism_id,
           'type_id' => $cvterm->cvterm_id,
         );
-        $options = array('statement_name' => 'upd_feature_naresemdisis_unorty');
       }
-      $success = chado_update_record('feature', $match, $values, $options);
+      $success = chado_update_record('feature', $match, $values);
       if (!$success) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to update feature '%name' ('%name')",
           array('%name' => $name, '%uiname' => $uname));
@@ -861,11 +854,9 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'analysis_id' => $analysis_id,
       'feature_id' => $feature->feature_id,
     );
-    $sel_options = array('statement_name' => 'sel_analysisfeature_anfe');
-    $results = chado_select_record('analysisfeature', array('analysisfeature_id'), $values, $sel_options);
+    $results = chado_select_record('analysisfeature', array('analysisfeature_id'), $values);
     if (count($results) == 0) {
-      $ins_options = array('statement_name' => 'ins_analysisfeature_anfe');
-      $success = chado_insert_record('analysisfeature', $values, $ins_options);
+      $success = chado_insert_record('analysisfeature', $values);
       if (!$success) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to associate analysis and feature '%name' ('%name')",
           array('%name' => $name, '%uname' => $uname));
@@ -881,18 +872,16 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'db_id' => $db_id,
       'accession' => $accession
     );
-    $sel_options = array('statement_name' => 'sel_dbxref_dbac');
-    $results = chado_select_record('dbxref', array('dbxref_id'), $values, $sel_options);
+    $results = chado_select_record('dbxref', array('dbxref_id'), $values);
     // if the accession doesn't exist then add it
     if (count($results) == 0) {
-      $ins_options = array('statement_name' => 'ins_dbxref_dbac');
-      $results = chado_insert_record('dbxref', $values, $ins_options);
+      $results = chado_insert_record('dbxref', $values);
       if (!$results) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to add database accession '%accession'",
           array('%accession' => $accession));
         return 0;
       }
-      $results = chado_select_record('dbxref', array('dbxref_id'), $values, $sel_options);
+      $results = chado_select_record('dbxref', array('dbxref_id'), $values);
       if (count($results) == 1) {
         $dbxref = $results[0];
       }
@@ -911,11 +900,9 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'feature_id' => $feature->feature_id,
       'dbxref_id' => $dbxref->dbxref_id
     );
-    $sel_options = array('statement_name' => 'sel_featuredbxref_fedb');
-    $results = chado_select_record('feature_dbxref', array('feature_dbxref_id'), $values, $sel_options);
+    $results = chado_select_record('feature_dbxref', array('feature_dbxref_id'), $values);
     if (count($results) == 0) {
-      $ins_options = array('statement_name' => 'ins_featuredbxref_fedb');
-      $success = chado_insert_record('feature_dbxref', $values, $ins_options);
+      $success = chado_insert_record('feature_dbxref', $values);
       if (!$success) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to add associate database accession '%accession' with feature",
           array('%accession' => $accession));
@@ -931,8 +918,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'uniquename' => $parent,
       'type_id' => $parentcvterm->cvterm_id,
     );
-    $options = array('statement_name' => 'sel_feature_oruqty');
-    $results = chado_select_record('feature', array('feature_id'), $values, $options);
+    $results = chado_select_record('feature', array('feature_id'), $values);
     if (count($results) != 1) {
       tripal_report_error('T_fasta_loader', "Cannot find a unique fature for the parent '%parent' of type
                '%type' for the feature.", array('%parent' => $parent, '%type' => $parent_type));
@@ -946,11 +932,9 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
       'object_id' => $parent_feature->feature_id,
       'type_id' => $relcvterm->cvterm_id,
     );
-    $sel_options = array('statement_name' => 'sel_featurerelationship_suojty');
-    $results = chado_select_record('feature_relationship', array('feature_relationship_id'), $values, $sel_options);
+    $results = chado_select_record('feature_relationship', array('feature_relationship_id'), $values);
     if (count($results) == 0) {
-      $ins_options = array('statement_name' => 'ins_featurerelationship_suojty');
-      $success = chado_insert_record('feature_relationship', $values, $ins_options);
+      $success = chado_insert_record('feature_relationship', $values);
       if (!$success) {
         tripal_report_error('T_fasta_loader', TRIPAL_ERROR, "Failed to add associate database accession '%accession' with feature",
           array('%accession' => $accession));

+ 29 - 23
tripal_feature/tripal_feature.install

@@ -380,30 +380,36 @@ function tripal_feature_update_dependencies() {
  */
 function tripal_feature_update_7201() {
 
-  // there is a bug in the Tripal v2.0-alpha release that didn't add the
-  // materialized view schema to the mviews table.
-  // get the schema for the materialized view from the custom_tables table
-  // as there is a copy there, but only if the schema is missing from the
-  // materialized view table
-  $view_name = 'organism_feature_count';
-  $schema = db_select('tripal_mviews', 'tm')
-    ->fields('tm', array('mv_schema'))
-    ->condition('name', $view_name)
-    ->execute()
-    ->fetchField();
-  if (!$schema or $schema == 'Array') {
-    $schema = db_select('tripal_custom_tables', 'tct')
-      ->fields('tct', array('schema'))
-      ->condition('table_name', $view_name)
+  try {
+    // there is a bug in the Tripal v2.0-alpha release that didn't add the
+    // materialized view schema to the mviews table.
+    // get the schema for the materialized view from the custom_tables table
+    // as there is a copy there, but only if the schema is missing from the
+    // materialized view table
+    $view_name = 'organism_feature_count';
+    $schema = db_select('tripal_mviews', 'tm')
+      ->fields('tm', array('mv_schema'))
+      ->condition('name', $view_name)
       ->execute()
       ->fetchField();
-    $schema_str = var_export(unserialize($schema), TRUE);
-    $schema_str = preg_replace('/=>\s+\n\s+array/', '=> array', $schema_str);
-    db_update('tripal_mviews')
-      ->fields(array(
-      'mv_schema' => $schema_str
-      ))
-      ->condition('name', $view_name)
-      ->execute();
+    if (!$schema or $schema == 'Array') {
+      $schema = db_select('tripal_custom_tables', 'tct')
+        ->fields('tct', array('schema'))
+        ->condition('table_name', $view_name)
+        ->execute()
+        ->fetchField();
+      $schema_str = var_export(unserialize($schema), TRUE);
+      $schema_str = preg_replace('/=>\s+\n\s+array/', '=> array', $schema_str);
+      db_update('tripal_mviews')
+        ->fields(array(
+        'mv_schema' => $schema_str
+        ))
+        ->condition('name', $view_name)
+        ->execute();
+    }
+  }
+  catch (\PDOException $e) {
+    $error = $e->getMessage();
+    throw new DrupalUpdateException('Failed to complete update' . $error);
   }
 }

+ 1 - 1
tripal_feature/tripal_feature.module

@@ -93,7 +93,7 @@ function tripal_feature_permission() {
       'title' => t('Edit Features'),
       'description' => t('Allow users to edit feature pages.'),
     ),
-    'adminster tripal feature' => array(
+    'administer tripal feature' => array(
       'title' => t('Administer Features'),
       'description' => t('Allow users to administer all features.'),
     ),

+ 1 - 1
tripal_featuremap/tripal_featuremap.module

@@ -71,7 +71,7 @@ function tripal_featuremap_permission() {
       'title' => t('Edit Maps'),
       'description' => t('Allow users to edit map pages.'),
     ),
-    'adminster tripal featuremap' => array(
+    'administer tripal featuremap' => array(
       'title' => t('Administer Maps'),
       'description' => t('Allow users to administer all maps.'),
     ),

+ 3 - 3
tripal_genetic/tripal_genetic.module

@@ -27,7 +27,7 @@ require_once 'includes/tripal_genetic.admin.inc';
  */
 function tripal_genetic_permission() {
   return array(
-    'adminster tripal genetic' => array(
+    'administer tripal genetic' => array(
       'title' => t('Administer Genetic Module'),
       'description' => t('Allow users to administer the genetic module.'),
     ),
@@ -51,7 +51,7 @@ function tripal_genetic_menu() {
    'title' => 'Genetics',
    'description' => 'Genetic data including Genotypes.',
    'page callback' => 'tripal_genetic_admin_genetics_listing',
-   'access arguments' => array('adminster tripal genetic'),
+   'access arguments' => array('administer tripal genetic'),
    'type' => MENU_NORMAL_ITEM,
   );
 
@@ -60,7 +60,7 @@ function tripal_genetic_menu() {
    'description' => "A description of the Tripal genetic module including a short description of it's usage.",
    'page callback' => 'theme',
    'page arguments' => array('tripal_genetic_help'),
-   'access arguments' => array('adminster tripal genetic'),
+   'access arguments' => array('administer tripal genetic'),
    'type' => MENU_LOCAL_TASK,
   );
 

+ 1 - 1
tripal_library/tripal_library.module

@@ -46,7 +46,7 @@ function tripal_library_permission() {
       'title' => t('Edit Libraries'),
       'description' => t('Allow users to edit library pages.'),
     ),
-    'adminster tripal library' => array(
+    'administer tripal library' => array(
       'title' => t('Administer Libraries'),
       'description' => t('Allow users to administer all libraries.'),
     ),

+ 2 - 2
tripal_natural_diversity/tripal_natural_diversity.module

@@ -27,7 +27,7 @@ require_once 'includes/tripal_natural_diversity.admin.inc';
  */
 function tripal_natural_diversity_permission() {
   return array(
-    'adminster tripal nd' => array(
+    'administer tripal nd' => array(
       'title' => t('Administer Natural Diversity Module'),
       'description' => t('Allow users to administer the natural diversity module.'),
     ),
@@ -51,7 +51,7 @@ function tripal_natural_diversity_menu() {
    'title' => 'Natural Diversity Experiments',
    'description' => 'Experiments relating to natural diversity such as genotype and phenotype experiments.',
    'page callback' => 'tripal_natural_diversity_admin_natdiv_view',
-   'access arguments' => array('adminster tripal nd'),
+   'access arguments' => array('administer tripal nd'),
    'type' => MENU_NORMAL_ITEM,
   );
 

+ 4 - 4
tripal_organism/tripal_organism.module

@@ -72,7 +72,7 @@ function tripal_organism_menu() {
     'title' => 'Organisms',
     'description' => 'Any living biological entity, such as an animal, plant, fungus, or bacterium.',
     'page callback' => 'tripal_organism_admin_organism_view',
-    'access arguments' => array('adminster tripal organism'),
+    'access arguments' => array('administer tripal organism'),
     'type' => MENU_NORMAL_ITEM,
   );
 
@@ -81,7 +81,7 @@ function tripal_organism_menu() {
     'description' => "A description of the Tripal Organism module including a short description of it's usage.",
     'page callback' => 'theme',
     'page arguments' => array('tripal_organism_help'),
-    'access arguments' => array('adminster tripal organism'),
+    'access arguments' => array('administer tripal organism'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -91,7 +91,7 @@ function tripal_organism_menu() {
     'description' => 'Manage integration of Chado organisms including associated features',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_organism_admin'),
-    'access arguments' => array('adminster tripal organism'),
+    'access arguments' => array('administer tripal organism'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );
@@ -221,7 +221,7 @@ function tripal_organism_permission() {
       'title' => t('Edit Organisms'),
       'description' => t('Allow users to edit organism pages.'),
     ),
-    'adminster tripal organism' => array(
+    'administer tripal organism' => array(
       'title' => t('Administer Organisms'),
       'description' => t('Allow users to administer all organisms.'),
     ),

+ 1 - 1
tripal_organism/tripal_organism.views_default.inc

@@ -221,7 +221,7 @@ function tripal_organism_admin_defaultview_organisms() {
   $handler->display->display_options['title'] = 'Organisms';
   $handler->display->display_options['use_more_always'] = FALSE;
   $handler->display->display_options['access']['type'] = 'perm';
-  $handler->display->display_options['access']['perm'] = 'adminster tripal organism';
+  $handler->display->display_options['access']['perm'] = 'administer tripal organism';
   $handler->display->display_options['cache']['type'] = 'none';
   $handler->display->display_options['query']['type'] = 'views_query';
   $handler->display->display_options['exposed_form']['type'] = 'basic';

+ 3 - 3
tripal_phenotype/tripal_phenotype.module

@@ -22,7 +22,7 @@
  */
 function tripal_phenotype_permission() {
   return array(
-    'adminster tripal phenotype' => array(
+    'administer tripal phenotype' => array(
       'title' => t('Administer Phenotype Module'),
       'description' => t('Allow users to administer the phenotype module.'),
     ),
@@ -46,7 +46,7 @@ function tripal_phenotype_menu() {
    'title' => 'Phenotypes',
    'description' => 'A controlled sentence describing observable effects of non-wild type function.',
    'page callback' => 'tripal_phenotype_admin_phenotypes_listing',
-   'access arguments' => array('adminster tripal phenotype'),
+   'access arguments' => array('administer tripal phenotype'),
    'type' => MENU_NORMAL_ITEM,
   );
 
@@ -55,7 +55,7 @@ function tripal_phenotype_menu() {
    'description' => "A description of the Tripal phenotype module including a short description of it's usage.",
    'page callback' => 'theme',
    'page arguments' => array('tripal_phenotype_help'),
-   'access arguments' => array('adminster tripal phenotype'),
+   'access arguments' => array('administer tripal phenotype'),
    'type' => MENU_LOCAL_TASK,
   );
 

+ 4 - 4
tripal_project/tripal_project.module

@@ -44,7 +44,7 @@ function tripal_project_menu() {
     'title' => 'Projects',
     'description' => ('A project. Can be used for grouping data such as with the natural diversity module data.'),
     'page callback' => 'tripal_project_admin_project_view',
-    'access arguments' => array('adminster tripal project'),
+    'access arguments' => array('administer tripal project'),
     'type' => MENU_NORMAL_ITEM
   );
 
@@ -53,7 +53,7 @@ function tripal_project_menu() {
     'description' => ("Basic Description of Tripal Project Module Functionality."),
     'page callback' => 'theme',
     'page arguments' => array('tripal_project_help'),
-    'access arguments' => array('adminster tripal project'),
+    'access arguments' => array('administer tripal project'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 6
   );
@@ -62,7 +62,7 @@ function tripal_project_menu() {
     'title' => 'Settings',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_project_admin'),
-    'access arguments' => array('adminster tripal project'),
+    'access arguments' => array('administer tripal project'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 4
   );
@@ -142,7 +142,7 @@ function tripal_project_permission() {
       'title' => t('Edit Projects'),
       'description' => t('Allow users to edit project pages.'),
     ),
-    'adminster tripal project' => array(
+    'administer tripal project' => array(
       'title' => t('Administer Projects'),
       'description' => t('Allow users to administer all projects.'),
     ),

+ 1 - 1
tripal_project/tripal_project.views_default.inc

@@ -92,7 +92,7 @@ function tripal_project_defaultview_admin_projects() {
   $handler->display->display_options['title'] = 'Projects';
   $handler->display->display_options['use_more_always'] = FALSE;
 $handler->display->display_options['access']['type'] = 'perm';
-$handler->display->display_options['access']['perm'] = 'adminster tripal project';
+$handler->display->display_options['access']['perm'] = 'administer tripal project';
   $handler->display->display_options['cache']['type'] = 'none';
   $handler->display->display_options['query']['type'] = 'views_query';
   $handler->display->display_options['exposed_form']['type'] = 'basic';

+ 3 - 3
tripal_pub/tripal_pub.module

@@ -137,7 +137,7 @@ function tripal_pub_menu() {
     'title' => t('Publication Importers'),
     'description' => t('Create and modify importers that can connect to and retreive publications from remote databases.'),
     'page callback' => 'tripal_pub_importers_list',
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_NORMAL_ITEM,
   );
 
@@ -341,7 +341,7 @@ function tripal_pub_permission() {
       'title' => t('Edit Publications'),
       'description' => t('Allow users to edit publication pages.'),
     ),
-    'adminster tripal pub' => array(
+    'administer tripal pub' => array(
       'title' => t('Administer Publications'),
       'description' => t('Allow users to administer all publications.'),
     ),
@@ -461,4 +461,4 @@ function tripal_pub_search_biological_data_views() {
       'link'         => 'find/publications'
     ),
   );
-}
+}

+ 1 - 1
tripal_stock/tripal_stock.module

@@ -163,7 +163,7 @@ function tripal_stock_permission() {
       'title' => t('Edit Stocks'),
       'description' => t('Allow users to edit stock pages.'),
     ),
-    'adminster tripal stock' => array(
+    'administer tripal stock' => array(
       'title' => t('Administer Stocks'),
       'description' => t('Allow users to administer all stocks.'),
     ),

+ 2 - 2
tripal_views/theme/tripal_views_search_biological_content.tpl.php

@@ -19,7 +19,7 @@ this site:</p>
 <?php
 // How to disable/remove views from this list
 print tripal_set_message(
-  "To remove a view from this list, simply navigate to the Views UI (Adminster ->
+  "To remove a view from this list, simply navigate to the Views UI (Administer ->
     Structure -> Views; admin/structure/views) and choose 'disable' from the action
     drop-down to the right of the view you would like to remove.",
   TRIPAL_INFO,
@@ -53,4 +53,4 @@ print tripal_set_message(
   TRIPAL_INFO,
   array('return_html' => 1)
 );
-?>
+?>