Skip to content

Commit

Permalink
Make more room for different conflict types.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed May 24, 2019
1 parent c7fa0c1 commit cb59aa5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion devel/ballotranks.pl
Expand Up @@ -44,7 +44,7 @@
$papers[$p] = 1;
print "insert into Paper (paperId, title, authorInformation, abstract, timeSubmitted) values ($p, '$n', 'Jane\\tAuthor$p\\tauthor$p\@_.com\\t\\n', 'This is Paper $p', $now) on duplicate key update abstract=abstract;\n";
print "insert into ContactInfo (firstName, lastName, email, password) values ('Jane', 'Author$p', 'author$p\@_.com', 'x') on duplicate key update password=password;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 10) on duplicate key update conflictType=conflictType;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 65) on duplicate key update conflictType=conflictType;\n";
}

my($voternum) = @papers + 1;
Expand Down
2 changes: 1 addition & 1 deletion devel/ranktest.pl
Expand Up @@ -37,7 +37,7 @@
my($p, $t, $n) = split;
print "insert into Paper (paperId, title, authorInformation, abstract, timeSubmitted) values ($p, 'Paper $p', 'Jane\\tAuthor$p\\tauthor$p\@_.com\\t\\n', 'This is Paper $p', $now) on duplicate key update abstract=abstract;\n";
print "insert into ContactInfo (firstName, lastName, email, password) values ('Jane', 'Author$p', 'author$p\@_.com', 'x') on duplicate key update password=password;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 10) on duplicate key update conflictType=conflictType;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 65) on duplicate key update conflictType=conflictType;\n";
print "insert into PaperTag (paperId, tag, tagIndex) values ($p, '$t', $n) on duplicate key update tagIndex=$n;\n";
}

Expand Down
2 changes: 1 addition & 1 deletion devel/ranktest2.pl
Expand Up @@ -43,7 +43,7 @@
$papers[$p] = 1;
print "insert into Paper (paperId, title, authorInformation, abstract, timeSubmitted) values ($p, '$n', 'Jane\\tAuthor$p\\tauthor$p\@_.com\\t\\n', 'This is Paper $p', $now) on duplicate key update abstract=abstract;\n";
print "insert into ContactInfo (firstName, lastName, email, password) values ('Jane', 'Author$p', 'author$p\@_.com', 'x') on duplicate key update password=password;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 10) on duplicate key update conflictType=conflictType;\n";
print "insert into PaperConflict (paperId, contactId, conflictType) values ($p, (select contactId from ContactInfo where email='author$p\@_.com'), 65) on duplicate key update conflictType=conflictType;\n";
}

my($voternum) = @papers + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/conference.php
Expand Up @@ -241,7 +241,7 @@ function load_settings() {

// update schema
$this->sversion = $this->settings["allowPaperOption"];
if ($this->sversion < 212) {
if ($this->sversion < 213) {
require_once("updateschema.php");
$old_nerrors = Dbl::$nerrors;
updateSchema($this);
Expand Down
4 changes: 2 additions & 2 deletions src/init.php
Expand Up @@ -18,8 +18,8 @@
define("CONFLICT_AUTHORMARK", 2);
define("CONFLICT_MAXAUTHORMARK", 7);
define("CONFLICT_CHAIRMARK", 8);
define("CONFLICT_AUTHOR", 9);
define("CONFLICT_CONTACTAUTHOR", 10);
define("CONFLICT_AUTHOR", 64);
define("CONFLICT_CONTACTAUTHOR", 65);

define("REV_RATINGS_PC", 0);
define("REV_RATINGS_PC_EXTERNAL", 1);
Expand Down
2 changes: 1 addition & 1 deletion src/schema.sql
Expand Up @@ -510,7 +510,7 @@ CREATE TABLE `TopicInterest` (



insert into Settings (name, value) values ('allowPaperOption', 212);
insert into Settings (name, value) values ('allowPaperOption', 213);
insert into Settings (name, value) values ('setupPhase', 1);
-- there are no submissions yet
insert into Settings (name, value) values ('no_papersub', 1);
Expand Down
3 changes: 3 additions & 0 deletions src/updateschema.php
Expand Up @@ -1508,6 +1508,9 @@ function updateSchema($conf) {
$conf->ql("update Settings set name='msg.resp_instrux_0' where name='msg.resp_instrux'");
$conf->update_schema_version(212);
}
if ($conf->sversion == 212
&& $conf->ql("update PaperConflict set conflictType=(64 + conflictType - 9) where conflictType>=9 and conflictType<64"))
$conf->update_schema_version(213);

$conf->ql("delete from Settings where name='__schema_lock'");
Conf::$g = $old_conf_g;
Expand Down

0 comments on commit cb59aa5

Please sign in to comment.