Fix bugs with rerunning post modules and searching.

git-svn-id: file:///home/svn/framework3/trunk@11883 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Weeks 2011-03-05 22:37:17 +00:00
parent cdba0d532c
commit 14bc4ecbe7
3 changed files with 8 additions and 2 deletions

Binary file not shown.

View File

@ -322,6 +322,7 @@ public class ModulePopup extends MsfFrame implements TreeSelectionListener{
} else if (optionName.equals("WORKSPACE")){
optionTextField.setText(MsfguiApp.workspace);
} else if (optionName.equals("SESSION") && moduleType.equals("post")
&& parentFrame.selectedSessions != null
&& parentFrame.selectedSessions.length > 0){
optionTextField.setText(parentFrame.selectedSessions[0].get("id").toString());
}

View File

@ -278,8 +278,13 @@ public class SearchWindow extends MsfFrame {
String name = resultList.getSelectedValue().toString();
for(Object module : modules){
Object[] modInfo = (Object[])module;
if(modInfo[0].equals(type) && modInfo[1].equals(name))
((ActionListener) modInfo[2]).actionPerformed(null);
if(modInfo[0].equals(type) && name.contains(modInfo[1].toString())){
Map info = (Map) rpcConn.execute("module.info", modInfo[0], modInfo[1]);
if(name.equals(modInfo[1].toString()+" - "+Rank.toString(info.get("rank")))){
((ActionListener) modInfo[2]).actionPerformed(null);
break;
}
}
}
}//GEN-LAST:event_launchButtonActionPerformed