EPrints Technical Mailing List Archive
Message: #04808
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Possible bug in title_duplicates script?
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Possible bug in title_duplicates script?
- From: George Mamalakis <mamalos@eng.auth.gr>
- Date: Tue, 29 Sep 2015 16:23:07 +0300
Hello everyone, I'm trying to see if the autocompletion feature works OK with my multilang fields (like title), and by inspecting script's code, I saw this in lines 70-80: my $sql = "SELECT $Q_id" . " FROM $Q_table" . " WHERE "; if ($dataset_name eq "eprint") { $sql .= " $Q_eprint_status=" . $db->quote_value( "archive" ); } $sql .= " AND $Q_id!=$id" . " AND $Q_field_name IS NOT NULL" . " AND $Q_field_name " . $db->sql_LIKE() . $db->quote_value( EPrints::Database::prep_like_value( $q ) . '%' ); As we can see, and if I'm not terribly mistaken, if $dataset_name neq "eprint", then the SQL WHERE statement is immediately followed by an AND statement, which would cause SQL to fail. Am I missing something here or is it really a potential bug on non records not belonging to the "eprint" dataset (not sure how it would be triggered though)? -- George Mamalakis IT and Security Officer, Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki), PhD (Aristotle Univ. of Thessaloniki), MSc (Imperial College of London) School of Electrical and Computer Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379 |
- References:
- [EP-tech] Intermittent altmetric box?
- From: Meghan Jones <M.Jones3@brighton.ac.uk>
- [EP-tech] Antwort: Intermittent altmetric box?
- From: martin.braendle@id.uzh.ch
- [EP-tech] Intermittent altmetric box?
- Prev by Date: [EP-tech] Antwort: Intermittent altmetric box?
- Next by Date: [EP-tech] Re: How to set a field to be multilang (autocomplete)
- Previous by thread: [EP-tech] Antwort: Intermittent altmetric box?
- Next by thread: [EP-tech] Re: Possible bug in title_duplicates script?
- Index(es):