Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into development

  • Loading branch information...
commit 29c190f7da44e0bcdc9fc562f2596aa0c2cfaefc 2 parents 081c2f8 + be4bd62
Lincoln Stein lstein authored
2  MANIFEST
View
@@ -662,3 +662,5 @@ t/testdata/phylo_align/species.tre
t/testdata/phylo_align/volvox_alignment.conf
t/testdata/phylo_align/volvox_phyloalign.gff
t/testdata/TemplateCopy.pm
+META.yml
+META.json
1  README
View
@@ -182,6 +182,7 @@ Peter Ruzanov <peter.ruzanov@oicr.on.ca>
Chris Vandevelde <Christopher.Vandevelde@oicr.on.ca>
Tony deCatanzaro <tonydecat@gmail.com>
Sukhwinder Lall <sukhwinder.lall@oicr.on.ca>
+Ahmed Einalem <aelnaiem@gmail.com>
Special thanks go to the authors of the translations, who include:
17 htdocs/js/login.js
View
@@ -423,7 +423,7 @@ function validate_info() {
if(user==0) {
$('loginWarning').innerHTML = Controller.translate('ALL_FIELDS_REQUIRED') + '<br>' + html;
} else {
- add_openid_user(CurrentUser,html);
+ add_openid_user(CurrentUser,openid);
return;
}
break;
@@ -1228,10 +1228,17 @@ function confirm_openid(session,page,logged_in,email,gecos) {
login_blackout(false,'');
var results = transport.responseJSON;
if(results[0].error != null && results[0].error != 'Success') {
- if (results[0].error.indexOf('not unique') >= 0)
+ if (results[0].error.indexOf('not unique') >= 0) {
alert(Controller.translate('OPENID_ADD_FAILED','OpenID already in use.'));
- else
- alert(Controller.translate('OPENID_ADD_FAILED',results[0].error));
+ }
+ else if (results[0].error.indexOf('has not been used before')) {
+ // get the openid
+ confirm_openid_error(session,page,logged_in,results[0].error,results[0].user,results[0].only);
+ return;
+ }
+ else {
+ alert(Controller.translate('OPENID_ADD_FAILED',results[0].error));
+ }
reload_login_script();
}
else if (page == 'edit' || page == 'openid-add') {
@@ -1252,7 +1259,7 @@ function confirm_openid_error(session,page,logged_in,error,openid,only,email,gec
var event = new fakeEvent();
(only == 0 || logged_in) ? OpenIDMenu = false : OpenIDMenu = true;
load_login_balloon(event,session,false,false);
- login_blackout(false,'');
+ login_blackout(true,'');
if(only == 1) {UsingOpenID=true;}
if(page == 'openid-add') {login_page_change('edit');}
2  lib/Bio/Graphics/Browser2/Render/SnapshotManager.pm
View
@@ -113,7 +113,7 @@ sub render_snapshots_listing {
my $mail_snapshot = $self->render->globals->smtp_enabled ? (
span({-id=>"mail_$snapshot_name"}, img({ -src => $mailSnapshotPath,
-id => "mail",
- -onClick => "\$('mail_snapshot_$escapedKey').show();"
+ -onClick => "\$('mail_snapshot_$escapedKey').style.display='block';"
. "Controller.pushForward('$escapedKey')",
-title => 'Email',
-class => 'snapshot_icon',
2  lib/Bio/Graphics/Browser2/RenderPanels.pm
View
@@ -522,7 +522,7 @@ sub wrap_rendered_track {
my $favorite = $settings->{favorites}{$label};
my $starIcon = $favorite ? $favicon_2 : $favicon;
my $starclass = $favorite ? "toolbarStar favorite" : "toolbarStar";
- (my $l = $label) =~ s/:(overview|detail|regionview)$//;
+ (my $l = $label) =~ s/:detail$//;
my $fav_click = "toggle_titlebar_stars('$l')";
my @images = (
2  lib/Bio/Graphics/Browser2/SendMail.pm
View
@@ -55,7 +55,7 @@ sub do_sendmail {
if ($username) {
$smtp_obj->auth($username, $password)
- or die "Could not authenticate with outgoing mail server $server"
+ or die "Could not authenticate with outgoing mail server $server: ",$smtp_obj->message
}
$smtp_obj->mail("$smtp_from\n") or die $smtp_obj->message;
82 lib/Bio/Graphics/Browser2/UserDB.pm
View
@@ -176,76 +176,6 @@ sub nowfun {
return $globals->user_account_db =~ /sqlite/i ? "datetime('now','localtime')" : 'now()';
}
-# Do Sendmail - Handles outgoing email using either Net::SMTP or Net::SMTP::SSL as required.
-# The format of the smtp argument is:
-#
-# smtp.server.com:port:encryption:username:password
-#
-# This has up to five fields. Only the first field is required.
-# The port is assumed to be 25 unless ssl encryption is specified, in which case it defaults to 465.
-# The protocol is either "plain" or "ssl", "plain" assumed.
-# The username and password may be required by the SMTP server to send outgoing mail.
-#sub do_sendmail {
-# my $self = shift;
-# my $args = shift;
-# my $globals = $self->{globals};
-
-
-# eval {
-# $globals->smtp or die "No SMTP server found in globals";
-#
-# my ($server, $port, $protocol, $username, $password) = split ':', $globals->smtp;
-# $protocol ||= 'plain';
-# $port ||= $protocol eq 'plain' ? 25 : 465;
-# $protocol =~ /plain|ssl/ or die 'encryption must be either "plain" or "ssl"';
-#
-# # At least some SMTP servers will refuse to accept mail
-# # unless From matches the authentication username.
-# my $smtp_from = $username ? $username : $args->{from};
-#
-# my $smtp_sender;
-# if ($protocol eq 'plain') {
-# eval "require Net::SMTP" unless Net::SMTP->can('new');
-# $smtp_sender = 'Net::SMTP';
-# } else {
-# eval "require Net::SMTP::SSL" unless Net::SMTP::SSL->can('new');
-# $smtp_sender = 'Net::SMTP::SSL';
-# }
-#
-# my $smtp_obj = $smtp_sender->new(
-# $server,
-# Port => $port,
-# Debug => 1,
-# )
-# or die "Could not connect to outgoing mail server $server";
-#
-# if ($username) {
-# $smtp_obj->auth($username, $password)
-# or die "Could not authenticate with outgoing mail server $server"
-# }
-
-# $smtp_obj->mail("$smtp_from\n") or die $smtp_obj->message;
-# $smtp_obj->to("$args->{to}\n") or die $smtp_obj->message;
-# $smtp_obj->data() or die $smtp_obj->message;
-# $smtp_obj->datasend("From: \"$args->{from_title}\" <$args->{from}>\n")
-# or die $smtp_obj->message;
-# $smtp_obj->datasend("To: $args->{to}\n") or die $smtp_obj->message;
-# $smtp_obj->datasend("Reply-to: $args->{from}\n") or die $smtp_obj->message;
-# $smtp_obj->datasend("Subject: $args->{subject}\n") or die $smtp_obj->message;
-# $smtp_obj->datasend("Content-type: text/html; charset=ISO-8859-1\n")
-# or die $smtp_obj->message
-# if $args->{HTML};
-# $smtp_obj->datasend("\n") or die $smtp_obj->message;
-# $smtp_obj->datasend($args->{msg}) or die $smtp_obj->message;
-# $smtp_obj->datasend("\n") or die $smtp_obj->message;
-# $smtp_obj->dataend() or die $smtp_obj->message;
-# $smtp_obj->quit();
-# };
-# warn $@ if $@;
-# return (0, $@) if $@;
-# return (1,'');
-#}
-
#################### N O N - O P E N I D F U N C T I O N S #####################
# Get User ID (User) - Returns a confirmed user's ID
sub get_user_id {
@@ -806,7 +736,7 @@ END
subject => $globals->application_name . " Account Activation",
msg => $message,
HTML => 1,
- });
+ },$globals);
unless ($status) {
warn $err;
return $self->string_result('Mail Error');
@@ -987,7 +917,7 @@ sub do_email_info {
to => $email,
subject => $globals->application_name . " Account Information",
msg => $message
- });
+ },$globals);
return $self->string_result($err) unless $status;
my $secret = $self->generate_salted_digest($pass);
@@ -1207,11 +1137,11 @@ END
or return {error=>'Error: '.$userdb->errstr.'.'};
if($rows != 1) {
- if($rows != 0) {
- $error = "Error: $rows rows returned, please consult your service host.";
- } else {
+ if($rows == 0) {
$error = "The OpenID provided has not been used before. ";
$error .= "Please create an account first before trying to edit your information.";
+ } else {
+ $error = "Error: $rows rows returned, please consult your service host.";
}
return {error=>$error,openid=>$openid,userinfo=>$userinfo};
}
@@ -1306,6 +1236,8 @@ sub do_add_openid_to_account {
sub do_add_openid_user {
my $self = shift;
my ($user, $email, $gecos, $openid, $sessionid, $remember) = @_;
+
+ warn "do_add_openid_user(",join(',',@_),')';
my $userdb = $self->{dbi};
4 lib/Bio/Graphics/Browser2/UserTracks/Database.pm
View
@@ -415,12 +415,12 @@ sub email_sharee {
$gbrowse_readd_link);
$contents = CGI::unescapeHTML($contents);
$subject = CGI::unescapeHTML($subject);
- $self->Bio::Graphics::Browser2::SendMail::do_sendmail($globals, {
+ $self->Bio::Graphics::Browser2::SendMail::do_sendmail({
from => $globals->email_address,
from_title => $globals->application_name,
to => $to_email,
subject => $subject,
- msg => $contents});
+ msg => $contents},$globals);
}
# Field (Field, File ID[, Value]) - Returns (or, if defined, sets to the new value) the specified field of a file.
Please sign in to comment.
Something went wrong with that request. Please try again.