Commit 9c306c1c authored by Dries's avatar Dries
Browse files

Issue #2122019 by damiankloip: Remove include_file() logic and getMenuItem() from FormBuilder.

parent dd190fd8
...@@ -478,21 +478,6 @@ public function retrieveForm($form_id, &$form_state) { ...@@ -478,21 +478,6 @@ public function retrieveForm($form_id, &$form_state) {
// Record the $form_id. // Record the $form_id.
$form_state['build_info']['form_id'] = $form_id; $form_state['build_info']['form_id'] = $form_id;
// Record the filepath of the include file containing the original form, so
// the form builder callbacks can be loaded when the form is being rebuilt
// from cache on a different path (such as 'system/ajax'). See
// self::getCache(). Don't do this in maintenance mode as Drupal may not be
// fully bootstrapped (i.e. during installation) in which case
// menu_get_item() is not available.
if (!isset($form_state['build_info']['files']['menu']) && !defined('MAINTENANCE_MODE')) {
$item = $this->menuGetItem();
if (!empty($item['include_file'])) {
// Do not use form_load_include() here, as the file is already loaded.
// Anyway, self::getCache() is able to handle filepaths too.
$form_state['build_info']['files']['menu'] = $item['include_file'];
}
}
// We save two copies of the incoming arguments: one for modules to use // We save two copies of the incoming arguments: one for modules to use
// when mapping form ids to constructor functions, and another to pass to // when mapping form ids to constructor functions, and another to pass to
// the constructor function itself. // the constructor function itself.
...@@ -1701,15 +1686,6 @@ protected function drupalInstallationAttempted() { ...@@ -1701,15 +1686,6 @@ protected function drupalInstallationAttempted() {
return drupal_installation_attempted(); return drupal_installation_attempted();
} }
/**
* Wraps menu_get_item().
*
* @return array|bool
*/
protected function menuGetItem() {
return menu_get_item();
}
/** /**
* Wraps watchdog(). * Wraps watchdog().
*/ */
......
...@@ -635,13 +635,6 @@ protected function drupalInstallationAttempted() { ...@@ -635,13 +635,6 @@ protected function drupalInstallationAttempted() {
return FALSE; return FALSE;
} }
/**
* {@inheritdoc}
*/
protected function menuGetItem() {
return FALSE;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment