Switch query sequence
This commit is contained in:
parent
27708b3135
commit
aee80c4fb9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue