Skip to content

Commit 4bf9b7b

Browse files
committed
Plagiarism: Compilatio: enable hash to be 40 or 32 caracters because Compilatio changed -refs BT#20488
1 parent 1154647 commit 4bf9b7b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

main/inc/lib/Compilatio.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public static function getPomprankBarv31(
461461
*/
462462
public static function isMd5($hash)
463463
{
464-
return preg_match('`^[a-f0-9]{32}$`', $hash);
464+
return (preg_match('`^[a-f0-9]{32}$`', $hash) || preg_match('`^[a-f0-9]{40}$`', $hash));
465465
}
466466

467467
/**

main/install/configuration.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,7 @@
15171517
ALTER TABLE c_plagiarism_compilatio_docs drop primary key;
15181518
ALTER TABLE c_plagiarism_compilatio_docs ADD COLUMN id INT AUTO_INCREMENT NOT NULL PRIMARY KEY;
15191519
ALTER TABLE c_plagiarism_compilatio_docs CHANGE COLUMN id_doc document_id INT NOT NULL;
1520+
ALTER TABLE c_plagiarism_compilatio_docs MODIFY compilatio_id VARCHAR(40) NOT NULL;
15201521
15211522
requires extension "php-soap" sudo apt-get install php-soap
15221523
*/

0 commit comments

Comments
 (0)