Commit 806d0a3d authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#156910 by asimmonds: fix code indentation problems introduced with new code...

#156910 by asimmonds: fix code indentation problems introduced with new code in this development cycle; only whitespace changes
parent b9c40a52
......@@ -45,7 +45,7 @@ function db_version() {
* Initialize a database connection.
*/
function db_connect($url) {
// Check if MySQL support is present in PHP
// Check if MySQL support is present in PHP
if (!function_exists('pg_connect')) {
drupal_maintenance_theme();
drupal_set_title('PHP PostgreSQL support not enabled');
......@@ -630,7 +630,7 @@ function _db_create_field_sql($name, $spec) {
}
if (isset($spec['not null']) && $spec['not null']) {
$sql .= ' NOT NULL';
$sql .= ' NOT NULL';
}
if (isset($spec['default'])) {
$default = is_string($spec['default']) ? "'". $spec['default'] ."'" : $spec['default'];
......
......@@ -1121,16 +1121,16 @@ function menu_tab_root_path() {
* @ingroup themeable
*/
function theme_menu_local_tasks() {
$output = '';
$output = '';
if ($primary = menu_primary_local_tasks()) {
$output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
}
if ($secondary = menu_secondary_local_tasks()) {
$output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
}
if ($primary = menu_primary_local_tasks()) {
$output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
}
if ($secondary = menu_secondary_local_tasks()) {
$output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
}
return $output;
return $output;
}
/**
......
......@@ -699,7 +699,7 @@ function install_tasks($profile, $task) {
}
}
// Found nothing to import or not foreign language, go to next task.
$task = 'finished';
$task = 'finished';
}
// We are running a batch import of interface translation files.
......
......@@ -136,7 +136,7 @@ function comment_help($path, $arg) {
return '<p>'. t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on 'edit' and then change its 'moderation status' to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, 'edit' to modify the text, and 'delete' to remove their submission.") .'</p>';
case 'admin/content/comment/settings':
return '<p>'. t("Comments can be attached to any node, and their settings are below. The display comes in two types: a 'flat list' where everything is flush to the left side, and comments come in chronological order, and a 'threaded list' where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: 'expanded', where you see both the title and the contents, and 'collapsed' where you only see the title. Preview comment forces a user to look at their comment by clicking on a 'Preview' button before they can actually add the comment.") .'</p>';
}
}
}
/**
......
......@@ -400,8 +400,8 @@ function menu_edit_menu(&$form_state, $type, $menu = array()) {
'#title' => t('Title'),
'#default_value' => $menu['title'],
'#required' => TRUE,
);
$form['description'] = array(
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#default_value' => $menu['description'],
......
......@@ -2468,13 +2468,13 @@ function node_form_submit($form, &$form_state) {
* Menu callback -- ask for confirmation of node deletion
*/
function node_delete_confirm(&$form_state, $node) {
$form['nid'] = array('#type' => 'value', '#value' => $node->nid);
$form['nid'] = array('#type' => 'value', '#value' => $node->nid);
return confirm_form($form,
t('Are you sure you want to delete %title?', array('%title' => $node->title)),
isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
t('This action cannot be undone.'),
t('Delete'), t('Cancel'));
return confirm_form($form,
t('Are you sure you want to delete %title?', array('%title' => $node->title)),
isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
t('This action cannot be undone.'),
t('Delete'), t('Cancel'));
}
/**
......
......@@ -94,8 +94,8 @@ function path_admin_delete_confirm($pid) {
if (user_access('administer url aliases')) {
$form['pid'] = array('#type' => 'value', '#value' => $pid);
$output = confirm_form($form,
t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path');
t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path');
}
return $output;
}
......
......@@ -958,9 +958,9 @@ function system_update_145() {
$themes = list_themes();
if (!array_key_exists($default_theme, $themes)) {
variable_set('theme_default', 'garland');
$default_theme = 'garland';
}
variable_set('theme_default', 'garland');
$default_theme = 'garland';
}
$ret = array();
......
......@@ -2122,15 +2122,15 @@ function system_modules_uninstall_submit($form, &$form_state) {
* Menu callback: run cron manually.
*/
function system_run_cron() {
// Run cron manually
if (drupal_cron_run()) {
drupal_set_message(t('Cron ran successfully'));
}
else {
drupal_set_message(t('Cron run failed'));
}
// Run cron manually
if (drupal_cron_run()) {
drupal_set_message(t('Cron ran successfully'));
}
else {
drupal_set_message(t('Cron run failed'));
}
drupal_goto('admin/logs/status');
drupal_goto('admin/logs/status');
}
/**
......@@ -3054,7 +3054,7 @@ function system_message_action(&$object, $context = array()) {
$variables = array(
'%site_name' => variable_get('site_name', 'Drupal'),
'%username' => $user->name ? $user->name : variable_get('anonymous', t('Anonymous')),
);
);
// This action can be called in any context, but if placeholders
// are used a node object must be present to be the source
......
......@@ -229,7 +229,7 @@ function translation_nodeapi(&$node, $op, $teaser, $page) {
}
switch ($op) {
case 'prepare':
case 'prepare':
if (empty($node->nid) && isset($_GET['translation']) && isset($_GET['language']) &&
($source_nid = $_GET['translation']) && ($language = $_GET['language']) &&
(user_access('translate content'))) {
......
......@@ -494,8 +494,8 @@ function theme_upload_attachments($files) {
$header = array(t('Attachment'), t('Size'));
$rows = array();
foreach ($files as $file) {
$file = (object)$file;
if ($file->list && empty($file->remove)) {
$file = (object)$file;
if ($file->list && empty($file->remove)) {
$href = file_create_url($file->filepath);
$text = $file->description ? $file->description : $file->filename;
$rows[] = array(l($text, $href), format_size($file->filesize));
......
......@@ -2865,7 +2865,7 @@ function user_autocomplete($string = '') {
$result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
while ($user = db_fetch_object($result)) {
$matches[$user->name] = check_plain($user->name);
}
}
}
drupal_json($matches);
......
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