Commit 84e50788 authored by Jonathan Smith's avatar Jonathan Smith Committed by Jonathan Smith
Browse files

Issue #2872885 by jonathan1055: Fix coding standards in 7.x for .drush.inc,...

Issue #2872885 by jonathan1055: Fix coding standards in 7.x for .drush.inc, .edit.inc, .info and .install
parent 5507f13f
Loading
Loading
Loading
Loading
+1 −1
Changes for scheduler.drush.inc: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

/**
 * @file
 * Drush commands for Scheduler
 * Drush commands for Scheduler.
 */

/**
+3 −3
Changes for scheduler.edit.inc: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ function _scheduler_form_alter(&$form, $form_state) {
  // If this is a preview then get the values from the form, not the
  // database.
  if (isset($form_state['values']['op']) && $form_state['values']['op'] == t('Preview')) {
    $defaults = new StdClass;
    $defaults = new StdClass();
    $defaults->publish_on = $publishing_enabled ? $form_state['values']['publish_on'] : NULL;
    $defaults->unpublish_on = $unpublishing_enabled ? $form_state['values']['unpublish_on'] : NULL;
  }
@@ -40,7 +40,7 @@ function _scheduler_form_alter(&$form, $form_state) {
  }
  else {
    // Initialise standard values.
    $defaults = new StdClass;
    $defaults = new StdClass();
    // Respect presets added by functions like
    // scheduler_field_attach_prepare_translation_alter().
    $defaults->publish_on = isset($node->publish_on) ? $node->publish_on : NULL;
@@ -178,7 +178,7 @@ function _scheduler_form_alter(&$form, $form_state) {
/**
 * Callback function for the Scheduler date entry elements.
 */
function scheduler_date_value_callback(&$element, $input = FALSE, &$form_state) {
function scheduler_date_value_callback(&$element, $input, &$form_state) {
  // When processing a delete operation the user should not be forced to enter a
  // date. Hence set the scheduler date element's #required attribute to FALSE.
  // Test the input operation against $form_state['values']['delete'] as this
+0 −3
Changes for scheduler.info: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,9 +2,6 @@ name = Scheduler
description = This module allows nodes to be published and unpublished on specified dates and time.
core = 7.x
configure = admin/config/content/scheduler
files[] = scheduler.install
files[] = scheduler.module
files[] = scheduler.views.inc
files[] = scheduler_handler_field_scheduler_countdown.inc
files[] = tests/scheduler.test
files[] = tests/scheduler_api.test
+4 −3
Changes for scheduler.install: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ function scheduler_update_7100() {
    }
  }

  return format_plural(sizeof($roles_to_update), '1 role updated with view scheduled content permission.', '@count roles updated with view scheduled content permission.');
  return format_plural(count($roles_to_update), '1 role updated with view scheduled content permission.', '@count roles updated with view scheduled content permission.');
}

/**
@@ -145,11 +145,12 @@ function scheduler_update_7101() {
  if ($nids_to_delete = $query->execute()->fetchCol()) {
    db_delete('scheduler')->condition('nid', $nids_to_delete, 'IN')->execute();
  }
  return format_plural(sizeof($nids_to_delete), '1 obsolete row deleted from scheduler table.', '@count obsolete rows deleted from scheduler table.');
  return format_plural(count($nids_to_delete), '1 obsolete row deleted from scheduler table.', '@count obsolete rows deleted from scheduler table.');
}

/**
 * Function scheduler_update_7102() removed and replaced by 7103.
 *
 * @see http://www.drupal.org/node/2706119
 */

@@ -158,7 +159,7 @@ function scheduler_update_7101() {
 */
function scheduler_update_7103() {
  // Change all values of 'schedule (un)publishing of nodes' to the cleaner
  // 'schedule publishing of nodes'
  // 'schedule publishing of nodes'.
  // @see http://www.drupal.org/node/2538002

  // Updates done in two stages to avoid integrity constraint violation. First