summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-21 18:10:26 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-21 18:10:26 +0000
commit03dda45573cc585960378ae89701553b11856560 (patch)
treed78a2b65278dabe91a194d065152e5842a8f6f9c
parentcbc92f59cffeabac208d607418c066ce47e99786 (diff)
downloadbrdo-03dda45573cc585960378ae89701553b11856560.tar.gz
brdo-03dda45573cc585960378ae89701553b11856560.tar.bz2
- Patch #37752 by chx and Richard: renamed #post_process to #after_build.
-rw-r--r--includes/form.inc6
-rw-r--r--modules/node.module4
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/system.module8
-rw-r--r--modules/system/system.module8
5 files changed, 13 insertions, 17 deletions
diff --git a/includes/form.inc b/includes/form.inc
index e7fbb4751..6df047161 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -302,9 +302,9 @@ function _form_builder($form_id, $form) {
$count++;
}
- if (function_exists($form['#post_process']) && !isset($form['#post_processed'])) {
- $form = call_user_func($form['#post_process'], $form_id, $form, $form_values, $form['#parents']);
- $form['#post_processed'] = TRUE;
+ if (function_exists($form['#after_build']) && !isset($form['#after_build_done'])) {
+ $form = call_user_func($form['#after_build'], $form, $form_values);
+ $form['#after_build_done'] = TRUE;
}
return $form;
diff --git a/modules/node.module b/modules/node.module
index 1fec44aca..d9b725ee4 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1663,13 +1663,13 @@ function node_form($node) {
}
if ($op == t('Preview')) {
- $form['#post_process'] = 'node_form_add_preview';
+ $form['#after_build'] = 'node_form_add_preview';
}
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
}
-function node_form_add_preview($form_id, $form, $edit) {
+function node_form_add_preview($form, $edit) {
$edit = array2object($edit);
node_validate($edit);
$form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100);
diff --git a/modules/node/node.module b/modules/node/node.module
index 1fec44aca..d9b725ee4 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1663,13 +1663,13 @@ function node_form($node) {
}
if ($op == t('Preview')) {
- $form['#post_process'] = 'node_form_add_preview';
+ $form['#after_build'] = 'node_form_add_preview';
}
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
}
-function node_form_add_preview($form_id, $form, $edit) {
+function node_form_add_preview($form, $edit) {
$edit = array2object($edit);
node_validate($edit);
$form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100);
diff --git a/modules/system.module b/modules/system.module
index 414e7306d..a2c6e5a11 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -323,7 +323,7 @@ function system_view_general() {
'#default_value' => file_directory_path(),
'#maxlength' => 255,
'#description' => t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_directory_temp'] = array(
@@ -332,7 +332,7 @@ function system_view_general() {
'#default_value' => file_directory_temp(),
'#maxlength' => 255,
'#description' => t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the Drupal installation directory.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_downloads'] = array(
@@ -466,12 +466,10 @@ function system_view_general() {
* fails, the form element is flagged with an error from within the
* file_check_directory function.
*
- * @param $form_id
- * The id of the form.
* @param $form_element
* The form element containing the name of the directory to check.
*/
-function system_check_directory($form_id, $form_element) {
+function system_check_directory($form_element) {
file_check_directory($form_element['#value'], FILE_CREATE_DIRECTORY, $form_element['#parents'][0]);
return $form_element;
}
diff --git a/modules/system/system.module b/modules/system/system.module
index 414e7306d..a2c6e5a11 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -323,7 +323,7 @@ function system_view_general() {
'#default_value' => file_directory_path(),
'#maxlength' => 255,
'#description' => t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_directory_temp'] = array(
@@ -332,7 +332,7 @@ function system_view_general() {
'#default_value' => file_directory_temp(),
'#maxlength' => 255,
'#description' => t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the Drupal installation directory.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_downloads'] = array(
@@ -466,12 +466,10 @@ function system_view_general() {
* fails, the form element is flagged with an error from within the
* file_check_directory function.
*
- * @param $form_id
- * The id of the form.
* @param $form_element
* The form element containing the name of the directory to check.
*/
-function system_check_directory($form_id, $form_element) {
+function system_check_directory($form_element) {
file_check_directory($form_element['#value'], FILE_CREATE_DIRECTORY, $form_element['#parents'][0]);
return $form_element;
}