summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Wehner2010-02-06 16:20:59 (GMT)
committer Daniel Wehner2010-02-06 16:20:59 (GMT)
commit28244380479a91406e5034e07a91eb01d96ee425 (patch)
tree836b85db08d5c4923b91cc75d2a3fd3bcbe40b6d
parent849b42a4a8e99dd45cd9010c098b72e6fc4432af (diff)
#706518 by dereine: Fix call to undefined views_process_check_options
-rw-r--r--CHANGELOG.txt1
-rw-r--r--includes/admin.inc1
-rw-r--r--includes/form.inc43
-rw-r--r--views.module15
4 files changed, 17 insertions, 43 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e8eeaa6..989416d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -86,6 +86,7 @@ Views 3.x-7.x-dev
o #366250 by seutje: Fix deprecated jquery selectors so we can work with jquery 1.2.6 as well as 1.3.2.
o #706528 by dereine: Fix validation handling.
o #608246 by dereine: Use default filter on signature rather than XSS filter.
+ o #706518 by dereine: Fix call to undefined views_process_check_options
Views 6.x-3.x-dev
o #396380 by merlinofchaos, dereine and dagmar: Initial support for GROUP BY queries!!!!!!!!!!!!
diff --git a/includes/admin.inc b/includes/admin.inc
index 339d6bd..90e1af0 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -3200,3 +3200,4 @@ function theme_views_ui_style_plugin_table($variables) {
$output .= drupal_render_children($form);
return $output;
}
+
diff --git a/includes/form.inc b/includes/form.inc
index 9c9cec1..b6d7227 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -254,46 +254,3 @@ function drupal_validate_form_new($form_id, $form, &$form_state) {
$validated_forms[$form_id] = TRUE;
}
-/**
- * Process callback to add dependency to form items.
- *
- * Usage:
- *
- * On any form item, add
- * - @code '#process' => 'views_process_dependency' @endcode
- * - @code '#dependency' => array('id-of-form-without-the-#' => array(list, of, values, that, make, this, gadget, visible)); @endcode
- */
-function views_process_dependency($element, $edit, &$form_state, &$form) {
- if (isset($element['#dependency'])) {
- if (!isset($element['#dependency_count'])) {
- $element['#dependency_count'] = 1;
- }
- if (!empty($form_state['ajax'])) {
- $form_state['js settings']['viewsAjax']['formRelationships'][$element['#id']] = array('num' => $element['#dependency_count'], 'values' => $element['#dependency']);
- }
- else {
- views_add_js('dependent');
- $options['viewsAjax']['formRelationships'][$element['#id']] = array('num' => $element['#dependency_count'], 'values' => $element['#dependency']);
- drupal_add_js($options, 'setting');
- }
- }
-
- return $element;
-}
-
-/**
- * #process callback to see if we need to check_plain() the options.
- *
- * Since FAPI is inconsistent, the #options are sanitized for you in all cases
- * _except_ checkboxes. We have form elements that are sometimes 'select' and
- * sometimes 'checkboxes', so we need decide late in the form rendering cycle
- * if the options need to be sanitized before they're rendered. This callback
- * inspects the type, and if it's still 'checkboxes', does the sanitation.
- */
-function views_process_check_options($element, $edit, &$form_state, &$form) {
- if ($element['#type'] == 'checkboxes' || $element['#type'] == 'checkbox') {
- $element['#options'] = array_map('check_plain', $element['#options']);
- }
- return $element;
-}
-
diff --git a/views.module b/views.module
index 060f329..dab9fc7 100644
--- a/views.module
+++ b/views.module
@@ -1296,3 +1296,18 @@ function views_process_dependency($element) {
return $element;
}
+/**
+ * #process callback to see if we need to check_plain() the options.
+ *
+ * Since FAPI is inconsistent, the #options are sanitized for you in all cases
+ * _except_ checkboxes. We have form elements that are sometimes 'select' and
+ * sometimes 'checkboxes', so we need decide late in the form rendering cycle
+ * if the options need to be sanitized before they're rendered. This callback
+ * inspects the type, and if it's still 'checkboxes', does the sanitation.
+ */
+function views_process_check_options($element, $edit, &$form_state, &$form) {
+ if ($element['#type'] == 'checkboxes' || $element['#type'] == 'checkbox') {
+ $element['#options'] = array_map('check_plain', $element['#options']);
+ }
+ return $element;
+}