Ergänzungen an die Updates für die Assoziationen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1504 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4f83152ac7
commit
2b024d91cd
|
|
@ -17,7 +17,8 @@ import org.apache.commons.cli.CommandLine;
|
||||||
* ccm-cms from 6.6.4 to 6.6.5 has be executed before this update.
|
* ccm-cms from 6.6.4 to 6.6.5 has be executed before this update.
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
* @version $Id$
|
* @version $Id: PublicPersonalProfileOwnerAssocUpgrade.java 1501 2012-02-10
|
||||||
|
* 16:49:14Z jensp $
|
||||||
*/
|
*/
|
||||||
public class PublicPersonalProfileOwnerAssocUpgrade extends Program {
|
public class PublicPersonalProfileOwnerAssocUpgrade extends Program {
|
||||||
|
|
||||||
|
|
@ -138,6 +139,11 @@ public class PublicPersonalProfileOwnerAssocUpgrade extends Program {
|
||||||
"INSERT INTO ct_public_personal_profile_bundles (bundle_id) "
|
"INSERT INTO ct_public_personal_profile_bundles (bundle_id) "
|
||||||
+ "VALUES (%d)",
|
+ "VALUES (%d)",
|
||||||
profilesRs.getInt(1)));
|
profilesRs.getInt(1)));
|
||||||
|
stmt.addBatch(String.format(
|
||||||
|
"UPDATE acs_objects "
|
||||||
|
+ "SET default_domain_class = 'com.arsdigita.cms.contenttypes.PublicPersonalProfileBundle' "
|
||||||
|
+ "WHERE object_id = %d",
|
||||||
|
profilesRs.getInt(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> processedEntries = new ArrayList<String>();
|
final List<String> processedEntries = new ArrayList<String>();
|
||||||
|
|
|
||||||
|
|
@ -1148,7 +1148,7 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
||||||
}*/
|
}*/
|
||||||
if (contentPage.getContentBundle().hasInstance(profile.
|
if (contentPage.getContentBundle().hasInstance(profile.
|
||||||
getLanguage(), false)) {
|
getLanguage(), false)) {
|
||||||
contentPage = (ContentPage) contentPage.getContentBundle().
|
item = (ContentPage) contentPage.getContentBundle().
|
||||||
getInstance(profile.getLanguage());
|
getInstance(profile.getLanguage());
|
||||||
} else {
|
} else {
|
||||||
response.sendError(
|
response.sendError(
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@ import java.sql.Statement;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrade for association between GenericContact and GenericPerson (6.6.4 to
|
* Upgrade for association between GenericContact and GenericPerson (6.6.4 to
|
||||||
* 6.6.5)
|
* 6.6.5)
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
* @version $Id$
|
* @version $Id: GenericContactPersonAssocUpgrade.java 1501 2012-02-10 16:49:14Z
|
||||||
|
* jensp $
|
||||||
*/
|
*/
|
||||||
public class GenericContactPersonAssocUpgrade extends Program {
|
public class GenericContactPersonAssocUpgrade extends Program {
|
||||||
|
|
||||||
|
|
@ -153,6 +153,11 @@ public class GenericContactPersonAssocUpgrade extends Program {
|
||||||
stmt.addBatch(String.format("INSERT INTO cms_person_bundles (bundle_id) "
|
stmt.addBatch(String.format("INSERT INTO cms_person_bundles (bundle_id) "
|
||||||
+ "VALUES (%d)",
|
+ "VALUES (%d)",
|
||||||
personsRs.getInt(1)));
|
personsRs.getInt(1)));
|
||||||
|
stmt.addBatch(String.format(
|
||||||
|
"UPDATE acs_objects "
|
||||||
|
+ "SET default_domain_class = 'com.arsdigita.cms.contenttypes.GenericPersonBundle' "
|
||||||
|
+ "WHERE object_id = %d",
|
||||||
|
personsRs.getInt(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
final ResultSet contactsRs = queryContactsStmt.executeQuery(
|
final ResultSet contactsRs = queryContactsStmt.executeQuery(
|
||||||
|
|
@ -165,6 +170,11 @@ public class GenericContactPersonAssocUpgrade extends Program {
|
||||||
stmt.addBatch(String.format("INSERT INTO cms_contact_bundles (bundle_id) "
|
stmt.addBatch(String.format("INSERT INTO cms_contact_bundles (bundle_id) "
|
||||||
+ "VALUES (%s)",
|
+ "VALUES (%s)",
|
||||||
contactsRs.getInt(1)));
|
contactsRs.getInt(1)));
|
||||||
|
stmt.addBatch(String.format(
|
||||||
|
"UPDATE acs_objects "
|
||||||
|
+ "SET default_domain_class = 'com.arsdigita.cms.contenttypes.GenericContactBundle' "
|
||||||
|
+ "WHERE object_id = %d",
|
||||||
|
contactsRs.getInt(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> processedEntries =
|
final List<String> processedEntries =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue