Skip to content

Commit b67f30f

Browse files
committed
DeletedContactInfo: Remove redundant entries
1 parent b89ebaf commit b67f30f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/conference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ function __load_settings() {
367367

368368
function load_settings() {
369369
$this->__load_settings();
370-
if ($this->sversion < 321) {
370+
if ($this->sversion < 322) {
371371
$old_nerrors = Dbl::$nerrors;
372372
while ((new UpdateSchema($this))->run()) {
373373
usleep(50000);

src/schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ CREATE TABLE `TopicInterest` (
659659
-- Initial settings
660660
-- (each setting must be on its own line for createdb.php/createdb.sh)
661661
insert into Settings (name, value, data) values
662-
('allowPaperOption', 321, null), -- schema version
662+
('allowPaperOption', 322, null), -- schema version
663663
('setupPhase', 1, null), -- initial user is chair
664664
('no_papersub', 1, null), -- no submissions yet
665665
('sub_pcconf', 1, null), -- collect PC conflicts, not collaborators

src/updateschema.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,6 +3267,10 @@ function run() {
32673267
&& $this->v321_correct_mimetypes("Paper")) {
32683268
$conf->update_schema_version(321);
32693269
}
3270+
if ($conf->sversion === 321
3271+
&& $conf->ql_ok("delete from DeletedContactInfo where (select email from ContactInfo where contactId=DeletedContactInfo.contactId and (cflags&8)!=0)=DeletedContactInfo.email")) {
3272+
$conf->update_schema_version(322);
3273+
}
32703274

32713275
$conf->ql_ok("delete from Settings where name='__schema_lock'");
32723276
Conf::$main = $old_conf_g;

src/useractions.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ function delete(Contact $user) {
222222
return;
223223
}
224224

225-
// insert deletion marker
226-
$this->conf->qe("insert into DeletedContactInfo set contactId=?, firstName=?, lastName=?, unaccentedName=?, email=?, affiliation=?", $user->contactId, $user->firstName, $user->lastName, $user->unaccentedName, $user->email, $user->affiliation);
227-
228225
// change cflags to mark user as deleted
229226
// also change roles (do not log roles change, as we will shortly log deletion)
230227
// and delete password

0 commit comments

Comments
 (0)