Korrekturen am AbstractBundleUpgrade und an PersonalProjects

git-svn-id: https://svn.libreccm.org/ccm/trunk@1654 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-05-10 18:06:43 +00:00
parent edd87de549
commit ec708d80d8
3 changed files with 9 additions and 29 deletions

View File

@ -125,27 +125,7 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
final Element root = document.getRootElement();
final Session session = SessionManager.getSession();
/*final DataCollection profiles = getProfiles(session,
path.getProfileOwner(),
path.getPreview(),
GlobalizationHelper.
getNegotiatedLocale().getLanguage());
if (profiles.isEmpty()) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
} else if (profiles.size() > 1) {
throw new IllegalStateException(
"More than one matching members found.");
}
profiles.next();
PublicPersonalProfile profile =
(PublicPersonalProfile) DomainObjectFactory.
newInstance(profiles.getDataObject());
profiles.close();*/
PublicPersonalProfile profile = getProfile(
session,
path.getProfileOwner(),

View File

@ -95,10 +95,9 @@ public abstract class AbstractBundleUpgrade extends Program {
"SELECT parent_id "
+ "FROM cms_items "
+ "JOIN %s "
+ "ON cms_items.item_id = %s.%s",
+ "ON cms_items.item_id = %s.bundle_id",
getBundleTableName(),
getBundleTableName(),
getIdColName()));
getBundleTableName()));
while (personsRs.next()) {
stmt.addBatch(String.format("INSERT INTO %s (bundle_id) "

View File

@ -18,7 +18,6 @@ import com.arsdigita.globalization.GlobalizationHelper;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.OID;
import com.arsdigita.xml.Element;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Calendar;
@ -95,7 +94,7 @@ public class PersonalProjects implements ContentGenerator {
final List<SciProjectBundle> projects =
new LinkedList<SciProjectBundle>();
final DataCollection collection = (DataCollection) person.
getGenericPersonBundle().get("organizationalunits");
getGenericPersonBundle().get("organizationalunits");
DomainObject obj;
while (collection.next()) {
obj = DomainObjectFactory.newInstance(collection.getDataObject());
@ -248,13 +247,15 @@ public class PersonalProjects implements ContentGenerator {
final SciProject project = projectBundle.getProject(GlobalizationHelper.
getNegotiatedLocale().getLanguage());
if (project == null) {
return;
}
Element projectElem = projectGroupElem.newChildElement("project");
projectElem.addAttribute("oid", project.getOID().toString());
Element title = projectElem.newChildElement("title");
title.setText(project.getTitle());
//Element beginElem = projectElem.newChildElement("projectbegin");
title.setText(project.getTitle());
if ((project.getAddendum() != null)
&& !(project.getAddendum().isEmpty())) {