diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-03 14:18:45 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-03 14:18:45 -0700 |
commit | f6d847739a9149531d0649bf3d38f9e30078106a (patch) | |
tree | 7843c542a6ae5a7005504b1dfbc2689896acdafc /modules/gallery/tests | |
parent | 8d5900f63956d6746a78a4bd5ac0c4f8086752bc (diff) |
Update the source so the third party code passes the File Structure Test
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r-- | modules/gallery/tests/File_Structure_Test.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php index c517bd72..06f456ff 100644 --- a/modules/gallery/tests/File_Structure_Test.php +++ b/modules/gallery/tests/File_Structure_Test.php @@ -84,6 +84,7 @@ class File_Structure_Test extends Unit_Test_Case { $expected = array("<?php defined('SYSPATH') OR die('No direct access allowed.');\n"); } else if (strpos($path, MODPATH . "forge") === 0 || strpos($path, MODPATH . "exif/lib") === 0 || + strpos($path, MODPATH . "gallery/lib/HTMLPurifier") === 0 || $path == MODPATH . "user/lib/PasswordHash.php" || $path == DOCROOT . "var/database.php") { // 3rd party module security-only preambles, similar to Gallery's @@ -136,7 +137,7 @@ class File_Structure_Test extends Unit_Test_Case { public function code_files_start_with_preamble_test() { $dir = new PhpCodeFilterIterator( - new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT))); + new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT))); $errors = array(); foreach ($dir as $file) { @@ -239,6 +240,7 @@ class GalleryCodeFilterIterator extends FilterIterator { strpos($path_name, MODPATH . "user/lib/PasswordHash") !== false || strpos($path_name, DOCROOT . "lib/swfupload") !== false || strpos($path_name, SYSPATH) !== false || + strpos($path_name, MODPATH . "gallery/libraries/HTMLPurifier") !== false || substr($path_name, -1, 1) == "~"); } } |