[development] Files table includes file_directory_path

Khalid Baheyeldin kb at 2bits.com
Fri Jul 17 16:37:52 UTC 2009


On Thu, Jul 16, 2009 at 10:50 AM, Adrian Rossouw <adrian at daemon.co.za>wrote:

>
> On 16 Jul 2009, at 4:16 PM, Khalid Baheyeldin wrote:
>
>  As others said, you either use symlinks (which forces you to have two
>> directories per site), or the new sites.php feature of Drupal 7.
>>
>> Using that, you can have a contrived name for each site (even site1,
>> site2, or an md5 hash for each site), and redirect the site in it.
>>
>> The trick is to not use sites/default for each site from now on, and only
>> use a unique identifier. That identifier can be the same when you develop
>> the site, and remains the same when you deploy the site.
>>
>
> Just because a work around exists doesn't mean the current behaviour isn't
> wrong.
>
> What are the reasons for the files not being relative ?
>

Relative or absolute can be debated. I think that relative is more elegant
and more portable.

But this is for stuff in the files table only. Once you publish a site and
you reference static things in it as <img src="/sites/
site1.example.com/files/blah.jpg" /> you are stuck with that path.

The sites.php method avoids this. You can have sites/12345/files/blah.jpg,
and it is no longer dependent on the domain name. Development and testing
can happen to the same path.

So, yes, I agree that relative is better, but it does not solve all the
issues that sites.php does.
-- 
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090717/7d1755e5/attachment.htm>


More information about the development mailing list