diff --git a/ag/include/clan_fights.inc.php b/ag/include/clan_fights.inc.php
index 1ab2a00..af65502 100644
--- a/ag/include/clan_fights.inc.php
+++ b/ag/include/clan_fights.inc.php
@@ -529,15 +529,25 @@ function isClanLocked($clanid) {
// INSERT
$sql = 'INSERT INTO clan_locked(clanid, locked_until) values('.$clanid.', TIMESTAMPADD(HOUR, 24, CURRENT_TIMESTAMP))';
// echo $sql.'
';
- mysql_query($sql);
+ $res = mysql_query($sql);
+ if(!$res)
+ echo $sql . '
';
mysql_query('UPDATE clan_challenge_requests SET active = FALSE WHERE (clan_challenged = '.$clanid.' OR clan_requester = '.$clanid);
mysql_query('DELETE FROM clan_challenges WHERE calculated = FALSE AND clan_challenge_id IN (SELECT clan_challenge_id from clan_challenge_clans WHERE clan_id = '.$clanid.')');
} else if($lock['members'] < MIN_MEMBERS){ // we have to update the actual row
// UPDATE
$sql = 'UPDATE clan_locked set locked_until = TIMESTAMPADD(HOUR, 24, CURRENT_TIMESTAMP) WHERE clanid = ' .$clanid;
// echo $sql.'
';
- mysql_query($sql);
+ $res = mysql_query($sql);
+ if(!$res)
+ echo $sql . '
';
}
+ } else if($lock['members'] < MIN_MEMBERS) {
+ $sql = 'UPDATE clan_locked set locked_until = TIMESTAMPADD(HOUR, 24, CURRENT_TIMESTAMP) WHERE clanid = ' .$clanid;
+ // echo $sql.'
';
+ $res = mysql_query($sql);
+ if(!$res)
+ echo $sql . '
';
}
return true;
}