Changeset 3725


Ignore:
Timestamp:
Sep 13, 2007, 12:59:38 AM (15 years ago)
Author:
Jari Häkkinen
Message:

Merged patch release 2.4.1 to the trunk. Delta 2.4.1 - 2.4.

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/dist/mysql-migration-queries.sql

    r3675 r3725  
    11261126
    11271127/* selectMinimumReporters */
    1128 SELECT `id`, `reporterId` 
     1128SELECT `id`, `reporterId`, `geneName`, `geneSymbol`
    11291129FROM `Reporter`
    11301130ORDER BY `id`
  • trunk/doc/src/docbook/admindoc/installation_upgrade.xml

    r3697 r3725  
    4848  <para>
    4949    The first time installation is only to be performed once,
    50     optionally followed by a migration. The migration can only be
    51     done to a pristine (empty) BASE 2 server, and migration from
    52     several BASE 1 installations to one BASE 2 server is not
    53     supported.
     50    optionally followed by a migration. The migration can only be done
     51    to a pristine (empty) BASE 2 server with one exception; The
     52    migration can be restarted if it fails during the RawBioAssaysData
     53    transfer, for all other failure points the migration has to be
     54    restarted with an empty database. Migration from several BASE 1
     55    installations to one BASE 2 server is not supported.
    5456  </para>
    5557
     
    10081010            <xref linkend="user_administration"/>.
    10091011          </para>
     1012          <para>
     1013            If you are planning to perform a migration of data from
     1014            BASE 1.2.x please perform the steps in
     1015            <xref linkend="installation_upgrade.migration"/> before
     1016            doing anything else with your new BASE installation.
     1017          </para>
    10101018        </listitem>
    10111019      </varlistentry>
     
    10591067
    10601068    <para>
    1061       There is currently no way to restart a migration. The behaviour
    1062       of migration is controlled
    1063       through <filename>migration.properties</filename> file (see <xref linkend="appendix.migrate.properties"/>), but you
    1064       should know what you do when you change parameters in this file.
     1069      The behaviour of migration is controlled
     1070      through <filename>migration.properties</filename> file (see
     1071      <xref linkend="appendix.migrate.properties"/>), but you should
     1072      know what you do when you change parameters in this file.
     1073    </para>
     1074
     1075    <para>
     1076      Migration can be restarted in one specific case only; If the
     1077      migration fails during the RawBioAssaysData transfer simply
     1078      restart the migration and the script will ask you to verify that
     1079      a restart should be attempted. For all other failure points the
     1080      migration has to be restarted with an empty database.
    10651081    </para>
    10661082
     
    11381154./migrate_from_1.2.sh</programlisting>
    11391155          </para>
     1156          <para>
     1157            If the migration fails during the RawBioAssaysData
     1158            transfer you can restart the migration at the point of
     1159            failure. Simply restart the migration and the script will
     1160            ask you to verify that a restart should be attempted. For
     1161            all other failure points the migration has to be restarted
     1162            with an empty database.
     1163          </para>
    11401164        </listitem>
    11411165
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/CommonItemTransfer.java

    r3679 r3725  
    6262  private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("net.sf.basedb.clients.migrate.CommonItemTransfer");
    6363 
     64  CommonItemTransfer()
     65  {}
    6466 
    6567  CommonItemTransfer(UserTransfer userT, GroupTransfer groupT)
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/GroupTransfer.java

    r3683 r3725  
    6868  private QuotaTransfer quotaT = null;
    6969
     70  GroupTransfer()
     71  {}
     72 
    7073  /**
    7174  @param userT Depends on a finnished UserTransfer.
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/Migrater.java

    r3679 r3725  
    3131import net.sf.basedb.core.SessionControl;
    3232import java.io.BufferedReader;
     33import java.io.FileInputStream;
     34import java.io.FileOutputStream;
    3335import java.io.IOException;
    3436import java.io.InputStream;
    3537import java.io.InputStreamReader;
     38import java.io.ObjectInputStream;
     39import java.io.ObjectOutputStream;
    3640import java.sql.Connection;
    3741import java.sql.DriverManager;
     
    99103    try
    100104    {
    101       ReporterTransfer reporterT = new ReporterTransfer();
     105      ReporterTransfer reporterT = new ReporterTransfer(false);
    102106      startTransfer(reporterT, "Reporter");
    103107      RoleTransfer roleT = new RoleTransfer();
     
    108112      startTransfer(userT, "User");
    109113      GroupTransfer groupT = new GroupTransfer(userT, quotaT);
    110       startTransfer(groupT, "Group");
     114      startTransfer(groupT, "Group");   
    111115      PluginTransfer pluginT = new PluginTransfer(userT, groupT);
    112116      startTransfer(pluginT, "Plugins");
     
    189193          groupT, scanT, arrayTypeT, uploadFT, softwareT, sampleT);
    190194      startTransfer(rawBioAssayT, "RawBioAssay");
     195      createResumePoint(userT, groupT, rawBioAssayT);
    191196      RawBioAssayDataTransfer rawBioAssayDataT = new RawBioAssayDataTransfer(
    192           userT, groupT, rawBioAssayT, arrayTypeT, reporterT);
     197          rawBioAssayT, reporterT);
    193198      startTransfer(rawBioAssayDataT, "RawBioAssayData");
     199      removeResumePoint();
    194200      ExperimentTransfer experimentT = new ExperimentTransfer(userT,
    195201          groupT, rawBioAssayT);
     
    203209      System.exit(1);
    204210    }
    205     catch (Exception e)
     211    catch (Throwable e)
    206212    {
    207213      log.error("The migration FAILED", e);
     
    210216  }
    211217
     218  public void resume()
     219  {
     220    try
     221    {
     222      // Reporters must be mapped using external ID from BASE 1 and BASE 2
     223      ReporterTransfer reporterT = new ReporterTransfer(true);
     224      startTransfer(reporterT, "Reporter");
     225     
     226      // Pre-existing quota is loaded from BASE 2
     227      QuotaTransfer quotaT = new QuotaTransfer();
     228      startTransfer(quotaT, "Quota");
     229
     230      ObjectInputStream ois = new ObjectInputStream(new FileInputStream("migration.tmp"));
     231      // Map of user ID:s are read from file
     232      UserTransfer userT = new UserTransfer(quotaT);
     233      userT.setup(FROM, TO, sessionControl, BASE2, migrateProperties);
     234      log.info("Loading users from 'migration.tmp' file...");
     235      userT.readRestorePointData(ois);
     236      log.info("Found " + userT.getIdMap().size() + " users");
     237      if (log.isDebugEnabled()) log.debug("User ID Map (Base 1 --> Base2): " + userT.getIdMap());
     238
     239      // Map of group ID:s are read from file
     240      GroupTransfer groupT = new GroupTransfer();
     241      log.info("Loading groups from 'migration.tmp' file...");
     242      groupT.readRestorePointData(ois);
     243      log.info("Found " + groupT.getIdMap().size() + " groups");
     244      if (log.isDebugEnabled()) log.debug("Group ID Map (Base 1 --> Base2): " + groupT.getIdMap());
     245     
     246      // Map of raw bioassay ID:s are read from file
     247      RawBioAssayTransfer rawBioAssayT = new RawBioAssayTransfer();
     248      log.info("Loading raw bioassays from 'migration.tmp' file...");
     249      rawBioAssayT.readRestorePointData(ois);
     250      log.info("Found " + rawBioAssayT.getIdMap().size() + " raw bioassays");
     251      if (log.isDebugEnabled()) log.debug("Raw bioassay ID Map (Base 1 --> Base2): " + rawBioAssayT.getIdMap());
     252      ois.close();
     253     
     254      // RawBioassayTransfer runs normally, but checks if a raw bioassay already has raw data
     255      RawBioAssayDataTransfer rawBioAssayDataT = new RawBioAssayDataTransfer(rawBioAssayT,
     256          reporterT);
     257      startTransfer(rawBioAssayDataT, "RawBioAssayData");
     258      removeResumePoint();
     259     
     260      // Experiment transfter runs normally
     261      ExperimentTransfer experimentT = new ExperimentTransfer(userT,
     262          groupT, rawBioAssayT);
     263      startTransfer(experimentT, "Experiment");
     264     
     265      // Runs normally
     266      userT.finalizeQuota();
     267
     268      print("END MIGRATION");
     269      log.info("Migration ended");
     270      Application.stop();
     271      System.exit(1);
     272     
     273    }
     274    catch (Throwable e)
     275    {
     276      log.error("The migration FAILED", e);
     277      stop();
     278    }
     279  }
     280 
     281  private void createResumePoint(Transfer...transfers)
     282    throws IOException
     283  {
     284    log.info("Creating resume point");
     285    ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("migration.tmp"));
     286    for (Transfer t: transfers)
     287    {
     288      log.info("Store to resume point: " + t);
     289      t.writeRestorePointData(oos);
     290    }
     291    oos.close();
     292  }
     293 
     294  private void removeResumePoint()
     295  {
     296    log.info("Removing resume point");
     297    java.io.File resumePoint = new java.io.File("migration.tmp");
     298    resumePoint.delete();
     299  }
     300 
    212301  private void startTransfer(Transfer transfer, String property)
    213302  {
     
    474563    System.err.println("-----------------------------------------------------------------------");
    475564
     565    java.io.File restorePoint = new java.io.File("migration.tmp");
     566    boolean resumeMigration = false;
     567
    476568    if (args == null || args.length == 0 || !"disclaimer_understood".equals(args[0]))
    477569    {
     
    479571      System.exit(0);
    480572    }
     573    else if (restorePoint.exists())
     574    {
     575      System.err.println("FOUND DATA FROM A PREVIOUSLY INTERRUPTED MIGRATION.");
     576      System.err.println("\n   Press ENTER to resume the migration\nor\n   Ctrl-C to abort\n");
     577      System.err.println("To start a new migration delete the './migration.tmp' file");
     578      System.err.println("before starting the migration program.");
     579      waitForEnter();
     580      resumeMigration = true;
     581    }
    481582    else
    482583    {
     
    485586    }
    486587   
    487     System.err.println("Starting migration...");
     588    System.err.println(resumeMigration ? "Resuming migration" : "Starting migration...");
    488589    Application.start(false);
    489590    Migrater migrater = new Migrater();
     
    493594    migrater.prepareStatementsFromFile();
    494595    log.info("Migration initialisation DONE");
    495     migrater.run();
     596    if (resumeMigration)
     597    {
     598      migrater.resume();
     599    }
     600    else
     601    {
     602      migrater.run();
     603    }
    496604  }
    497605 
     
    506614    {}
    507615  }
    508  
    509  
     616   
    510617}
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/QuotaTransfer.java

    r3683 r3725  
    9595      quota.setName(formatBytes(totalQuota));
    9696      dc.saveItem(quota);
     97      quotas.put(totalQuota, quota);
    9798    }
    9899    else
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayDataTransfer.java

    r3683 r3725  
    4747
    4848public class RawBioAssayDataTransfer
    49   extends CommonItemTransfer
     49  extends Transfer
    5050{
    5151  /**
     
    7777  @param groupT A finished {@link GroupTransfer}
    7878   */
    79   RawBioAssayDataTransfer(UserTransfer userT, GroupTransfer groupT,
    80       RawBioAssayTransfer rbaT, ArrayTypeTransfer arrayTypeT,
    81       ReporterTransfer reporterT)
    82   {
    83     super(userT, groupT);
     79  RawBioAssayDataTransfer(RawBioAssayTransfer rbaT, ReporterTransfer reporterT)
     80  {
     81    super();
    8482    log.debug("Checking that necessary transfers have been done before proceeding with RawBioAssayData");
    85     if (rbaT != null && rbaT.isDone() && arrayTypeT != null
    86         && arrayTypeT.isDone() && reporterT != null
    87         && reporterT.isDone())
     83    if (rbaT != null && rbaT.isDone() &&
     84      reporterT != null && reporterT.isDone())
    8885    {
    8986      this.rbaT = rbaT;
     
    9390    {
    9491      if (!rbaT.isDone()) log.debug("Dependency: RawBioAssays haven't been transfered");
    95       if (!arrayTypeT.isDone()) log.debug("Dependency: ArrayTypes haven't been transfered");
    9692      if (!reporterT.isDone()) log.debug("Dependency: Reporters haven't been transfered");
    9793      dependencyFailure();
     
    133129        log.debug("RawBioAssay '" + rawBioAssayId + "' " + (hasArrayDesign ? "has " : "no ") + "Array Design");
    134130      }
    135       transferRawBioAssayData(rawBioAssay, rawBioAssayId, hasArrayDesign);
     131      if (!rawBioAssay.hasData())
     132      {
     133        transferRawBioAssayData(rawBioAssay, rawBioAssayId, hasArrayDesign);
     134      }
     135      else
     136      {
     137        log.info("Skipping since it already has data");
     138        progress.increase(rawBioAssay.getSpots());
     139      }
    136140      progress.decrease(); // We do not want to count the RawBioAssays
    137141      if (log.isDebugEnabled())
     
    263267      if (log.isInfoEnabled())
    264268      {
    265         log.info("Transfered " + rowCount + " rows of RawData for raw bioassay" + rawBioAssay.getName());
     269        log.info("Transfered " + rowCount + " rows of RawData for raw bioassay: " + rawBioAssay.getName());
    266270      }
    267271    }
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayTransfer.java

    r3683 r3725  
    6363  private SampleTransfer sampleT = null;
    6464
     65  RawBioAssayTransfer()
     66  {}
     67 
    6568  /**
    6669  Constructs a new RawBioAssayTransfer.
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/ReporterTransfer.java

    r3683 r3725  
    9090 
    9191  /**
     92    Flag that indicates if we should run in RESUME mode
     93    (ie. NOT create new reporter items, only map ID:s)
     94  */
     95  private boolean RESUME = false;
     96 
     97  /**
    9298  Set string and text properties, order must match the select statement
    9399  except for the id and reporterId in the beginning Extended properties are
     
    102108  Reporters are independant from other transfers.
    103109   */
    104   ReporterTransfer()
    105   {}
     110  ReporterTransfer(boolean resume)
     111  {
     112    RESUME = resume;
     113  }
    106114
    107115  public void start()
    108116  {
    109     if (!QUICK_TRANSFER) log.info("Transferring reporters...");
    110     else log.info("Transferring reporters with minimum properties...");
     117    if (RESUME) QUICK_TRANSFER = true;
     118    if (RESUME)
     119    {
     120      log.info("Loading reporters...");
     121    }
     122    else if (!QUICK_TRANSFER)
     123    {
     124      log.info("Transferring reporters...");
     125    }
     126    else
     127    {
     128      log.info("Transferring reporters with minimum properties...");
     129    }
    111130   
    112131    int count = getInt("countReporters");
     
    199218        rowCount++;
    200219        ReporterData item = createDataItem(rs);
    201         if (item != null) batcher.insert(item);
     220        if (item != null && !RESUME) batcher.insert(item);
    202221        progress.increase();
    203222      }
     
    319338      }
    320339      rd = Reporter.getNew(externalId);
     340      String name = rs.getString(3);
     341      if (name == null || "".equals(name)) name = externalId;
     342      rd.setName(name);
     343      rd.setSymbol(rs.getString(4));
    321344      if (!QUICK_TRANSFER)
    322345      {
    323         String name = rs.getString(3);
    324         if (name == null || "".equals(name)) name = externalId;
    325         rd.setName(name);
    326         rd.setSymbol(rs.getString(4));
    327346        int columnIndex = 5;
    328347        for (String property : stringProperties)
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/SharedItemTransfer.java

    r3679 r3725  
    8383  private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("net.sf.basedb.clients.migrate.SharedItemTransfer");
    8484
     85  SharedItemTransfer()
     86  {}
     87 
    8588  SharedItemTransfer(UserTransfer userT, GroupTransfer groupT)
    8689  {
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/Transfer.java

    r3683 r3725  
    3232import net.sf.basedb.core.ItemAlreadyExistsException;
    3333import net.sf.basedb.core.SessionControl;
     34
     35import java.io.IOException;
     36import java.io.ObjectInputStream;
     37import java.io.ObjectOutputStream;
    3438import java.sql.Connection;
    3539import java.sql.PreparedStatement;
     
    613617    return Integer.parseInt(value);
    614618  }
     619 
     620  /**
     621    Store ID map and some boolean flags
     622  */
     623  protected void writeRestorePointData(ObjectOutputStream out)
     624    throws IOException
     625  {
     626    out.writeBoolean(dependencyFailed);
     627    out.writeBoolean(done);
     628    out.writeBoolean(idMap != null);
     629    if (idMap != null) out.writeObject(idMap);
     630  }
     631 
     632  /**
     633    Store ID map and some boolean flags
     634  */
     635  @SuppressWarnings("unchecked")
     636  protected void readRestorePointData(ObjectInputStream in)
     637    throws IOException, ClassNotFoundException
     638  {
     639    dependencyFailed = in.readBoolean();
     640    done = in.readBoolean();
     641    if (in.readBoolean())
     642    {
     643      idMap = (Map<Integer, Integer>)in.readObject();
     644    }
     645  }
     646
    615647}
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/UserTransfer.java

    r3683 r3725  
    3636import net.sf.basedb.core.SystemItems;
    3737import net.sf.basedb.core.User;
     38
     39import java.io.IOException;
     40import java.io.ObjectInputStream;
     41import java.io.ObjectOutputStream;
    3842import java.sql.PreparedStatement;
    3943import java.sql.ResultSet;
     
    9094   */
    9195  private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("net.sf.basedb.clients.migrate.UserTransfer");
     96 
     97  UserTransfer(QuotaTransfer quotaT)
     98  {
     99    this.quotaT = quotaT;
     100  }
    92101 
    93102  /**
     
    323332  }
    324333 
     334  /**
     335    Store quota map
     336  */
     337  protected void writeRestorePointData(ObjectOutputStream out)
     338    throws IOException
     339  {
     340    super.writeRestorePointData(out);
     341    out.writeObject(base1FileQuota);
     342  }
     343 
     344  /**
     345    Store ID map and some boolean flags
     346  */
     347  @SuppressWarnings("unchecked")
     348  protected void readRestorePointData(ObjectInputStream in)
     349    throws IOException, ClassNotFoundException
     350  {
     351    super.readRestorePointData(in);
     352    base1FileQuota = (Map<Integer, Long>)in.readObject();
     353  }
     354 
    325355  public User getUserById(DbControl dc, int base1Id)
    326356  {
  • trunk/src/clients/web/net/sf/basedb/clients/web/util/NameablePluginAdaptor.java

    r3679 r3725  
    2727
    2828import net.sf.basedb.core.InvalidDataException;
     29import net.sf.basedb.core.InvalidUseOfNullException;
    2930import net.sf.basedb.core.Item;
    3031import net.sf.basedb.core.Nameable;
     
    5152  public NameablePluginAdaptor(PluginDefinition plugin)
    5253  {
     54    if (plugin == null) throw new InvalidUseOfNullException("PluginDefinition cannot be null");
    5355    this.plugin = plugin;
    5456  }
  • trunk/src/core/net/sf/basedb/core/Type.java

    r3679 r3725  
    467467        if (value.indexOf('e') >= 0)
    468468        {
    469           // Convert 'e' to 'E' (in scientific notation only 'E' is allowed) and try again
    470           return parseString(value.replace('e', 'E'), numberFormat, nullIfException);
     469          //Convert 'e' to 'E' (in scientific notation only 'E' is allowed) and try again         
     470          return parseString(value.replace('e', 'E').replace("E+", "E"), numberFormat, nullIfException);
    471471        }
    472472        else
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r3679 r3725  
    290290        BioAssaySet bas = getCurrentBioAssaySet(dc);
    291291        int channels = bas.getRawDataType().getChannels();
    292         Integer maxChannels = (Integer) configuration.getValue(maxChannelsParameter.getName());
    293         Integer minChannels = (Integer) configuration.getValue(minChannelsParameter.getName());;
     292        int maxChannels = Values.getInt(String.valueOf(configuration.getValue(maxChannelsParameter.getName())), 0);
     293        int minChannels = Values.getInt(String.valueOf(configuration.getValue(minChannelsParameter.getName())), 0);
    294294        if (channels < minChannels || ( maxChannels != 0 && channels > maxChannels))
    295295        {
    296           message = configuration.getPluginConfiguration().getName() + " can't work on " + channels + "-channel data; min=" + minChannels + "; max=" + maxChannels;
    297           return message;
     296          return configuration.getPluginConfiguration().getName() + " can't work on " + channels + "-channel data; min=" + minChannels + "; max=" + maxChannels;
    298297        }
    299298        List<String> extraValues = new ArrayList<String>();
     
    302301          extraValues.add(ev.getExtraValueType().getExternalId());
    303302        }
    304         Pattern p = Pattern.compile("_xc_(.+)\\t?");
    305         Matcher m = p.matcher((CharSequence) configuration.getValue(usedFieldsParameter.getName()));
    306         while (message == null && m.find())
    307         {
    308           if (!extraValues.contains(m.group(1)))
    309           {
    310             throw new InvalidDataException("Requires extra value '"+ m.group(1) +"' attached to BioAssaySet");
    311           }
    312         }
     303        String[] usedFields = String.valueOf(configuration.getValue(usedFieldsParameter.getName())).split("\\\\t");
     304        for (String field : usedFields)
     305        {
     306          if (field.startsWith("_xc_") && !extraValues.contains(field.substring(4)))
     307          {
     308            return "Requires extra value '"+ field.substring(4) +"' attached to BioAssaySet";
     309          }
     310        }
     311      }
     312      catch (Exception e)
     313      {
     314        message = ""+e.getMessage();
     315        e.printStackTrace();
    313316      }
    314317      finally
  • trunk/src/test/set_classpath.bat

    r3675 r3725  
    3131REM Testdata
    3232SET CP=%CP%;data
     33SET CP=%CP%;../../data
    3334SET CP=%CP%;../../testdata
    3435
  • trunk/src/test/set_classpath.sh

    r3675 r3725  
    3131# Testdata
    3232CP=$CP:data
     33CP=$CP:../../data
    3334CP=$CP:../../testdata
    3435
  • trunk/www/common/anytoany/edit_anytoany.jsp

    r3675 r3725  
    3737  import="net.sf.basedb.core.Nameable"
    3838  import="net.sf.basedb.core.PermissionDeniedException"
     39  import="net.sf.basedb.core.ItemNotFoundException"
    3940  import="net.sf.basedb.clients.web.Base"
    4041  import="net.sf.basedb.clients.web.util.HTML"
     
    4445<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
    4546<%!
    46 private String getName(BasicItem item, boolean readItem)
     47private String getName(BasicItem item, boolean readItem, boolean missingItem, Item itemType, int id)
    4748{
    4849  String name = "";
     
    6061  {
    6162    name = "<i>- denied -</i>";
     63  }
     64  else if (missingItem)
     65  {
     66    name = "<i>- missing -</i> (" + itemType.toString() + "; id=" + id + ")";
    6267  }
    6368  else if (item == null)
     
    105110    BasicItem to = null;
    106111    boolean readTo = true;
     112    boolean missingTo = false;
    107113   
    108114    BasicItem from = null;
    109115    boolean readFrom = true;
     116    boolean missingFrom = false;
    110117   
    111118    try
     
    117124      readTo = false;
    118125    }
     126    catch (ItemNotFoundException ex)
     127    {
     128      missingTo = true;
     129    }
    119130   
    120131    try
     
    126137      readFrom = false;
    127138    }
    128    
    129     toName = getName(to, readTo);
    130     fromName = getName(from, readFrom);
     139    catch (ItemNotFoundException ex)
     140    {
     141      missingFrom = true;
     142    }
     143 
     144    toName = getName(to, readTo, missingTo, anyToAny.getToType(), anyToAny.getToId());
     145    fromName = getName(from, readFrom, missingFrom, anyToAny.getFromType(), anyToAny.getFromId());
    131146  }
    132147  if (anyToAny != null) anyToAny.checkPermission(Permission.WRITE);
  • trunk/www/common/anytoany/list_anytoany.jsp

    r3675 r3725  
    3737  import="net.sf.basedb.core.ItemResultList"
    3838  import="net.sf.basedb.core.PermissionDeniedException"
     39  import="net.sf.basedb.core.ItemNotFoundException"
    3940  import="net.sf.basedb.core.query.Orders"
    4041  import="net.sf.basedb.core.query.Hql"
     
    105106            BasicItem to = null;
    106107            boolean readTo = true;
     108            boolean missingTo = false;
    107109            try
    108110            {
     
    112114            {
    113115              readTo = false;
     116            }
     117            catch (ItemNotFoundException ex)
     118            {
     119              missingTo = true;
    114120            }
    115121           
     
    128134            {
    129135              toLink = "<i>- denied -</i>";
     136            }
     137            else if (missingTo)
     138            {
     139              toLink = "<i>- missing -</i> (" + ata.getToType().toString() + "; id=" + ata.getToId() + ")";
    130140            }
    131141            else if (to == null)
  • trunk/www/exception/exception.jsp

    r3679 r3725  
    121121      Main.hide('goback');
    122122    }
    123     if (window.opener != null)
     123    if (window.top != null && window.top.opener != null)
    124124    {
    125125      // popup window --> Hide menubar
  • trunk/www/filemanager/upload/show_exception.jsp

    r3675 r3725  
    5151sc.setSessionSetting("FileUploadProgress", null);
    5252sc.setSessionSetting("UnpackProgress", null);
    53 throw progress.getException();
     53if (progress.getException() != null) throw progress.getException();
    5454%>
Note: See TracChangeset for help on using the changeset viewer.