Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
*6876* Galleys uploaded in Firefox not indexed for search
Browse files Browse the repository at this point in the history
  • Loading branch information
mfelczak committed Sep 9, 2011
1 parent ce5d8fb commit 7487982
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
56 changes: 52 additions & 4 deletions dbscripts/xml/upgrade/2.3.4_update.xml
Expand Up @@ -12,16 +12,64 @@
-->

<data>
<!-- Bug #6876: PDF galleys not indexed for search -->
<!-- Bug #6876: Galleys uploaded in Firefox not indexed for search -->
<sql>
<!-- Syntax for MySQL. -->
<query driver="mysql">
UPDATE paper_files SET file_type = 'application/pdf' WHERE original_file_name RLIKE 'pdf'
UPDATE paper_files SET file_type = 'application/pdf' WHERE original_file_name RLIKE '\\.pdf$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/msword' WHERE original_file_name RLIKE '\\.doc$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/vnd.ms-powerpoint' WHERE original_file_name RLIKE '\\.ppt$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/vnd.ms-powerpoint' WHERE original_file_name RLIKE '\\.pps$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' WHERE original_file_name RLIKE '\\.docx$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' WHERE original_file_name RLIKE '\\.pptx$'
</query>

<query driver="mysql">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' WHERE original_file_name RLIKE '\\.ppsx$'
</query>

<!-- Syntax for PostgreSQL. -->
<query driver="postgres7">
UPDATE paper_files SET file_type = 'application/pdf' WHERE original_file_name ILIKE '%pdf'
<query driver="postgres">
UPDATE paper_files SET file_type = 'application/pdf' WHERE original_file_name ~* '.pdf$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/msword' WHERE original_file_name ~* '.doc$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/vnd.ms-powerpoint' WHERE original_file_name ~* '.ppt$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/vnd.ms-powerpoint' WHERE original_file_name ~* '.pps$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' WHERE original_file_name ~* '.docx$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' WHERE original_file_name ~* '.pptx$'
</query>

<query driver="postgres">
UPDATE paper_files SET file_type = 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' WHERE original_file_name ~* '.ppsx$'
</query>

</sql>
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp

0 comments on commit 7487982

Please sign in to comment.