[development] Check if files is empty

Johan Forngren johan at forngren.com
Mon Apr 23 15:28:27 UTC 2007


You have perhaps misunderstood the purpose of the patch. During the upgrade
to Drupal 6 it will attempt to see if any files hosted inside the files
within that Drupal installation and if not; the default files folder will be
changed. Otherwise, all files will remain the same.

On 4/23/07, KevinImNotSpacey <kevin.amerson at gmail.com> wrote:
>
> That's interesting! dang.  We have a single site install and symlink the
> files off to a NAS, now it would be really annoying if some script attempted
> to move those files off the NAS simply because we left the default files/
> folder.
>
> Perhaps this has been over-engineered at this point.  Some people have
> multi-site installs, some people don't.  There is already a warning that
> shows if Drupal thinks there is a problem with the files folder, maybe just
> add a note to that which states: Hey if you have a multi-site install
> consider doing this really cool thing over here.  Then provide them with a
> helper link to a function which sets up that really cool thing.
>
> Kevin
>
> On 4/23/07, Johan Forngren <johan at forngren.com> wrote:
> >
> > Hi all,
> >
> > I need help with turning this query into something useful
> >
> > SELECT fid FROM {files} WHERE filepath LIKE 'files/%' LIMIT 1
> >
> > if (count(db_fetch_object(db _query("SELECT fid FROM {files} WHERE
> > filepath LIKE 'files/%' LIMIT 1"))) == 1) {
> >
> > The purpose is to determine if there is some files within the dir
> > 'files' registered in the db. I'm stuck at the db_* stuff, any help would be
> > greatly appreciated. See also http://drupal.org/node/98824 .
> >
> > Thank you
> >
> > --
> > Regards,
> >   Johan Forngren
> >
> >    johan at forngren.com :: http://johan.forngren.com/
>
>
>


-- 
Regards,
  Johan Forngren

  johan at forngren.com :: http://johan.forngren.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070423/da26e0a8/attachment-0001.htm 


More information about the development mailing list