2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
watchdog('actions',format_plural($count,'One orphaned action (%orphans) exists in the actions table. !link','@count orphaned actions (%orphans) exist in the actions table. !link',array('@count'=>$count,'%orphans'=>$orphans,'!link'=>$link),'warning'));
}
/**
* Test the configuration of advanced actions through the administration
* interface.
*/
functiontestActionConfiguration(){
// Create a user with permission to view the actions administration pages.
// Make sure that the new complex action was saved properly.
$this->assertText(t('The action has been successfully saved.'),t("Make sure we get a confirmation that we've successfully saved the complex action."));
$this->assertText($action_description,t("Make sure the action description appears on the configuration page after we've saved the complex action."));
// Make another POST request to the action edit page.
$this->assertText(t('The action has been successfully saved.'),t("Make sure we get a confirmation that we've successfully updated the complex action."));
$this->assertNoText($action_description,t("Make sure the old action description does NOT appear on the configuration page after we've updated the complex action."));
$this->assertText($new_action_description,t("Make sure the action description appears on the configuration page after we've updated the complex action."));
$this->assertNoText($new_action_description,t("Make sure the action description does not appear on the overview page after we've deleted the action."));
$exists=db_result(db_query("SELECT aid FROM {actions} WHERE callback = 'drupal_goto_action'"));
$this->assertFalse($exists,t('Make sure the action is gone from the database after being deleted.'));
}
}
/**
* Save an action and its associated user-supplied parameter values to the database.
*
* @param $function
* The name of the function to be called when this action is performed.
* @param $params
* An associative array with parameter names as keys and parameter values
* as values.
* @param $desc
* A user-supplied description of this particular action, e.g., 'Send
* e-mail to Jim'.
* @param $aid
* The ID of this action. If omitted, a new action is created.
db_query("UPDATE {actions} SET callback = '%s', type = '%s', parameters = '%s', description = '%s' WHERE aid = %d",$function,$type,$serialized,$desc,$aid);