#!/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: 22 echo Examples: 'Array ( [0] => Inline control structures are not allowed ) ' echo Press ENTER to begin read edit_at_line 'CRM/Activity/BAO/Query.php' 517 edit_at_line 'CRM/Campaign/Form/Search.php' 370 edit_at_line 'CRM/Campaign/Form/Survey/TabHeader.php' 162 edit_at_line 'CRM/Campaign/Form/Survey.php' 154 edit_at_line 'CRM/Contact/BAO/Contact.php' 1156 edit_at_line 'CRM/Contact/BAO/Contact.php' 3291 edit_at_line 'CRM/Contact/Form/Contact.php' 706 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' 427 edit_at_line 'CRM/Contribute/Form/UpdateBilling.php' 430 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 313 edit_at_line 'CRM/Core/BAO/LabelFormat.php' 515 edit_at_line 'CRM/Core/I18n.php' 155 edit_at_line 'CRM/Logging/Differ.php' 184 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' 153 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