Commit 815a1ec2 authored by TuWebO's avatar TuWebO

FIX - batch delete message had wrong variable for %num.

parent b16cd0fb
......@@ -152,11 +152,13 @@ function node_authlink_batch_generate(&$form, FormStateInterface &$form_state) {
/**
* Delete authkeys for all nodes in node type.
*
* @param $form
* @param array $form
* Form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Form state.
*/
function node_authlink_batch_delete(&$form, FormStateInterface &$form_state) {
// NIDs of nodes that are in this node type
function node_authlink_batch_delete(array &$form, FormStateInterface &$form_state) {
// NIDs of nodes that are in this node type.
$query = db_select('node', 'n');
$query->leftJoin('node_authlink_nodes', 'a', 'n.nid = a.nid');
$query->fields('n', ['nid'])
......@@ -168,10 +170,9 @@ function node_authlink_batch_delete(&$form, FormStateInterface &$form_state) {
node_authlink_delete($nid);
}
drupal_set_message(t('%num authkeys has been deleted.', ['%num' => $count]));
drupal_set_message(t('%num authkeys has been deleted.', ['%num' => count($nids)]));
}
/**
* Implements hook_node_load().
*
......
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