webbuild-cgi: social log exception for "autodist" when WEBBUILD_URL is set at localhost

This commit is contained in:
Silvan 2024-04-22 00:35:00 +02:00
parent 9fc3f8373c
commit 506e531ec8

View File

@ -204,7 +204,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshsocial" -o ! "$USER" ]; then
SID=0 SID=0
if [ ! "$FROMID" -o "$FROMID" = "0" -o "$FROMID" = "NaN" ]; then if [ ! "$FROMID" -o "$FROMID" = "0" -o "$FROMID" = "NaN" ]; then
# Find id of last row - 25 # Find id of last row - 25
if [ "$WEBBUILD_URL" -a "$USER" ]; then if [ "$USER" -a "$USER" != "autodist" ]; then
LASTID_QUERY="SELECT id FROM (SELECT id FROM social_log WHERE user!='$USER' ORDER BY id DESC LIMIT 25) sub ORDER BY id ASC LIMIT 1;" LASTID_QUERY="SELECT id FROM (SELECT id FROM social_log WHERE user!='$USER' ORDER BY id DESC LIMIT 25) sub ORDER BY id ASC LIMIT 1;"
else else
LASTID_QUERY="SELECT id FROM (SELECT id FROM social_log WHERE target!='developers' ORDER BY id DESC LIMIT 25) sub ORDER BY id ASC LIMIT 1;" LASTID_QUERY="SELECT id FROM (SELECT id FROM social_log WHERE target!='developers' ORDER BY id DESC LIMIT 25) sub ORDER BY id ASC LIMIT 1;"