diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index ba5b4fd9..8546d908 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -759,12 +759,12 @@ function expire_gnusocial_posts { echo "\$password=shell_exec('${PROJECT_NAME}-pass -u root -a mariadb');" >> $gnusocial_expire_posts_script echo "\$database=\"${gnusocial_type}\";" >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script - echo 'if (!$link = mysql_connect("localhost", $username, $password)) {' >> $gnusocial_expire_posts_script + echo 'if (!$link = mysqli_connect("localhost", $username, $password)) {' >> $gnusocial_expire_posts_script echo ' echo "Could not connect to mariadb";' >> $gnusocial_expire_posts_script echo ' exit;' >> $gnusocial_expire_posts_script echo '}' >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script - echo 'if (!mysql_select_db($database, $link)) {' >> $gnusocial_expire_posts_script + echo 'if (!mysqli_select_db($link, $database)) {' >> $gnusocial_expire_posts_script echo " echo \"Could not select ${gnusocial_type} database\";" >> $gnusocial_expire_posts_script echo ' exit;' >> $gnusocial_expire_posts_script echo '}' >> $gnusocial_expire_posts_script @@ -774,15 +774,15 @@ function expire_gnusocial_posts { echo "\$reply_query=\"DELETE FROM reply WHERE modified <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script echo "\$notification_query=\"DELETE FROM qvitternotification WHERE created <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script - echo 'mysql_query($notice_query);' >> $gnusocial_expire_posts_script - echo '$rowaff1=mysql_affected_rows();' >> $gnusocial_expire_posts_script - echo 'mysql_query($conversation_query);' >> $gnusocial_expire_posts_script - echo '$rowaff2=mysql_affected_rows();' >> $gnusocial_expire_posts_script - echo 'mysql_query($reply_query);' >> $gnusocial_expire_posts_script - echo '$rowaff3=mysql_affected_rows();' >> $gnusocial_expire_posts_script - echo 'mysql_query($notification_query);' >> $gnusocial_expire_posts_script - echo '$rowaff4=mysql_affected_rows();' >> $gnusocial_expire_posts_script - echo 'mysql_close();' >> $gnusocial_expire_posts_script + echo 'mysqli_query($link, $notice_query);' >> $gnusocial_expire_posts_script + echo '$rowaff1=mysqli_affected_rows($link);' >> $gnusocial_expire_posts_script + echo 'mysqli_query($link, $conversation_query);' >> $gnusocial_expire_posts_script + echo '$rowaff2=mysqli_affected_rows($link);' >> $gnusocial_expire_posts_script + echo 'mysqli_query($link, $reply_query);' >> $gnusocial_expire_posts_script + echo '$rowaff3=mysqli_affected_rows($link);' >> $gnusocial_expire_posts_script + echo 'mysqli_query($link, $notification_query);' >> $gnusocial_expire_posts_script + echo '$rowaff4=mysqli_affected_rows($link);' >> $gnusocial_expire_posts_script + echo 'mysqli_close($link);' >> $gnusocial_expire_posts_script echo '' >> $gnusocial_expire_posts_script echo -n "echo \"Expire ${gnusocial_type} posts: " >> $gnusocial_expire_posts_script echo '$rowaff1 notices, $rowaff2 conversations, $rowaff3 replies, and $rowaff4 qvitter notifications deleted from database.\n";' >> $gnusocial_expire_posts_script