Truncate username at 16 characters for scheduler statuses that connect to the database on their own

This commit is contained in:
james 2011-03-29 19:40:05 +00:00
parent 64026ed724
commit c29df673a6
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<? <?
include "../data/config.inc.php"; include "../data/config.inc.php";
mysql_connect($DBHOST,$DBUSER,$DBPASS); mysql_connect($DBHOST,substr($DBUSER,0,16),$DBPASS);
mysql_select_db($DBNAME); mysql_select_db($DBNAME);
$q=mysql_query("SELECT val FROM config WHERE year='0' AND var='judge_scheduler_percent'"); $q=mysql_query("SELECT val FROM config WHERE year='0' AND var='judge_scheduler_percent'");
$r=mysql_fetch_object($q); $r=mysql_fetch_object($q);

View File

@ -26,7 +26,7 @@ ogram; see the file COPYING. If not, write to
if($_GET['action'] == 'output') { if($_GET['action'] == 'output') {
include "../data/config.inc.php"; include "../data/config.inc.php";
mysql_connect($DBHOST,$DBUSER,$DBPASS); mysql_connect($DBHOST,substr($DBUSER,0,16),$DBPASS);
mysql_select_db($DBNAME); mysql_select_db($DBNAME);
$q=mysql_query("SELECT val FROM config WHERE year='0' AND var='tours_assigner_percent'"); $q=mysql_query("SELECT val FROM config WHERE year='0' AND var='tours_assigner_percent'");
$r=mysql_fetch_object($q); $r=mysql_fetch_object($q);