diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-08-22 14:39:03 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-08-22 14:39:03 +0000 |
| commit | fc7990c62d85fdebef4a438a1fbc9d69a3710d55 (patch) | |
| tree | ba6e1a305b0e63fbeb719e1a682c8e5e578b726e /boca-1.5.0/src/db.php | |
| parent | 059e2fdcf0cef7e3594a66e21b3fd682ac736856 (diff) | |
| download | boca-fc7990c62d85fdebef4a438a1fbc9d69a3710d55.tar.gz boca-fc7990c62d85fdebef4a438a1fbc9d69a3710d55.zip | |
small bug fixes, inclusion of file size limit configurable
Diffstat (limited to 'boca-1.5.0/src/db.php')
| -rw-r--r-- | boca-1.5.0/src/db.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/boca-1.5.0/src/db.php b/boca-1.5.0/src/db.php index da83707..6d437dc 100644 --- a/boca-1.5.0/src/db.php +++ b/boca-1.5.0/src/db.php @@ -163,7 +163,8 @@ function DBConnect($forcenew=false) { "Is it running? Is the DB password in conf.php correct?"); exit; } - DBExecNonStop($conn,"SET NAMES '${conf["dbclientenc"]}'","set client encoding"); + if(isset($conf["dbclientenc"])) + DBExecNonStop($conn,"SET NAMES '${conf["dbclientenc"]}'","set client encoding"); return $conn; } //fecha a conexao com o banco (isso nao eh realmente necessario, ja que o php/apache cuidam do servico) @@ -267,7 +268,10 @@ function DBCreateDatabase() { MSGError("Unable to connect to template1 as ".$conf["dbsuperuser"]); exit; } - $r = DBExec($conn, "create database ${conf["dbname"]} with encoding = '${conf["dbencoding"]}'", "DBCreateDatabase(create)"); + if(isset($conf["dbencoding"])) + $r = DBExec($conn, "create database ${conf["dbname"]} with encoding = '${conf["dbencoding"]}'", "DBCreateDatabase(create)"); + else + $r = DBExec($conn, "create database ${conf["dbname"]} with encoding = 'UTF8'", "DBCreateDatabase(create)"); } function DBcrc($contest,$id, $c=null) { |