Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated manual

  • Loading branch information...
commit 0e6a20dafa10287f81ff227fddbe44eef3eff3fd 1 parent 1af2e7b
Johannes Goll authored
View
23 app/controllers/components/authsome.php
@@ -21,16 +21,19 @@
* THE SOFTWARE.
*/
-
-//define('ADMIN_USER_GROUP','Admin');
-//define('INTERNAL_USER_GROUP','JCVI');
-//define('EXTERNAL_USER_GROUP','User');
-//define('GUEST_USER_GROUP','Guest');
-
-define('ADMIN_USER_GROUP','ADMIN');
-define('INTERNAL_USER_GROUP','INTERNAL');
-define('EXTERNAL_USER_GROUP','EXTERNAL');
-define('GUEST_USER_GROUP','GUEST');
+//JCVI installation
+if(JCVI_INSTALLATION) {
+ define('ADMIN_USER_GROUP','Admin');
+ define('INTERNAL_USER_GROUP','JCVI');
+ define('EXTERNAL_USER_GROUP','User');
+ define('GUEST_USER_GROUP','Guest');
+}
+else {
+ define('ADMIN_USER_GROUP','ADMIN');
+ define('INTERNAL_USER_GROUP','INTERNAL');
+ define('EXTERNAL_USER_GROUP','EXTERNAL');
+ define('GUEST_USER_GROUP','GUEST');
+}
class AuthsomeComponent extends Object{
public $components = array(
View
4 app/controllers/components/solr.php
@@ -21,7 +21,7 @@
**/
require_once('baseModel.php');
-require_once( '../../vendors/SolrPhpClient/Apache/Solr/Service.php' );
+require_once( 'vendors/SolrPhpClient/Apache/Solr/Service.php' );
define('SOLR_CONNECT_EXCEPTION', "There was a problem with fetching data from the Lucene index. Please contact ".METAREP_SUPPORT_EMAIL." if this problem is persistent");
@@ -491,4 +491,4 @@ private function addLibraryDescriptions(&$facets) {
$facets->facet_fields->library_id = $libraryHash;
}
}
-?>
+?>
View
9 app/controllers/search_controller.php
@@ -259,8 +259,13 @@ public function all($query = "*:*") {
$facets['project'][$project] = $numHits;
}
}
-
- $dataset['perc'] = round(($dataset['hits'] /$dataset['counts'])*100,2);
+ if($dataset['counts'] > 0) {
+ $percent = round(($dataset['hits'] /$dataset['counts'])*100,2);
+ }
+ else {
+ $percent = 0;
+ }
+ $dataset['perc'] = $percent;
}
if($numHits > 0) {
View
122 mysql/gene_ontology_mysql.dump
0 additions, 122 deletions not shown
View
18 scripts/perl/metarep_loader.pl
@@ -57,8 +57,8 @@ =head1 OPTIONS
B<--solr_max_mem, -z>
Solr maximum memory allocation [default: 1000M]
-B<--mysql_url, -s>
- mySQL URL incl. port [default: http://localhost:3306]
+B<--mysql_host, -s>
+ MySQL host incl. port [default: localhost:3306]
B<--metarep_db, -b>
METAREP MySQL database name [default: metarep]
@@ -103,7 +103,7 @@ =head1 AUTHOR
'solr_instance_dir|w=s',
'solr_data_dir|h=s',
'solr_max_mem|z=s',
- 'mysql_url|m=s',
+ 'mysql_host|m=s',
'metarep_db|b=s',
'metarep_username|u=s',
'metarep_password|p=s',
@@ -180,8 +180,8 @@ =head1 AUTHOR
if(!defined($args{solr_url})) {
$args{solr_url} = "http://localhost:8983";
}
-if(!defined($args{mysql_url})) {
- $args{mysql_url} = "http://localhost:3306";
+if(!defined($args{mysql_host})) {
+ $args{mysql_host} = "localhost:3306";
}
if(!defined($args{metarep_db})) {
$args{metarep_db} = "metarep";
@@ -203,8 +203,8 @@ =head1 AUTHOR
}
#connect to metarep MySQL database
-print "Trying to connect to MySQL database=".$args{metarep_db}." host=".$args{mysql_url}."\n";
-my $metarepDbConnection = DBI->connect("DBI:mysql:".$args{metarep_db}.";host=".$args{mysql_url}."",$args{metarep_username},$args{metarep_password}, { 'RaiseError' => 0 });
+print "Trying to connect to MySQL database=".$args{metarep_db}." host=".$args{mysql_host}."\n";
+my $metarepDbConnection = DBI->connect("DBI:mysql:".$args{metarep_db}.";host=".$args{mysql_host}."",$args{metarep_username},$args{metarep_password}, { 'RaiseError' => 0 });
if(!$metarepDbConnection) {
pod2usage(
@@ -216,8 +216,8 @@ =head1 AUTHOR
}
#connect to Gene Ontology database
-print "Trying to connect to MySQL database=".$args{go_db}." host=".$args{mysql_url}."\n";
-my $goDbConnection = DBI->connect("DBI:mysql:".$args{go_db}.";host=".$args{mysql_url}."",$args{go_username},$args{go_password}, { 'RaiseError' => 0 });
+print "Trying to connect to MySQL database=".$args{go_db}." host=".$args{mysql_host}."\n";
+my $goDbConnection = DBI->connect("DBI:mysql:".$args{go_db}.";host=".$args{mysql_host}."",$args{go_username},$args{go_password}, { 'RaiseError' => 0 });
if(!$goDbConnection) {
pod2usage(
Please sign in to comment.
Something went wrong with that request. Please try again.