summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgundalo2015-11-02 15:34:36 (GMT)
committerAaron Bauman2015-11-02 15:34:36 (GMT)
commit6ce7e209b943f0c5452aecf75d9c572972eb0254 (patch)
treede78c2c108683f25da6b0a0e825e6ca3b3e1ccc9
parentf1c5be7fef6d82ec0f4699cb52b868d0d0a4d60c (diff)
Issue #2382791 by Jon Pugh: Change function webform_entity_load_webform_submission($sid) to webform_submission_entity_load($sid)
-rw-r--r--plugins/content_types/webform_submission.inc4
-rw-r--r--webform_entity.module9
2 files changed, 5 insertions, 8 deletions
diff --git a/plugins/content_types/webform_submission.inc b/plugins/content_types/webform_submission.inc
index 89eca20..18a0444 100644
--- a/plugins/content_types/webform_submission.inc
+++ b/plugins/content_types/webform_submission.inc
@@ -48,7 +48,7 @@ function webform_entity_webform_submission_content_type_render($subtype, $conf,
return;
}
- $submission = webform_entity_load_webform_submission($sid);
+ $submission = webform_submission_entity_load($sid);
// Don't store viewed webform submission data on the webform submission, this can mess up other
// views of the webform submission.
@@ -142,7 +142,7 @@ function webform_entity_webform_submission_content_type_admin_title($subtype, $c
return t('Webform submission loaded from @var', array('@var' => $conf['sid']));
}
- $submission = webform_entity_load_webform_submission($conf['sid']);
+ $submission = webform_submission_entity_load($conf['sid']);
if ($submission) {
return check_plain(t('submission @sid', array('@sid' => $submission->sid)));
}
diff --git a/webform_entity.module b/webform_entity.module
index 39c94b3..4748260 100644
--- a/webform_entity.module
+++ b/webform_entity.module
@@ -883,15 +883,12 @@ function webform_entity_type_delete_confirm_submit($form, &$form_state) {
}
/**
- *
- * Note this function could not be called webform_entity_webform_submission_load()
- * because that would be a namespace colision. Can't wait for PHP 5.3 to be
- * everywhere.
+ * Loads a webform submission from the database.
*
* @param $sid
* The sid of a sigle webform submission entity to load.
*/
-function webform_entity_load_webform_submission($sid) {
+function webform_submission_entity_load($sid) {
if (is_numeric($sid)) {
return array_pop(entity_get_controller('webform_submission_entity')->load(array($sid)));
}
@@ -934,7 +931,7 @@ function webform_entity_submission_access($op, $entity = NULL, $account = NULL,
* This callback is used by Entity API for programmatic deleting.
*/
function webform_entity_delete_webform_submission($id) {
- $submission = webform_entity_load_webform_submission($id);
+ $submission = webform_submission_entity_load($id);
$node = node_load($submission->nid);
webform_submission_delete($node, $submission);
}