Commit 0e7882b7 authored by Crell's avatar Crell

Merge remote-tracking branch 'dries/8.x' into 1400748-namespaces

parents 910535c9 f5abeb9b
......@@ -1806,7 +1806,7 @@ function format_size($size, $langcode = NULL) {
/**
* Formats a time interval with the requested granularity.
*
* @param $timestamp
* @param $interval
* The length of the interval in seconds.
* @param $granularity
* How many different units to display in the string.
......@@ -1817,7 +1817,7 @@ function format_size($size, $langcode = NULL) {
* @return
* A translated string representation of the interval.
*/
function format_interval($timestamp, $granularity = 2, $langcode = NULL) {
function format_interval($interval, $granularity = 2, $langcode = NULL) {
$units = array(
'1 year|@count years' => 31536000,
'1 month|@count months' => 2592000,
......@@ -1830,9 +1830,9 @@ function format_interval($timestamp, $granularity = 2, $langcode = NULL) {
$output = '';
foreach ($units as $key => $value) {
$key = explode('|', $key);
if ($timestamp >= $value) {
$output .= ($output ? ' ' : '') . format_plural(floor($timestamp / $value), $key[0], $key[1], array(), array('langcode' => $langcode));
$timestamp %= $value;
if ($interval >= $value) {
$output .= ($output ? ' ' : '') . format_plural(floor($interval / $value), $key[0], $key[1], array(), array('langcode' => $langcode));
$interval %= $value;
$granularity--;
}
......
......@@ -98,7 +98,7 @@
* generate the same form (or very similar forms) using different $form_ids
* can implement hook_forms(), which maps different $form_id values to the
* proper form constructor function. Examples may be found in node_forms(),
* search_forms(), and user_forms().
* and search_forms().
* @param ...
* Any additional arguments are passed on to the functions called by
* drupal_get_form(), including the unique form constructor function. For
......@@ -136,7 +136,7 @@ function drupal_get_form($form_id) {
* generate the same form (or very similar forms) using different $form_ids
* can implement hook_forms(), which maps different $form_id values to the
* proper form constructor function. Examples may be found in node_forms(),
* search_forms(), and user_forms().
* and search_forms().
* @param $form_state
* An array which stores information about the form. This is passed as a
* reference so that the caller can use it to examine what in the form changed
......@@ -421,7 +421,7 @@ function form_state_defaults() {
* Modules that need to generate the same form (or very similar forms)
* using different $form_ids can implement hook_forms(), which maps
* different $form_id values to the proper form constructor function. Examples
* may be found in node_forms(), search_forms(), and user_forms().
* may be found in node_forms() and search_forms().
* @param $form_state
* A keyed array containing the current state of the form.
* @param $old_form
......@@ -627,7 +627,7 @@ function form_load_include(&$form_state, $type, $module, $name = NULL) {
* Modules that need to generate the same form (or very similar forms)
* using different $form_ids can implement hook_forms(), which maps
* different $form_id values to the proper form constructor function. Examples
* may be found in node_forms(), search_forms(), and user_forms().
* may be found in node_forms() and search_forms().
* @param $form_state
* A keyed array containing the current state of the form. Most important is
* the $form_state['values'] collection, a tree of data used to simulate the
......
......@@ -1543,7 +1543,7 @@ function theme_link($variables) {
* @param $variables
* An associative array containing:
* - links: An associative array of links to be themed. The key for each link
* is used as its css class. Each link should be itself an array, with the
* is used as its CSS class. Each link should be itself an array, with the
* following elements:
* - title: The link text.
* - href: The link URL. If omitted, the 'title' is shown as a plain text
......
......@@ -77,8 +77,13 @@
* Text with tokens replaced.
*/
function token_replace($text, array $data = array(), array $options = array()) {
$text_tokens = token_scan($text);
if (empty($text_tokens)) {
return $text;
}
$replacements = array();
foreach (token_scan($text) as $type => $tokens) {
foreach ($text_tokens as $type => $tokens) {
$replacements += token_generate($type, $tokens, $data, $options);
if (!empty($options['clear'])) {
$replacements += array_fill_keys($tokens, '');
......
......@@ -318,7 +318,7 @@ Drupal.ajax.prototype.beforeSerialize = function (element, options) {
Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) {
// This function is left empty to make it simple to override for modules
// that wish to add functionality here.
}
};
/**
* Prepare the Ajax request before it is sent.
......
......@@ -26,7 +26,7 @@ Drupal.behaviors.machineName = {
var $source = $(source_id, context).addClass('machine-name-source');
var $target = $(options.target, context).addClass('machine-name-target');
var $suffix = $(options.suffix, context);
var $wrapper = $target.parents('.form-item:first');
var $wrapper = $target.closest('.form-item');
// All elements have to exist.
if (!$source.length || !$target.length || !$suffix.length || !$wrapper.length) {
return;
......
......@@ -125,7 +125,7 @@ Drupal.tableDrag.prototype.initColumns = function () {
var field = $('.' + this.tableSettings[group][d].target + ':first', this.table);
if (field.size() && this.tableSettings[group][d].hidden) {
var hidden = this.tableSettings[group][d].hidden;
var cell = field.parents('td:first');
var cell = field.closest('td');
break;
}
}
......@@ -744,7 +744,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
switch (rowSettings.action) {
case 'depth':
// Get the depth of the target row.
targetElement.value = $('.indentation', $(sourceElement).parents('tr:first')).size();
targetElement.value = $('.indentation', $(sourceElement).closest('tr')).size();
break;
case 'match':
// Update the value.
......@@ -876,7 +876,7 @@ Drupal.tableDrag.prototype.row = function (tableRow, method, indentEnabled, maxD
this.group = [tableRow];
this.groupDepth = $('.indentation', tableRow).size();
this.changed = false;
this.table = $(tableRow).parents('table:first').get(0);
this.table = $(tableRow).closest('table').get(0);
this.indentEnabled = indentEnabled;
this.maxDepth = maxDepth;
this.direction = ''; // Direction the row is being moved.
......
......@@ -29,7 +29,7 @@ Drupal.tableSelect = function () {
checkboxes.each(function () {
this.checked = event.target.checked;
// Either add or remove the selected class based on the state of the check all checkbox.
$(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected');
$(this).closest('tr').toggleClass('selected', this.checked);
});
// Update the title and the state of the check all box.
updateSelectAll(event.target.checked);
......@@ -39,14 +39,14 @@ Drupal.tableSelect = function () {
// For each of the checkboxes within the table that are not disabled.
checkboxes = $('td input:checkbox:enabled', table).click(function (e) {
// Either add or remove the selected class based on the state of the check all checkbox.
$(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected');
$(this).closest('tr').toggleClass('selected', this.checked);
// If this is a shift click, we need to highlight everything in the range.
// Also make sure that we are actually checking checkboxes over a range and
// that a checkbox has been checked or unchecked before.
if (e.shiftKey && lastChecked && lastChecked != e.target) {
// We use the checkbox's parent TR to do our range searching.
Drupal.tableSelectRange($(e.target).parents('tr')[0], $(lastChecked).parents('tr')[0], e.target.checked);
Drupal.tableSelectRange($(e.target).closest('tr')[0], $(lastChecked).closest('tr')[0], e.target.checked);
}
// If all checkboxes are checked, make sure the select-all one is checked too, otherwise keep unchecked.
......
......@@ -266,6 +266,10 @@ EOF;
return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_atom.xml';
}
function getHtmlEntitiesSample() {
return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_title_entities.xml';
}
/**
* Creates sample article nodes.
*
......@@ -915,4 +919,15 @@ class FeedParserTestCase extends AggregatorTestCase {
$this->assertText('Some text.');
$this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', array(':link' => 'http://example.org/2003/12/13/atom03'))->fetchField(), 'Atom entry id element is parsed correctly.');
}
/**
* Tests a feed that uses HTML entities in item titles.
*/
function testHtmlEntitiesSample() {
$feed = $this->createFeed($this->getHtmlEntitiesSample());
aggregator_refresh($feed);
$this->drupalGet('aggregator/sources/' . $feed->fid);
$this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
$this->assertText("Quote" Amp&");
}
}
......@@ -113,7 +113,7 @@ Drupal.behaviors.blockDrag = {
$('select.block-region-select', context).once('block-region-select', function () {
$(this).change(function (event) {
// Make our new row and select field.
var row = $(this).parents('tr:first');
var row = $(this).closest('tr');
var select = $(this);
tableDrag.rowObject = new tableDrag.row(row);
......
......@@ -43,6 +43,6 @@
float: right;
right: -10px;
}
html.js #preview {
.js #preview {
float: right;
}
......@@ -78,7 +78,7 @@
#preview {
display: none;
}
html.js #preview {
.js #preview {
display: block;
position: relative;
float: left; /* LTR */
......
......@@ -51,28 +51,6 @@ function color_form_system_theme_settings_alter(&$form, &$form_state) {
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function color_form_system_themes_alter(&$form, &$form_state) {
_color_theme_select_form_alter($form, $form_state);
}
/**
* Helper for hook_form_FORM_ID_alter() implementations.
*/
function _color_theme_select_form_alter(&$form, &$form_state) {
// Use the generated screenshot in the theme list.
$themes = list_themes();
foreach (element_children($form) as $theme) {
if ($screenshot = variable_get('color_' . $theme . '_screenshot')) {
if (isset($form[$theme]['screenshot'])) {
$form[$theme]['screenshot']['#markup'] = theme('image', array('uri' => $screenshot, 'title' => '', 'attributes' => array('class' => array('screenshot'))));
}
}
}
}
/**
* Replaces style sheets with color-altered style sheets.
*
......
......@@ -25,7 +25,7 @@ div.contextual-links-wrapper {
top: 2px;
z-index: 999;
}
html.js div.contextual-links-wrapper {
.js div.contextual-links-wrapper {
display: block;
}
a.contextual-links-trigger {
......
......@@ -103,10 +103,9 @@ function field_schema() {
'active' => array('active'),
'storage_active' => array('storage_active'),
'deleted' => array('deleted'),
// Used by field_modules_disabled().
// Used by field_sync_field_status().
'module' => array('module'),
'storage_module' => array('storage_module'),
// Used by field_associate_fields().
'type' => array('type'),
'storage_type' => array('storage_type'),
),
......
......@@ -362,11 +362,12 @@ function field_theme() {
/**
* Implements hook_cron().
*
* Purges some deleted Field API data, if any exists.
*/
function field_cron() {
// Refresh the 'active' status of fields.
field_sync_field_status();
// Do a pass of purging on deleted Field API data, if any exists.
$limit = variable_get('field_purge_batch_size', 10);
field_purge_batch($limit);
}
......@@ -412,10 +413,29 @@ function field_system_info_alter(&$info, $file, $type) {
* Implements hook_flush_caches().
*/
function field_flush_caches() {
// Refresh the 'active' status of fields.
field_sync_field_status();
// Request a flush of our cache table.
return array('field');
}
/**
* Implements hook_modules_enabled().
*/
function field_modules_enabled($modules) {
// Refresh the 'active' status of fields.
field_sync_field_status();
}
/**
* Implements hook_modules_disabled().
*/
function field_modules_disabled($modules) {
// Refresh the 'active' status of fields.
field_sync_field_status();
}
/**
* Refreshes the 'active' and 'storage_active' columns for fields.
*/
......@@ -449,18 +469,18 @@ function field_sync_field_status() {
function field_associate_fields($module) {
// Associate field types.
$field_types = (array) module_invoke($module, 'field_info');
foreach ($field_types as $name => $field_info) {
if ($field_types) {
db_update('field_config')
->fields(array('module' => $module, 'active' => 1))
->condition('type', $name)
->condition('type', array_keys($field_types))
->execute();
}
// Associate storage backends.
$storage_types = (array) module_invoke($module, 'field_storage_info');
foreach ($storage_types as $name => $storage_info) {
if ($storage_types) {
db_update('field_config')
->fields(array('storage_module' => $module, 'storage_active' => 1))
->condition('storage_type', $name)
->condition('storage_type', array_keys($storage_types))
->execute();
}
}
......
......@@ -2357,7 +2357,6 @@ class FieldCrudTestCase extends FieldTestCase {
$this->assertTrue($field_definition <= $field, t('The field was properly read.'));
module_disable($modules, FALSE);
drupal_flush_all_caches();
$fields = field_read_fields(array('field_name' => $field_name), array('include_inactive' => TRUE));
$this->assertTrue(isset($fields[$field_name]) && $field_definition < $field, t('The field is properly read when explicitly fetching inactive fields.'));
......@@ -2370,7 +2369,6 @@ class FieldCrudTestCase extends FieldTestCase {
$module = array_shift($modules);
module_enable(array($module), FALSE);
drupal_flush_all_caches();
}
// Check that the field is active again after all modules have been
......
......@@ -28,7 +28,7 @@ Drupal.fieldUIFieldOverview = {
// 'Field type' select updates its 'Widget' select.
$('.field-type-select', table).each(function () {
this.targetSelect = $('.widget-type-select', $(this).parents('tr').eq(0));
this.targetSelect = $('.widget-type-select', $(this).closest('tr'));
$(this).bind('change keyup', function () {
var selectedFieldType = this.options[this.selectedIndex].value;
......@@ -43,8 +43,8 @@ Drupal.fieldUIFieldOverview = {
// 'Existing field' select updates its 'Widget' select and 'Label' textfield.
$('.field-select', table).each(function () {
this.targetSelect = $('.widget-type-select', $(this).parents('tr').eq(0));
this.targetTextfield = $('.label-textfield', $(this).parents('tr').eq(0));
this.targetSelect = $('.widget-type-select', $(this).closest('tr'));
this.targetTextfield = $('.label-textfield', $(this).closest('tr'));
this.targetTextfield
.data('field_ui_edited', false)
.bind('keyup', function (e) {
......@@ -140,7 +140,7 @@ Drupal.fieldUIOverview = {
*/
onChange: function () {
var $trigger = $(this);
var row = $trigger.parents('tr:first').get(0);
var row = $trigger.closest('tr').get(0);
var rowHandler = $(row).data('fieldUIRowHandler');
var refreshRows = {};
......
......@@ -77,7 +77,7 @@ Drupal.file = Drupal.file || {
'%filename': this.value,
'%extensions': extensionPattern.replace(/\|/g, ', ')
});
$(this).parents('div.form-managed-file').prepend('<div class="messages error file-upload-js-error">' + error + '</div>');
$(this).closest('div.form-managed-file').prepend('<div class="messages error file-upload-js-error">' + error + '</div>');
this.value = '';
return false;
}
......@@ -96,8 +96,8 @@ Drupal.file = Drupal.file || {
// Check if we're working with an "Upload" button.
var $enabledFields = [];
if ($(this).parents('div.form-managed-file').size() > 0) {
$enabledFields = $(this).parents('div.form-managed-file').find('input.form-file');
if ($(this).closest('div.form-managed-file').size() > 0) {
$enabledFields = $(this).closest('div.form-managed-file').find('input.form-file');
}
// Temporarily disable upload fields other than the one we're currently
......@@ -119,7 +119,7 @@ Drupal.file = Drupal.file || {
*/
progressBar: function (event) {
var clickedButton = this;
var $progressId = $(clickedButton).parents('div.form-managed-file').find('input.file-progress');
var $progressId = $(clickedButton).closest('div.form-managed-file').find('input.file-progress');
if ($progressId.size()) {
var originalName = $progressId.attr('name');
......@@ -133,7 +133,7 @@ Drupal.file = Drupal.file || {
}
// Show the progress bar if the upload takes longer than half a second.
setTimeout(function () {
$(clickedButton).parents('div.form-managed-file').find('div.ajax-progress-bar').slideDown();
$(clickedButton).closest('div.form-managed-file').find('div.ajax-progress-bar').slideDown();
}, 500);
},
/**
......
......@@ -7,9 +7,9 @@ Drupal.behaviors.filterGuidelines = {
attach: function (context) {
$('.filter-guidelines', context).once('filter-guidelines')
.find(':header').hide()
.parents('.filter-wrapper').find('select.filter-list')
.closest('.filter-wrapper').find('select.filter-list')
.bind('change', function () {
$(this).parents('.filter-wrapper')
$(this).closest('.filter-wrapper')
.find('.filter-guidelines-item').hide()
.siblings('.filter-guidelines-' + this.value).show();
})
......
......@@ -245,13 +245,14 @@ function forum_overview($form, &$form_state) {
if (isset($form[$key]['#term'])) {
$term = $form[$key]['#term'];
$form[$key]['view']['#href'] = 'forum/' . $term['tid'];
unset($form[$key]['operations']['#links']['delete']);
if (in_array($form[$key]['#term']['tid'], variable_get('forum_containers', array()))) {
$form[$key]['edit']['#title'] = t('edit container');
$form[$key]['edit']['#href'] = 'admin/structure/forum/edit/container/' . $term['tid'];
$form[$key]['operations']['#links']['edit']['title'] = t('edit container');
$form[$key]['operations']['#links']['edit']['href'] = 'admin/structure/forum/edit/container/' . $term['tid'];
}
else {
$form[$key]['edit']['#title'] = t('edit forum');
$form[$key]['edit']['#href'] = 'admin/structure/forum/edit/forum/' . $term['tid'];
$form[$key]['operations']['#links']['edit']['title'] = t('edit forum');
$form[$key]['operations']['#links']['edit']['href'] = 'admin/structure/forum/edit/forum/' . $term['tid'];
}
}
}
......
......@@ -701,24 +701,4 @@ class MenuNodeTestCase extends DrupalWebTestCase {
// Assert that unallowed Management menu is not available in options.
$this->assertNoOption('edit-menu-parent', 'management:0');
}
/**
* Asserts that a select option in the current page does not exist.
*
* @param $id
* Id of select field to assert.
* @param $option
* Option to assert.
* @param $message
* Message to display.
* @return
* TRUE on pass, FALSE on fail.
*
* @todo move to simpletest drupal_web_test_case.php.
*/
protected function assertNoOption($id, $option, $message = '') {
$selects = $this->xpath('//select[@id=:id]', array(':id' => $id));
$options = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option));
return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), t('Browser'));
}
}
......@@ -3141,7 +3141,6 @@ function node_node_access($node, $op, $account) {
*/
function node_list_permissions($type) {
$info = node_type_get_type($type);
$type = check_plain($info->type);
// Build standard list of node permissions for this type.
$perms = array(
......
......@@ -7,8 +7,8 @@
#user-login .openid-links {
padding-right: 0;
}
html.js #user-login-form li.openid-link,
html.js #user-login li.openid-link {
.js #user-login-form li.openid-link,
.js #user-login li.openid-link {
margin-right: 0;
}
#user-login-form li.openid-link a,
......
......@@ -8,8 +8,8 @@
div.form-item-openid-identifier {
display: block;
}
html.js #user-login-form div.form-item-openid-identifier,
html.js #user-login div.form-item-openid-identifier {
.js #user-login-form div.form-item-openid-identifier,
.js #user-login div.form-item-openid-identifier {
display: none;
}
#user-login-form ul {
......@@ -32,8 +32,8 @@ html.js #user-login div.form-item-openid-identifier {
display: none;
list-style: none;
}
html.js #user-login-form li.openid-link,
html.js #user-login li.openid-link {
.js #user-login-form li.openid-link,
.js #user-login li.openid-link {
display: block;
margin-left: 0; /* LTR */
}
......
html.js {
.js {
background: transparent !important;
overflow-y: scroll;
}
html.js body {
.js body {
background: transparent !important;
margin-left: 0;
margin-right: 0;
......
......@@ -33,7 +33,7 @@ Drupal.behaviors.shortcutDrag = {
tableDrag.row.prototype.onSwap = function (swappedRow) {
var disabledIndex = $(table).find('tr').index($(table).find('tr.shortcut-status-disabled')) - slots - 2,
count = 0;
$(table).find('tr.shortcut-status-enabled').nextAll().filter(':not(.shortcut-slot-empty)').each(function(index) {
$(table).find('tr.shortcut-status-enabled').nextAll(':not(.shortcut-slot-empty)').each(function(index) {
if (index < disabledIndex) {
count++;
}
......@@ -41,15 +41,18 @@ Drupal.behaviors.shortcutDrag = {
var total = slots - count;
if (total == -1) {
var disabled = $(table).find('tr.shortcut-status-disabled');
disabled.after(disabled.prevAll().filter(':not(.shortcut-slot-empty)').get(0));
if ($(swappedRow).hasClass('draggable')) {
// To maintain the shortcut links limit, we need to move the last
// element from the enabled section to the disabled section.
var changedRow = disabled.prevAll(':not(.shortcut-slot-empty)').not($(this.element)).get(0);
disabled.after(changedRow);
if ($(changedRow).hasClass('draggable')) {
// The dropped element will automatically be marked as changed by
// the tableDrag system. However, the row that swapped with it
// has moved to the "disabled" section, so we need to force its
// status to be disabled and mark it also as changed.
swappedRowObject = new tableDrag.row(swappedRow, 'mouse', self.indentEnabled, self.maxDepth, true);
swappedRowObject.markChanged();
rowStatusChange(swappedRowObject);
var changedRowObject = new tableDrag.row(changedRow, 'mouse', self.indentEnabled, self.maxDepth, true);
changedRowObject.markChanged();
rowStatusChange(changedRowObject);
}
}
else if (total != visibleLength) {
......@@ -103,7 +106,7 @@ Drupal.behaviors.shortcutDrag = {
Drupal.behaviors.newSet = {
attach: function (context, settings) {
var selectDefault = function() {
$($(this).parents('div.form-item').get(1)).find('> label > input').attr('checked', 'checked');
$(this).closest('form').find('.form-item-set .form-type-radio:last input').attr('checked', 'checked');
};
$('div.form-item-new input').focus(selectDefault).keyup(selectDefault);
}
......
......@@ -3249,6 +3249,41 @@ protected function assertNoFieldChecked($id, $message = '') {
return $this->assertTrue(isset($elements[0]) && empty($elements[0]['checked']), $message ? $message : t('Checkbox field @id is not checked.', array('@id' => $id)), t('Browser'));
}
/**
* Asserts that a select option in the current page exists.
*
* @param $id
* Id of select field to assert.
* @param $option
* Option to assert.
* @param $message
* Message to display.
* @return
* TRUE on pass, FALSE on fail.
*/
protected function assertOption($id, $option, $message = '') {
$options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option));
return $this->assertTrue(isset($options[0]), $message ? $message : t('Option @option for field @id exists.', array('@option' => $option, '@id' => $id)), t('Browser'));
}
/**
* Asserts that a select option in the current page does not exist.
*
* @param $id
* Id of select field to assert.
* @param $option
* Option to assert.
* @param $message
* Message to display.
* @return
* TRUE on pass, FALSE on fail.
*/
protected function assertNoOption($id, $option, $message = '') {
$selects = $this->xpath('//select[@id=:id]', array(':id' => $id));
$options = $this->xpath('//select[@id=:id]/option[@value=:option]', array(':id' => $id, ':option' => $option));
return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), t('Browser'));
}
/**
* Asserts that a select option in the current page is checked.
*
......
......@@ -14,7 +14,7 @@ Drupal.behaviors.simpleTestMenuCollapse = {
// Adds group toggling functionality to arrow images.
$('div.simpletest-image').click(function () {
var trs = $(this).parents('tbody').children('.' + settings.simpleTest[this.id].testClass);
var trs = $(this).closest('tbody').children('.' + settings.simpleTest[this.id].testClass);
var direction = settings.simpleTest[this.id].imageDirection;
var row = direction ? trs.size() - 1 : 0;
......
......@@ -353,7 +353,7 @@ class CommonURLUnitTestCase extends DrupalWebTestCase {
}
/**
* Tests for the check_plain(), filter_xss() and format_string() functions.
* Tests for check_plain(), filter_xss(), format_string(), and check_url().
*/
class CommonXssUnitTestCase extends DrupalUnitTestCase {
......@@ -424,6 +424,9 @@ class CommonXssUnitTestCase extends DrupalUnitTestCase {
}
}
/**
* Tests file size parsing and formatting functions.
*/
class CommonSizeUnitTestCase extends DrupalUnitTestCase {
protected $exact_test_cases;
protected $rounded_test_cases;
......@@ -524,7 +527,7 @@ class CommonSizeUnitTestCase extends DrupalUnitTestCase {
/**
* Test drupal_explode_tags() and drupal_implode_tags().
*/
class CommonAutocompleteTagsTestCase extends DrupalWebTestCase {
class CommonAutocompleteTagsTestCase extends DrupalUnitTestCase {
var $validTags = array(
'Drupal' => 'Drupal',
'Drupal with some spaces' => 'Drupal with some spaces',
......@@ -2202,7 +2205,7 @@ class CommonSimpleTestErrorCollectorTestCase extends DrupalWebTestCase {
/**
* Tests the drupal_parse_info_file() API function.
*/
class CommonDrupalParseInfoFileTestCase extends DrupalWebTestCase {
class CommonDrupalParseInfoFileTestCase extends DrupalUnitTestCase {
public static function getInfo() {
return array(
'name' => 'Parsing .info files',
......
......@@ -8,7 +8,7 @@
/**
* Test unicode handling features implemented in unicode.inc.
*/
class UnicodeUnitTest extends DrupalWebTestCase {
class UnicodeUnitTest extends DrupalUnitTestCase {
/**
* Whether to run the extended version of the tests (including non latin1 characters).
......
......@@ -105,23 +105,6 @@ function system_admin_index() {
return theme('system_admin_index', array('menu_items' => $menu_items));
}
/**
* Menu callback; displays a module's settings page.
*/
function system_settings_overview() {
// Check database setup if necessary
if (function_exists('db_check_setup') && empty($_POST)) {
db_check_setup();
}
$item = menu_get_item('admin/config');
$content = system_admin_menu_block($item);