Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
OSDI
Commits
88b8e521
Commit
88b8e521
authored
Sep 09, 2018
by
andy gu
Browse files
phase out rootendpoint
parent
ae03eff2
Changes
4
Hide whitespace changes
Inline
Side-by-side
api/v3/Exporter/Bulk.php
View file @
88b8e521
...
...
@@ -22,7 +22,6 @@ include "Export.php";
function
_civicrm_api3_exporter_Bulk_spec
(
&
$spec
)
{
$spec
[
'key'
][
'api.required'
]
=
1
;
$spec
[
'endpoint'
][
'api.required'
]
=
1
;
$spec
[
'endpoint_root'
][
'api.required'
]
=
1
;
$spec
[
'allow_restart'
][
'api.required'
]
=
0
;
$spec
[
'group'
][
'api.required'
]
=
0
;
$spec
[
'updatejob'
][
'api.required'
]
=
0
;
...
...
@@ -105,8 +104,8 @@ function civicrm_api3_exporter_Bulk($params) {
// Use a sha1 of the key with the endpoint to generate our identifier.
// change the hash to the URL if Civi, key if actionnetwork
$hash
=
"CIVI_ID_actionnetwork_"
.
sha1
(
$params
[
"key"
]);
if
(
strpos
(
$params
[
"endpoint
_root
"
],
"actionnetwork.org"
)
===
FALSE
)
{
$hash
=
"CIVI_ID_"
.
sha1
(
$params
[
"endpoint
_root
"
]);
if
(
strpos
(
$params
[
"
update
endpoint"
],
"actionnetwork.org"
)
===
FALSE
)
{
$hash
=
"CIVI_ID_"
.
sha1
(
$params
[
"
update
endpoint"
]);
}
$second_key
=
$params
[
"endpoint"
]
.
$hash
;
...
...
api/v3/OSDIJob/Add.php
View file @
88b8e521
...
...
@@ -231,9 +231,6 @@ function civicrm_api3_o_s_d_i_job_Add($params) {
if
(
$params
[
"signupendpoint"
]
!=
""
)
{
$exportonceparams
[]
=
"endpoint="
.
$params
[
"signupendpoint"
];
}
if
(
$params
[
"rootendpoint"
]
!=
""
)
{
$exportonceparams
[]
=
"endpoint_root="
.
$params
[
"rootendpoint"
];
}
$exportonceparams
[]
=
"allow_restart=0"
;
if
(
$params
[
"groupid"
]
!=
""
)
{
$exportonceparams
[]
=
"group="
.
$params
[
"groupid"
];
...
...
@@ -269,9 +266,6 @@ function civicrm_api3_o_s_d_i_job_Add($params) {
if
(
$params
[
"signupendpoint"
]
!=
""
)
{
$exportmanyparams
[]
=
"endpoint="
.
$params
[
"signupendpoint"
];
}
if
(
$params
[
"rootendpoint"
]
!=
""
)
{
$exportmanyparams
[]
=
"endpoint_root="
.
$params
[
"rootendpoint"
];
}
$exportmanyparams
[]
=
"allow_restart=1"
;
if
(
$params
[
"groupid"
]
!=
""
)
{
$exportmanyparams
[]
=
"group="
.
$params
[
"groupid"
];
...
...
templates/CRM/Osdi/Page/Configure.tpl
View file @
88b8e521
...
...
@@ -379,13 +379,6 @@
);
var
endpoint
=
data
[
"
civiendpoint
"
];
var
endpointroot
=
data
[
"
civiendpoint
"
];
if
(
endpoint
.
indexOf
(
"
actionnetwork.org
"
)
!==
-
1
)
{
endpointroot
=
endpointroot
.
substring
(
0
,
endpointroot
.
indexOf
(
"
/people
"
));
}
else
{
endpointroot
=
endpointroot
.
substring
(
0
,
endpointroot
.
indexOf
(
"
/civicrm
"
))
+
"
/civicrm
"
;
}
if
(
data
[
"
resource
"
]
==
1
)
{
e
.
preventDefault
();
...
...
@@ -395,7 +388,6 @@
CRM
.
api3
(
'
Exporter
'
,
'
bulk
'
,
{
"
zone
"
:
data
[
"
zone
"
],
"
allow_restart
"
:
1
,
"
endpoint_root
"
:
endpointroot
,
"
group
"
:
data
[
"
group
"
],
"
required
"
:
data
[
"
required
"
],
"
key
"
:
data
[
"
apikey
"
],
...
...
templates/CRM/Osdi/Page/OSDIJob.tpl
View file @
88b8e521
...
...
@@ -17,10 +17,6 @@
<option
value=
"0"
disabled=
"disabled"
>
Imported Resource
</option>
<option
value=
"1"
selected=
"selected"
>
Contacts
</option>
</select>
<br>
<label
for=
"rootendpoint"
>
Sync Endpoint (root)
</label>
<input
type=
"text"
name=
"rootendpoint"
id=
"rootendpoint"
class=
"text ui-widget-content ui-corner-all"
value=
"localhost/civicrm"
>
<br>
<label
for=
"signupendpoint"
>
Sync Endpoint (Person Signup Helper)
</label>
<input
type=
"text"
name=
"signupendpoint"
id=
"signupendpoint"
class=
"text ui-widget-content ui-corner-all"
value=
"localhost/civicrm/osdi/webhook"
>
<br>
...
...
@@ -173,7 +169,6 @@
function
addJob
()
{
jobname
=
CRM
.
$
(
"
#name
"
);
resource
=
CRM
.
$
(
"
select#resource option:checked
"
);
rootendpoint
=
CRM
.
$
(
"
#rootendpoint
"
);
signupendpoint
=
CRM
.
$
(
"
#signupendpoint
"
);
peopleendpoint
=
CRM
.
$
(
"
#peopleendpoint
"
);
groupid
=
CRM
.
$
(
"
#groupid
"
);
...
...
@@ -187,7 +182,7 @@
CRM
.
api3
(
'
OSDIJob
'
,
'
Add
'
,
{
"
name
"
:
jobname
.
val
(),
"
resource
"
:
resource
.
val
(),
"
rootendpoint
"
:
root
endpoint
.
val
(),
"
rootendpoint
"
:
people
endpoint
.
val
(),
"
signupendpoint
"
:
signupendpoint
.
val
(),
"
peopleendpoint
"
:
peopleendpoint
.
val
(),
"
groupid
"
:
groupid
.
val
(),
...
...
@@ -207,7 +202,7 @@
}
if
(
!
edit
)
{
// redirect to mapping
window
.
location
.
href
=
"
/civicrm/osdi/mapping?change=1&endpoint=
"
+
root
endpoint
.
val
();
window
.
location
.
href
=
"
/civicrm/osdi/mapping?change=1&endpoint=
"
+
people
endpoint
.
val
();
}
});
...
...
@@ -222,7 +217,7 @@
CRM
.
$
(
'
[id^="edit_"]
'
).
click
(
function
()
{
jobname
=
CRM
.
$
(
"
#name
"
);
resource
=
CRM
.
$
(
"
select#resource option:checked
"
);
rootendpoint
=
CRM
.
$
(
"
#
root
endpoint
"
);
rootendpoint
=
CRM
.
$
(
"
#
people
endpoint
"
);
signupendpoint
=
CRM
.
$
(
"
#signupendpoint
"
);
peopleendpoint
=
CRM
.
$
(
"
#peopleendpoint
"
);
groupid
=
CRM
.
$
(
"
#groupid
"
);
...
...
@@ -273,7 +268,6 @@
if
(
"
zone
"
in
parameterarray
)
CRM
.
$
(
"
#timezone
"
)[
0
].
selectedIndex
=
parseInt
(
parameterarray
[
"
zone
"
],
10
)
+
13
;
if
(
"
required
"
in
parameterarray
)
reqfields
.
val
(
parameterarray
[
"
required
"
]);
rootendpoint
.
val
(
parameterarray
[
"
endpoint
"
]);
key
.
val
(
parameterarray
[
"
key
"
]);
}
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment