Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated manual
  • Loading branch information
Johannes Goll committed Jul 30, 2010
1 parent 1af2e7b commit 0e6a20d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 145 deletions.
23 changes: 13 additions & 10 deletions app/controllers/components/authsome.php
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/components/solr.php
Expand Up @@ -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");

Expand Down Expand Up @@ -491,4 +491,4 @@ private function addLibraryDescriptions(&$facets) {
$facets->facet_fields->library_id = $libraryHash;
}
}
?>
?>
9 changes: 7 additions & 2 deletions app/controllers/search_controller.php
Expand Up @@ -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) {
Expand Down
122 changes: 0 additions & 122 deletions mysql/gene_ontology_mysql.dump

This file was deleted.

18 changes: 9 additions & 9 deletions scripts/perl/metarep_loader.pl
Expand Up @@ -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]
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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";
Expand All @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 0e6a20d

Please sign in to comment.