.view is all well and good, however, there isn't any protection by .htaccess.

There are two solutions here.

  1. Add an .htaccess disallowing *.view
  2. Adopt the standard views *.inc file extension

Solution 2 is probably the best considering it is in line with views/drupal coding conventions and *.inc files are already disallowed in the drupal root .htaccess file.

I've included a patch for solution 2.

CommentFileSizeAuthor
view-to-inc.patch2.64 KBdstol

Comments

mavimo’s picture

I think solution 2 can possible generate some error:

  • NAME.inc don't explain content value and NAME.view.inc can be confused whit NAME_MODULE.views.inc
  • if NAME_VIEW.inc (or NAME_VIEW.view.inc) is included the system fail (no <?php declaration on top of file)
pescetti’s picture

Version: 6.x-2.0 » 6.x-3.x-dev
Assigned: Unassigned » pescetti
Status: Active » Fixed

In the 3.x branch (the only active one) we now allow --output=files|includes|bulk with the following meaning:

  • 'files' (default) exports to individual .view files;
  • 'includes' exports to individual .inc PHP files that can be included by hook_views_default_views().
  • 'bulk' exports to STDOUT, in a format suitable for inclusion in a .module file.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.