Altough I understand that the module does not function properly in non clearn url mode, there are some things that can be done to make it work a bit better.

The url's for images generated in the webdav_listing.tpl.php are wrong for instance. If they are prefixed by '$GLOBALS['base_url']. "/". ' they link correctly to the module images in both clean and non clean url mode.

Example

    <img
      src="<?php print $GLOBALS['base_url']. "/". drupal_get_path('module', 'webdav')."/images/up.png"; ?>" /></td>

The same holds for the mime type images inside the template.

My guess is that the same holds for the files as well.

CommentFileSizeAuthor
#5 webdav-base_path_fix-375115-5.patch2.1 KBSQP

Comments

wvd_vegt’s picture

Hi,

My observation seems correct. If the template is changed a bit more the file system module works in both clean and non clean url mode.

Change (around line 70):

  <tr <?php print $count%2==0?"class='a'":""?>>
    <td><img src="<?php print $type ?>" /></td>
    <td><a href="<?php print $_item['id']?>"><?php print  $_item['name'] ?></a></td>

into:

  <tr <?php print $count%2==0?"class='a'":""?>>
    <td><img src="<?php print $type ?>" /></td>
    <td><a href="<?php print request_uri() . $_item['id']?>"><?php print  $_item['name'] ?></a></td>

and files can be access properly too. Navigating into the webdav's folders also works, navigating up still fails.

Last problem to solve is the up link.

wvd_vegt’s picture

Hi,

If up code link is changed in webdav_listing.tpl.php like below, it nicely works in both url modes.

 </tr>
    <td>
    <!--veg: 16-02-2009 Changed up link for non clean url compatibility.-->
    <?php 
      $cur = request_uri();
      if ($root['name']!='') {
        $cur = str_replace($root['name']."/","",$cur);
      } else {
         $cur =$GLOBALS['base_url'];

Note, this only holds for the browser visible inside drupal!
I just tested webdav access though windows network and that one trips on non clean url's.
Windows also seems to dislike '/drupal/' in the url for now (not sure what causes it, the webdav module or windows).

Yoran’s picture

Yep, not using clean URL is a big issue when using webdav.

About the internal browser, I'm not sure I'll keep it forever. Basicaly I less and less se the point of it. If you have any opinion I'm really interested.

Yoran’s picture

Status: Active » Closed (fixed)

feel free to open this again is your issue is not solved.

SQP’s picture

Version: 6.x-1.0-rc7 » 6.x-1.0-rc8
Category: feature » bug
Status: Closed (fixed) » Needs review
StatusFileSize
new2.1 KB

Wrong post , should have be that one

SQP’s picture

sorry, browser bug forced me reopening the issue, and I choosed the wrong one, I restore as it was

mably’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.