Korrekturen am AbstractBundleUpgrade und an PersonalProjects
git-svn-id: https://svn.libreccm.org/ccm/trunk@1654 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
edd87de549
commit
ec708d80d8
|
|
@ -126,26 +126,6 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
||||||
|
|
||||||
final Session session = SessionManager.getSession();
|
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(
|
PublicPersonalProfile profile = getProfile(
|
||||||
session,
|
session,
|
||||||
path.getProfileOwner(),
|
path.getProfileOwner(),
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,9 @@ public abstract class AbstractBundleUpgrade extends Program {
|
||||||
"SELECT parent_id "
|
"SELECT parent_id "
|
||||||
+ "FROM cms_items "
|
+ "FROM cms_items "
|
||||||
+ "JOIN %s "
|
+ "JOIN %s "
|
||||||
+ "ON cms_items.item_id = %s.%s",
|
+ "ON cms_items.item_id = %s.bundle_id",
|
||||||
getBundleTableName(),
|
getBundleTableName(),
|
||||||
getBundleTableName(),
|
getBundleTableName()));
|
||||||
getIdColName()));
|
|
||||||
|
|
||||||
while (personsRs.next()) {
|
while (personsRs.next()) {
|
||||||
stmt.addBatch(String.format("INSERT INTO %s (bundle_id) "
|
stmt.addBatch(String.format("INSERT INTO %s (bundle_id) "
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import com.arsdigita.globalization.GlobalizationHelper;
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
@ -248,14 +247,16 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
final SciProject project = projectBundle.getProject(GlobalizationHelper.
|
final SciProject project = projectBundle.getProject(GlobalizationHelper.
|
||||||
getNegotiatedLocale().getLanguage());
|
getNegotiatedLocale().getLanguage());
|
||||||
|
|
||||||
|
if (project == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Element projectElem = projectGroupElem.newChildElement("project");
|
Element projectElem = projectGroupElem.newChildElement("project");
|
||||||
projectElem.addAttribute("oid", project.getOID().toString());
|
projectElem.addAttribute("oid", project.getOID().toString());
|
||||||
|
|
||||||
Element title = projectElem.newChildElement("title");
|
Element title = projectElem.newChildElement("title");
|
||||||
title.setText(project.getTitle());
|
title.setText(project.getTitle());
|
||||||
|
|
||||||
//Element beginElem = projectElem.newChildElement("projectbegin");
|
|
||||||
|
|
||||||
if ((project.getAddendum() != null)
|
if ((project.getAddendum() != null)
|
||||||
&& !(project.getAddendum().isEmpty())) {
|
&& !(project.getAddendum().isEmpty())) {
|
||||||
Element addendum = projectElem.newChildElement("addendum");
|
Element addendum = projectElem.newChildElement("addendum");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue