diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 0c832e53bbcec08f465eb0779a93b20fa577300a..3232c9df663d22a354c7ab6a030f6337b55a4a2f 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1430,10 +1430,10 @@ protected function curlExec($curl_options, $redirect = FALSE) { '!method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '@url' => isset($original_url) ? $original_url : $url, '@status' => $status, - '!length' => format_size(strlen($this->content)) + '!length' => format_size(strlen($this->drupalGetContent())) ); $message = t('!method @url returned @status (!length).', $message_vars); - $this->assertTrue($this->content !== FALSE, $message, t('Browser')); + $this->assertTrue($this->drupalGetContent() !== FALSE, $message, t('Browser')); return $this->drupalGetContent(); } @@ -1498,7 +1498,7 @@ protected function parse() { if (!$this->elements) { // DOM can load HTML soup. But, HTML soup can throw warnings, suppress // them. - @$htmlDom = DOMDocument::loadHTML($this->content); + @$htmlDom = DOMDocument::loadHTML($this->drupalGetContent()); if ($htmlDom) { $this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser')); // It's much easier to work with simplexml than DOM, luckily enough @@ -1731,7 +1731,7 @@ protected function drupalPostAJAX($path, $edit, $triggering_element, $ajax_path if (isset($path)) { $this->drupalGet($path, $options); } - $content = $this->content; + $content = $this->drupalGetContent(); $return = drupal_json_decode($this->drupalPost(NULL, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers, $form_html_id)); // We need $ajax_settings['wrapper'] to perform DOM manipulation. @@ -2376,7 +2376,7 @@ protected function assertRaw($raw, $message = '', $group = 'Other') { if (!$message) { $message = t('Raw "@raw" found', array('@raw' => $raw)); } - return $this->assert(strpos($this->content, $raw) !== FALSE, $message, $group); + return $this->assert(strpos($this->drupalGetContent(), $raw) !== FALSE, $message, $group); } /** @@ -2396,7 +2396,7 @@ protected function assertNoRaw($raw, $message = '', $group = 'Other') { if (!$message) { $message = t('Raw "@raw" not found', array('@raw' => $raw)); } - return $this->assert(strpos($this->content, $raw) === FALSE, $message, $group); + return $this->assert(strpos($this->drupalGetContent(), $raw) === FALSE, $message, $group); } /** @@ -2453,7 +2453,7 @@ protected function assertNoText($text, $message = '', $group = 'Other') { */ protected function assertTextHelper($text, $message = '', $group, $not_exists) { if ($this->plainTextContent === FALSE) { - $this->plainTextContent = filter_xss($this->content, array()); + $this->plainTextContent = filter_xss($this->drupalGetContent(), array()); } if (!$message) { $message = !$not_exists ? t('"@text" found', array('@text' => $text)) : t('"@text" not found', array('@text' => $text)); @@ -2519,7 +2519,7 @@ protected function assertNoUniqueText($text, $message = '', $group = 'Other') { */ protected function assertUniqueTextHelper($text, $message = '', $group, $be_unique) { if ($this->plainTextContent === FALSE) { - $this->plainTextContent = filter_xss($this->content, array()); + $this->plainTextContent = filter_xss($this->drupalGetContent(), array()); } if (!$message) { $message = '"' . $text . '"' . ($be_unique ? ' found only once' : ' found more than once'); diff --git a/modules/system/system.install b/modules/system/system.install index 43478760518900ecbe68325c68b5adbd0e0bdf34..51b54af700ae0eaaf08d6ec8076765380262b2a2 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2384,14 +2384,16 @@ function system_update_7053() { ->execute(); } - // Create the same menus as in menu_install(). - db_insert('menu_custom') - ->fields(array('menu_name' => 'user-menu', 'title' => 'User Menu', 'description' => "The User menu contains links related to the user's account, as well as the 'Log out' link.")) - ->execute(); + if (db_table_exists('menu_custom')) { + // Create the same menus as in menu_install(). + db_insert('menu_custom') + ->fields(array('menu_name' => 'user-menu', 'title' => 'User Menu', 'description' => "The User menu contains links related to the user's account, as well as the 'Log out' link.")) + ->execute(); - db_insert('menu_custom') - ->fields(array('menu_name' => 'management', 'title' => 'Management', 'description' => "The Management menu contains links for administrative tasks.")) - ->execute(); + db_insert('menu_custom') + ->fields(array('menu_name' => 'management', 'title' => 'Management', 'description' => "The Management menu contains links for administrative tasks.")) + ->execute(); + } } /**