From fa8cf4d15f95b0d3db90311c252b2398e9e51345 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 19 Jan 2011 23:41:41 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20to=20"Format=20SQL"=20Bundle=20comm?= =?UTF-8?q?and=20to=20display=20once=20an=20alert=20for=20the=20very=20fir?= =?UTF-8?q?st=20usage=20that=20this=20command=20sends=20the=20SQL=20statem?= =?UTF-8?q?ent(s)=20to=20an=20online=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Default Bundles/Format SQL.spBundle/command.plist | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SharedSupport/Default Bundles/Format SQL.spBundle/command.plist b/SharedSupport/Default Bundles/Format SQL.spBundle/command.plist index f6472de5..1459d7a6 100644 --- a/SharedSupport/Default Bundles/Format SQL.spBundle/command.plist +++ b/SharedSupport/Default Bundles/Format SQL.spBundle/command.plist @@ -23,6 +23,17 @@ if [ $connected -eq "0" ]; then exit $SP_BUNDLE_EXIT_SHOW_AS_HTML_TOOLTIP fi +# show info alert about sending the SQL statements to an online service +if [ ! -e infoShowed ]; then + touch infoShowed + osascript -e 'tell app "Sequel Pro" to display dialog "This command will send the SQL statement(s) - unencrypted - to an online service (http://www.dpriver.com). Please consider this before sending confidential data!\n\nThis message will only be displayed once." with icon caution' 2> 1 + if [ `cat 1 | wc -c` -ne 0 ]; then + rm -f 1 + exit $SP_BUNDLE_EXIT_NONE + fi + rm -f 1 +fi + # send SQL to www.dpriver.com and replace the formatted SQL string in first responder; if a parser error occurred # show error message and try to jump to the error cat <<HTML -- cgit v1.2.3