From aee80c4fb9eacdac6ef145daeb1070ee1b9ae290 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 3 Sep 2017 17:46:03 +0100 Subject: [PATCH] Switch query sequence --- src/freedombone-utils-gnusocialtools | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 661d5fe4..ede2d653 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -563,6 +563,9 @@ function gnusocial_block_user_script { echo "nickname=\$(echo \"\$remove_user\" | awk -F '@' '{print \$1}')" >> /usr/bin/gnusocial-delete-user echo "remove_domain=\$(echo \"\$remove_user\" | awk -F '@' '{print \$2}')" >> /usr/bin/gnusocial-delete-user echo '' >> /usr/bin/gnusocial-delete-user + echo "database_query=\"delete from notice where content REGEXP '\@\${remove_user}';\"" >> /usr/bin/gnusocial-delete-user + echo 'mysql -u root --password="$MARIADB_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/gnusocial-delete-user + echo '' >> /usr/bin/gnusocial-delete-user echo 'database_query="select profile.id from profile where nickname = '"'"'${nickname}'"'"' and profileurl like '"'"'%${remove_domain}%'"'"';"' >> /usr/bin/gnusocial-delete-user echo 'declare -a ids=$(mysql -u root --password="$MARIADB_PASSWORD" << EOF' >> /usr/bin/gnusocial-delete-user echo 'use $database_name;' >> /usr/bin/gnusocial-delete-user @@ -611,9 +614,6 @@ function gnusocial_block_user_script { echo '' >> /usr/bin/gnusocial-delete-user echo ' database_query="delete from qvitternotification where to_profile_id=${id} or from_profile_id=${id};"' >> /usr/bin/gnusocial-delete-user echo ' mysql -u root --password="$MARIADB_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/gnusocial-delete-user - echo '' >> /usr/bin/gnusocial-delete-user - echo " database_query=\"delete from notice where content REGEXP '\@\${remove_user}';\"" >> /usr/bin/gnusocial-delete-user - echo ' mysql -u root --password="$MARIADB_PASSWORD" -e "$database_query" $database_name' >> /usr/bin/gnusocial-delete-user echo ' fi' >> /usr/bin/gnusocial-delete-user echo ' ctr=$((ctr + 1))' >> /usr/bin/gnusocial-delete-user echo 'done' >> /usr/bin/gnusocial-delete-user