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

Commit

Permalink
Fix spaces in document description
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmann committed Apr 19, 2013
1 parent 6aa0a79 commit 65f81e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/class.wp-publication-archive.php
Expand Up @@ -152,9 +152,12 @@ public static function open_file() {

$publication = new WP_Publication_Archive_Item( $wp_query->post );

// Set an empty URI so we don't get an error later.
$uri = '';

if ( isset( $wp_query->query_vars['wppa_alt'] ) ) {
foreach( $publication->alternates as $alt ) {
if ( $wp_query->query_vars['wppa_alt'] == $alt['description'] ) {
if ( urldecode( $wp_query->query_vars['wppa_alt'] ) === $alt['description'] ) {
$uri = $alt['url'];
break;
}
Expand Down

0 comments on commit 65f81e4

Please sign in to comment.