summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/image.gd.inc4
-rw-r--r--modules/system/system.admin.inc10
-rw-r--r--modules/system/system.api.php22
-rw-r--r--modules/system/system.install24
-rw-r--r--modules/system/system.queue.inc2
-rw-r--r--modules/system/system.test12
6 files changed, 37 insertions, 37 deletions
diff --git a/modules/system/image.gd.inc b/modules/system/image.gd.inc
index a67ecf470..884a93152 100644
--- a/modules/system/image.gd.inc
+++ b/modules/system/image.gd.inc
@@ -235,7 +235,7 @@ function image_gd_desaturate(stdClass $image) {
*/
function image_gd_load(stdClass $image) {
$extension = str_replace('jpg', 'jpeg', $image->info['extension']);
- $function = 'imagecreatefrom'. $extension;
+ $function = 'imagecreatefrom' . $extension;
return (function_exists($function) && $image->resource = $function($image->source));
}
@@ -255,7 +255,7 @@ function image_gd_load(stdClass $image) {
*/
function image_gd_save(stdClass $image, $destination) {
$extension = str_replace('jpg', 'jpeg', $image->info['extension']);
- $function = 'image'. $extension;
+ $function = 'image' . $extension;
if (!function_exists($function)) {
return FALSE;
}
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 3fffeab84..1b1229906 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -179,7 +179,7 @@ function system_themes_form() {
}
else {
// Ensure this theme is compatible with this version of core.
- // Require the 'content' region to make sure the main page
+ // Require the 'content' region to make sure the main page
// content has a common place in all themes.
if (!isset($theme->info['core']) || ($theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']))) {
$incompatible_core[] = $theme->name;
@@ -2040,15 +2040,15 @@ function theme_system_modules_fieldset($form) {
// If we have help, it becomes the first part
// of the description - with CSS, it is float: right'd.
if (isset($module['help'])) {
- $description = '<div class="module-help">'. drupal_render($module['help']) .'</div>';
+ $description = '<div class="module-help">' . drupal_render($module['help']) . '</div>';
}
// Add the description, along with any modules it requires.
$description .= drupal_render($module['description']);
if ($module['#requires']) {
- $description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>';
+ $description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>';
}
if ($module['#required_by']) {
- $description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
+ $description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
}
$row[] = array('data' => $description, 'class' => 'description');
$rows[] = $row;
@@ -2067,7 +2067,7 @@ function theme_system_modules_fieldset($form) {
* An HTML string for the message.
*/
function theme_system_modules_incompatible($message) {
- return '<div class="incompatible">'. $message .'</div>';
+ return '<div class="incompatible">' . $message . '</div>';
}
/**
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 3adfef94a..d5c1d650b 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -457,7 +457,7 @@ function hook_link($type, $object, $teaser = FALSE) {
/**
* Perform alterations before links on a comment are rendered. One popular use of
- * this hook is to modify/remove links from other modules. If you want to add a link
+ * this hook is to modify/remove links from other modules. If you want to add a link
* to the links section of a node, use hook_link instead.
*
* @param $links
@@ -1588,13 +1588,13 @@ function hook_install() {
* the same directory as mymodule.module. Drupal core's updates are implemented
* using the system module as a name and stored in database/updates.inc.
*
- * If your update task is potentially time-consuming, you'll need to implement a
- * multipass update to avoid PHP timeouts. Multipass updates use the $sandbox
- * parameter provided by the batch API (normally, $context['sandbox']) to store
- * information between successive calls, and the $ret['#finished'] return value
+ * If your update task is potentially time-consuming, you'll need to implement a
+ * multipass update to avoid PHP timeouts. Multipass updates use the $sandbox
+ * parameter provided by the batch API (normally, $context['sandbox']) to store
+ * information between successive calls, and the $ret['#finished'] return value
* to provide feedback regarding completion level.
*
- * See the batch operations page for more information on how to use the batch API:
+ * See the batch operations page for more information on how to use the batch API:
* @link http://drupal.org/node/146843 http://drupal.org/node/146843 @endlink
*
* @return An array with the results of the calls to update_sql(). An upate
@@ -1611,11 +1611,11 @@ function hook_update_N(&$sandbox = NULL) {
$ret = array();
db_add_field($ret, 'mytable1', 'newcol', array('type' => 'int', 'not null' => TRUE, 'description' => 'My new integer column.'));
return $ret;
-
- // However, for more complex operations that may take a long time,
+
+ // However, for more complex operations that may take a long time,
// you may hook into Batch API as in the following example.
$ret = array();
-
+
// Update 3 users at a time to have an exclamation point after their names.
// (They're really happy that we can do batch API in this hook!)
if (!isset($sandbox['progress'])) {
@@ -1633,13 +1633,13 @@ function hook_update_N(&$sandbox = NULL) {
foreach ($users as $user) {
$user->name .= '!';
$ret[] = update_sql("UPDATE {users} SET name = '$user->name' WHERE uid = $user->uid");
-
+
$sandbox['progress']++;
$sandbox['current_uid'] = $user->uid;
}
$ret['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);
-
+
return $ret;
}
diff --git a/modules/system/system.install b/modules/system/system.install
index bce67a59e..483d6098a 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2582,9 +2582,9 @@ function system_update_6043() {
db_add_index($ret, 'history', 'nid', array('nid'));
// Change length of theme field in {blocks} to be consistent with module, and
// to avoid a MySQL error regarding a too-long index. Also add new indices.
- db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
- 'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
- 'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
+ db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), array(
+ 'unique keys' => array('tmd' => array('theme', 'module', 'delta')),
+ 'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'))));
db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
// Improve filter module indices.
db_drop_index($ret, 'filters', 'weight');
@@ -2626,8 +2626,8 @@ function system_update_6043() {
if (db_table_exists('profile_values')) {
db_drop_index($ret, 'profile_values', 'uid');
db_drop_index($ret, 'profile_values', 'fid');
- db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
- db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
+ db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), array('indexes' => array('fid' => array('fid'))));
+ db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
db_add_primary_key($ret, 'profile_values', array('uid', 'fid'));
}
// Alter a statistics module table to add an index.
@@ -2941,7 +2941,7 @@ function system_update_7004(&$sandbox) {
foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) {
// Only do the update if the old block actually exists.
- $block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta",array(
+ $block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta", array(
':module' => $module,
':delta' => $old_delta,
))
@@ -3345,7 +3345,7 @@ function system_update_7020() {
*/
function system_update_7021() {
$ret = array();
-
+
// Collect a list of themes with blocks.
$themes_with_blocks = array();
$result = db_query("SELECT s.name FROM {system} s INNER JOIN {block} b ON s.name = b.theme WHERE s.type = 'theme' GROUP by s.name");
@@ -3366,7 +3366,7 @@ function system_update_7021() {
}
drupal_set_message('The contact form information setting was migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
}
-
+
// Migrate user help setting.
if ($user_help = variable_get('user_registration_help', '')) {
$bid = db_insert('box')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute();
@@ -3376,7 +3376,7 @@ function system_update_7021() {
}
drupal_set_message('The user registration guidelines were migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
}
-
+
// Migrate site mission setting.
if ($mission = variable_get('site_mission')) {
$bid = db_insert('box')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute();
@@ -3394,20 +3394,20 @@ function system_update_7021() {
$bid = db_insert('box')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute();
foreach ($themes_with_blocks as $theme) {
// Add site footer block for themes, which had blocks.
- // Set low weight, so the block comes early (it used to be
+ // Set low weight, so the block comes early (it used to be
// before the other blocks).
$ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, -10, 'footer', '', -1)");
}
drupal_set_message('The footer message was migrated to <a href="' . url('admin/build/block/configure/block/' . $bid) . '">a custom block</a> and set up to appear in the footer. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right. If your theme does not have a footer region, you might need to <a href="' . url('admin/build/block') . '">relocate the block</a>.');
}
-
+
// Remove the variables (even if they were saved empty on the admin interface),
// to avoid keeping clutter in the variables table.
variable_del('contact_form_information');
variable_del('user_registration_help');
variable_del('site_mission');
variable_del('site_footer');
-
+
// Rebuild theme data, so the new 'help' region is identified.
system_theme_data();
diff --git a/modules/system/system.queue.inc b/modules/system/system.queue.inc
index 9fbed26eb..1970c50c3 100644
--- a/modules/system/system.queue.inc
+++ b/modules/system/system.queue.inc
@@ -62,7 +62,7 @@ class DrupalQueue {
public static function get($name) {
static $queues;
if (!isset($queues[$name])) {
- $class = variable_get('queue_module_'. $name, 'System') . 'Queue';
+ $class = variable_get('queue_module_' . $name, 'System') . 'Queue';
$queues[$name] = new $class($name);
}
return $queues[$name];
diff --git a/modules/system/system.test b/modules/system/system.test
index d5d95fb69..e49b26e5d 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -166,7 +166,7 @@ class ModuleDependencyTestCase extends ModuleTestCase {
/**
* Attempt to enable translation module without locale enabled.
*/
- function testEnableWithoutDependency () {
+ function testEnableWithoutDependency() {
// Attempt to enable content translation without locale enabled.
$edit = array();
$edit['modules[Core][translation][enable]'] = 'translation';
@@ -208,7 +208,7 @@ class ModuleRequiredTestCase extends ModuleTestCase {
function testDisableRequired() {
$required_modules = drupal_required_modules();
$this->drupalGet('admin/build/modules');
- foreach($required_modules as $module) {
+ foreach ($required_modules as $module) {
// Check to make sure the checkbox for required module is not found.
$this->assertNoFieldByName('modules[Core][' . $module . '][enable]');
}
@@ -453,8 +453,8 @@ class AdminMetaTagTestCase extends DrupalWebTestCase {
* Verify that the meta tag HTML is generated correctly.
*/
public function testMetaTag() {
- list($version,) = explode('.', VERSION);
- $string = '<meta name="Generator" content="Drupal ' . $version. ' (http://drupal.org)" />';
+ list($version, ) = explode('.', VERSION);
+ $string = '<meta name="Generator" content="Drupal ' . $version . ' (http://drupal.org)" />';
$this->drupalGet('node');
$this->assertRaw($string, t('Fingerprinting meta tag generated correctly.'), t('System'));
}
@@ -927,7 +927,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
'node_admin_theme' => FALSE,
);
$this->drupalPost('admin/build/themes', $edit, t('Save configuration'));
-
+
$this->drupalGet('admin');
$this->assertRaw('themes/garland', t('Administration theme used on an administration page.'));
@@ -936,7 +936,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
// Reset to the default theme settings.
$this->drupalPost('admin/build/themes', array(), t('Reset to defaults'));
-
+
$this->drupalGet('admin');
$this->assertRaw('themes/garland', t('Site default theme used on administration page.'));