Author: jablko
Date: Fri Aug 28 19:14:47 2009
New Revision: 3115

Log:
Try taking advantage of image_path() helper for digital object URL, even though 
the digital object might not be an image. Because the path starts with /, 
image_path() will interpret it as relative to the web directory. As long as the 
path has an extension, image_path() won't add one.

Modified:
   trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
   trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php 
Fri Aug 28 18:20:51 2009        (r3114)
+++ trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php 
Fri Aug 28 19:14:47 2009        (r3115)
@@ -37,14 +37,5 @@
 
     // add MODS specific commands
     $this->modsTypes = QubitMods::getTypes($this->informationObject);
-    if ($digitalObject = $this->informationObject->getDigitalObject())
-    {
-      $this->locationUrl = 
'http://'.$request->getHost().$request->getRelativeUrlRoot().$digitalObject->getFullPath();
-    }
-    else
-    {
-      $this->locationUrl = null;
-    }
-
   }
 }

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 18:20:51 2009        (r3114)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 19:14:47 2009        (r3115)
@@ -127,7 +127,7 @@
 
 <?php if (isset($digitalObject)): ?>
   <tr><th><?php echo __('URL') ?></th>
-  <td><?php echo link_to($locationUrl, $locationUrl) ?></td>
+  <td><?php echo 
link_to(image_path($informationObject->digitalObject->getFullPath(), true)) 
?></td>
   </tr>
 <?php endif; ?>
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to