Compare commits
No commits in common. "62099efa85d8ecc96b7bab9f9ca60341205dfa9f" and "107f10f704f4358387376a8abeb1e60f969cec6c" have entirely different histories.
62099efa85
...
107f10f704
10
confdump.py
10
confdump.py
@ -68,11 +68,6 @@ LOAD_TRIVIAL = ["FinancialType",
|
|||||||
"Contact",
|
"Contact",
|
||||||
"SavedSearch"]
|
"SavedSearch"]
|
||||||
|
|
||||||
WEIRD_LIST = [
|
|
||||||
("civicrm_contact", "contact_sub_type"),
|
|
||||||
("civicrm_custom_group", "extends_entity_column_value")
|
|
||||||
]
|
|
||||||
|
|
||||||
# This is a payment processor we can assign contribution pages to in order for them to work.
|
# This is a payment processor we can assign contribution pages to in order for them to work.
|
||||||
# FIXME this seems to produce a non-working setup.
|
# FIXME this seems to produce a non-working setup.
|
||||||
STANDIN_PAYMENT_PROCESSOR_ID = "7"
|
STANDIN_PAYMENT_PROCESSOR_ID = "7"
|
||||||
@ -116,9 +111,6 @@ def object_to_table(instr: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def array_to_weird_array(val: List) -> str:
|
def array_to_weird_array(val: List) -> str:
|
||||||
if (val is None):
|
|
||||||
return "NULL"
|
|
||||||
|
|
||||||
return '"\x01' + ('\x01'.join([str(x) for x in val])) + '\x01"'
|
return '"\x01' + ('\x01'.join([str(x) for x in val])) + '\x01"'
|
||||||
|
|
||||||
def value_to_php_serialized(val: Any) -> str:
|
def value_to_php_serialized(val: Any) -> str:
|
||||||
@ -151,7 +143,7 @@ def dict_to_insert(table: str, objdict: Dict) -> str:
|
|||||||
values = list()
|
values = list()
|
||||||
for col in columns:
|
for col in columns:
|
||||||
# any weird array we have to process here if there are others
|
# any weird array we have to process here if there are others
|
||||||
if (table, col) in WEIRD_LIST:
|
if table == "civicrm_contact" and col == "contact_sub_type":
|
||||||
values.append(array_to_weird_array(objdict[col]))
|
values.append(array_to_weird_array(objdict[col]))
|
||||||
elif table == "civicrm_saved_search" and col == "form_values":
|
elif table == "civicrm_saved_search" and col == "form_values":
|
||||||
values.append(value_to_php_serialized(objdict[col]))
|
values.append(value_to_php_serialized(objdict[col]))
|
||||||
|
Loading…
Reference in New Issue
Block a user