#!/bin/bash ## usage: bash cleanup-Drupal.ControlStructures.InlineControlStructure.NotAllowed.sh vi ## usage: bash cleanup-Drupal.ControlStructures.InlineControlStructure.NotAllowed.sh joe [ -n "$1" ] && EDITOR="$1" if [ -z "$EDITOR" ]; then echo "Please provide parameter 1 (editor). Example: vi, joe" exit 1 fi function edit_at_line() { local f="$1" local l="$2" $EDITOR +$l "$f" } echo Process cleanup for 'Drupal.ControlStructures.InlineControlStructure.NotAllowed' echo Number of lines: 18 echo Examples: 'Array ( [0] => Inline control structures are not allowed ) ' echo Press ENTER to begin read edit_at_line 'CRM/Activity/BAO/Query.php' 524 edit_at_line 'CRM/Campaign/Form/Survey/TabHeader.php' 167 edit_at_line 'CRM/Campaign/Form/Survey.php' 154 edit_at_line 'CRM/Contact/BAO/Contact.php' 1157 edit_at_line 'CRM/Contact/BAO/Contact.php' 3292 edit_at_line 'CRM/Contact/Form/Task/Merge.php' 65 edit_at_line 'CRM/Contribute/Form/CancelSubscription.php' 331 edit_at_line 'CRM/Contribute/Form/UpdateBilling.php' 433 edit_at_line 'CRM/Contribute/Form/UpdateBilling.php' 436 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 318 edit_at_line 'CRM/Core/I18n.php' 155 edit_at_line 'CRM/Logging/Schema.php' 356 edit_at_line 'CRM/Report/BAO/Hook.php' 95 edit_at_line 'CRM/Report/BAO/Hook.php' 97 edit_at_line 'CRM/SMS/Form/Provider.php' 156 edit_at_line 'Civi/Core/Transaction/Manager.php' 156 edit_at_line 'api/v3/Generic/Setvalue.php' 25 edit_at_line 'api/v3/Generic/Setvalue.php' 71