|
14 | 14 | * |
15 | 15 | * @category Main |
16 | 16 | * @package Loris |
17 | | - * @author Various <example@example.com> |
| 17 | + * @author Loris Team <loris-dev@bic.mni.mcgill.ca> |
18 | 18 | * @license Loris license |
19 | 19 | * @link https://www.github.com/aces/Loris/ |
20 | 20 | */ |
21 | 21 |
|
22 | | -set_include_path( |
23 | | - get_include_path().":". |
24 | | - __DIR__."/../project/tools:". |
25 | | - __DIR__."/../php/tools:" |
26 | | -); |
27 | | - |
28 | | -require_once __DIR__ . "/../vendor/autoload.php"; |
29 | | -require_once "generic_includes.php"; |
| 22 | +require_once __DIR__ . "/../../../vendor/autoload.php"; |
| 23 | +require_once __DIR__ . "/../../generic_includes.php"; |
30 | 24 | use \LORIS\StudyEntities\Candidate\CandID; |
31 | 25 |
|
32 | 26 | /** |
|
82 | 76 | break; |
83 | 77 | } |
84 | 78 |
|
85 | | -$DB =& Database::singleton(); |
| 79 | +$DB = \NDB_Factory::singleton()->database(); |
86 | 80 |
|
87 | 81 | /* |
88 | 82 | * Perform validations on arguments |
@@ -135,7 +129,7 @@ function showHelp() |
135 | 129 | echo <<<USAGE |
136 | 130 | *** Delete Candidate Info *** |
137 | 131 |
|
138 | | -Usage: php delete_candidate.php delete_candidate CandID PSCID [confirm] |
| 132 | +Usage: php delete_candidate.php delete_candidate CandID PSCID [confirm] [tosql] |
139 | 133 | Example: php delete_candidate.php delete_candidate 965327 dcc0007 |
140 | 134 | Example: php delete_candidate.php delete_candidate 965327 dcc0007 confirm |
141 | 135 | Example: php delete_candidate.php delete_candidate 965327 dcc0007 tosql |
@@ -315,25 +309,25 @@ function deleteCandidate($CandID, $PSCID, $confirm, $printToSQL, $DB, &$output) |
315 | 309 | $DB->delete("parameter_candidate", ["CandID" => $CandID]); |
316 | 310 |
|
317 | 311 | //delete from SNP_candidate_rel |
318 | | - $result = $DB->delete("SNP_candidate_rel", ["CandID" => $CandID]); |
| 312 | + $DB->delete("SNP_candidate_rel", ["CandID" => $CandID]); |
319 | 313 |
|
320 | 314 | //delete from CNV |
321 | | - $result = $DB->delete("CNV", ["CandID" => $CandID]); |
| 315 | + $DB->delete("CNV", ["CandID" => $CandID]); |
322 | 316 |
|
323 | 317 | //delete from genomic_candidate_files_rel |
324 | | - $result = $DB->delete( |
| 318 | + $DB->delete( |
325 | 319 | "genomic_candidate_files_rel", |
326 | 320 | ["CandID" => $CandID] |
327 | 321 | ); |
328 | 322 |
|
329 | 323 | //delete from genomic_sample_candidate_rel |
330 | | - $result = $DB->delete( |
| 324 | + $DB->delete( |
331 | 325 | "genomic_sample_candidate_rel", |
332 | 326 | ["CandID" => $CandID] |
333 | 327 | ); |
334 | 328 |
|
335 | 329 | //delete from issues |
336 | | - $result = $DB->delete("issues", ["candID" => $CandID]); |
| 330 | + $DB->delete("issues", ["candID" => $CandID]); |
337 | 331 |
|
338 | 332 | //delete from candidate |
339 | 333 | $DB->delete("candidate", ["CandID" => $CandID]); |
|
0 commit comments