Commit 170c4e1cfd29809918c88f125b493533f882ad6c

Authored by Benjamin Renard
2 parents 5d224ec6 ddc58615

Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM

index.html
... ... @@ -63,12 +63,12 @@
63 63 })(window.location.search.substr(1).split('&'));
64 64  
65 65 if (qs["error"] && qs["error"] == "1") {
66   - alert('Cannot connect to AMDA');
  66 + alert('Cannot connect to AMDA. \n Please check your username/password');
  67 + setLoginLoader(false);
67 68 return false;
68 69 }
69 70  
70 71 setLoginLoader(false);
71   -
72 72 };
73 73 </script>
74 74 <a href="mailto:amda@irap.omp.eu?subject=AMDA registration" id="Btn_Register"></a>
... ...
js/app/views/ExplorerUI.js
... ... @@ -597,7 +597,7 @@ Ext.define(&#39;amdaUI.ExplorerUI&#39;, {
597 597 case 'localParam' :
598 598 case 'remoteParam':
599 599 case 'remoteSimuParam':
600   - record.createAlias(record);
  600 + record.createPlot(record);
601 601 break;
602 602 case 'bkgWorks' :
603 603 if (!record.get('object')) {
... ...
js/app/views/PlotTabResultUI.js
... ... @@ -376,6 +376,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
376 376  
377 377 updatePlotImage: function(configResult, newPlot) {
378 378 this.crtContext = configResult.context;
  379 +
379 380  
380 381 this.crtTTFileIndex = configResult.ttFileIndex;
381 382  
... ... @@ -509,15 +510,8 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
509 510 var ttFileIndex = this.crtTTFileIndex;
510 511 var ttintervalIndex = this.crtContext.page.ttIndex;
511 512  
512   - if (ttintervalIndex <= 0){
513   - if (ttFileIndex <= 0){
514   - myDesktopApp.errorMsg('You are on the first interval of your request');
515   - return;
516   - }
517   - else {
518   - --ttFileIndex;
519   - ttintervalIndex = 0;
520   - }
  513 + if (ttintervalIndex <= 0 && ttFileIndex>0){
  514 + --ttFileIndex;
521 515 }
522 516 else
523 517 --ttintervalIndex;
... ... @@ -533,6 +527,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
533 527 var ttintervalIndex = this.crtContext.page.ttIndex;
534 528  
535 529 if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1){
  530 +
536 531 ++ttFileIndex;
537 532 ttintervalIndex = 0;
538 533 }
... ...
php/classes/UserMgr.php
... ... @@ -714,34 +714,34 @@ class UserMgr
714 714 return $wsSize;
715 715 }
716 716  
717   - // http://www.ilovejackdaniels.com/php/email-address-validation/
  717 + // http://www.ilovejackdaniels.com/php/email-address-validation/
718 718 public function check_email_address($email)
719 719 {
720 720 // First, we check that there's one @ symbol, and that the lengths are right
721   - if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email))
  721 + if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $email))
722 722 {
723 723 // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
724 724 return false;
725 725 }
726   -
  726 +
727 727 // Split it into sections to make life easier
728 728 $email_array = explode("@", $email);
729 729 $local_array = explode(".", $email_array[0]);
730 730 for ($i = 0; $i < sizeof($local_array); $i++)
731 731 {
732   - if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
  732 + if (!preg_match("@^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$@", $local_array[$i])) {
733 733 return false;
734 734 }
735 735 }
736 736  
737   - if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
  737 + if (!preg_match("/^\[?[0-9\.]+\]?$/", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
738 738 $domain_array = explode(".", $email_array[1]);
739 739 if (sizeof($domain_array) < 2) {
740 740 return false; // Not enough parts to domain
741 741 }
742 742 for ($i = 0; $i < sizeof($domain_array); $i++)
743 743 {
744   - if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
  744 + if (!preg_match("/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/", $domain_array[$i])) {
745 745 return false;
746 746 }
747 747 }
... ...