From 444ee53e0dd3eaf7a4c253d14bac3e67ce204c1b Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov Date: Thu, 11 Apr 2013 13:01:53 +0200 Subject: [PATCH] removed the htmlindex rule as the JED doesn't require it anymore --- .../com_jedchecker/controllers/index.html | 1 - .../components/com_jedchecker/index.html | 1 - .../com_jedchecker/libraries/index.html | 1 - .../libraries/rules/htmlindexes.ini | 10 -- .../libraries/rules/htmlindexes.php | 111 ------------------ .../com_jedchecker/libraries/rules/index.html | 1 - .../com_jedchecker/models/index.html | 1 - .../com_jedchecker/views/index.html | 1 - .../com_jedchecker/views/uploads/index.html | 1 - .../views/uploads/tmpl/index.html | 1 - source/media/com_jedchecker/css/index.html | 1 - source/media/com_jedchecker/icons/index.html | 1 - source/media/com_jedchecker/index.html | 1 - source/media/com_jedchecker/js/index.html | 1 - 14 files changed, 133 deletions(-) delete mode 100644 source/administrator/components/com_jedchecker/controllers/index.html delete mode 100644 source/administrator/components/com_jedchecker/index.html delete mode 100644 source/administrator/components/com_jedchecker/libraries/index.html delete mode 100644 source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.ini delete mode 100644 source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.php delete mode 100644 source/administrator/components/com_jedchecker/libraries/rules/index.html delete mode 100644 source/administrator/components/com_jedchecker/models/index.html delete mode 100644 source/administrator/components/com_jedchecker/views/index.html delete mode 100644 source/administrator/components/com_jedchecker/views/uploads/index.html delete mode 100644 source/administrator/components/com_jedchecker/views/uploads/tmpl/index.html delete mode 100644 source/media/com_jedchecker/css/index.html delete mode 100644 source/media/com_jedchecker/icons/index.html delete mode 100644 source/media/com_jedchecker/index.html delete mode 100644 source/media/com_jedchecker/js/index.html diff --git a/source/administrator/components/com_jedchecker/controllers/index.html b/source/administrator/components/com_jedchecker/controllers/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/controllers/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/index.html b/source/administrator/components/com_jedchecker/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/libraries/index.html b/source/administrator/components/com_jedchecker/libraries/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/libraries/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.ini b/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.ini deleted file mode 100644 index c675602..0000000 --- a/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.ini +++ /dev/null @@ -1,10 +0,0 @@ -; This is the configuration file of the HTLM indexes rule. -; -; @author eaxs -; @date 07/06/2012 -; @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved. -; @license GNU General Public License version 2 or later; see LICENSE - - -; Joomla system directories -sysfolders = "administrator, components, language, language/.*, media, modules, plugins, plugins/content, plugins/editors, plugins/editors-xtd, plugins/finder, plugins/search, plugins/system, plugins/user" diff --git a/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.php b/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.php deleted file mode 100644 index 7ccd7ac..0000000 --- a/source/administrator/components/com_jedchecker/libraries/rules/htmlindexes.php +++ /dev/null @@ -1,111 +0,0 @@ -findHtml($this->basedir, 1); - - /** - * let us "merge" the 2 arrays - * If a folder has an index.html file, then the value of the folders array will be true - */ - $indexes = array_replace($this->folders, $this->indexes); - - if(count($indexes) && in_array(false, $indexes)) { - foreach($indexes as $key => $index) - { - if(!$index) { - $this->report->addError($key, 'COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND'); - } - } - } - } - - /** - * Recursively checking if each folder in the package has index.html files - * if it has it saves the info the indexes array (folder_name => true) - * + it also saves all folders names in the folders array (folder_name => false) - * @param $start - */ - public function findHtml($start, $root = 0) - { - // array of system folders (regex) - // will match paths ending with these folders - $system_folders = explode(',', $this->params->get('sysfolders')); - - // Make sure there are no spaces - array_walk($system_folders, create_function('&$v', '$v = trim($v);')); - - $iterator = new DirectoryIterator($start); - - foreach ($iterator as $file) { - if ($file->isFile()) { - continue; - } - - $path = $file->getPathname(); - - // set the path to the root start path only for first time - if ($root && $file->getFileName() == '.') { - $path = $start; - } else if ($file->isDot()) { - continue; - } else if ($file->getFileName() == '.svn') { - continue; - } - - $this->folders[$path] = true; - // only check index.html in non-system folders - if (!preg_match('#/('.implode('|', $system_folders).')$#i', str_replace('\\', '/', $path))) { - if (!file_exists($path.'/index.html')) { - $this->folders[$path] = false; - } - } else { - // set parent to true too - $this->folders[dirname($path)] = true; - } - // search in subfolders if not same as start - if ($path != $start) { - $this->findHtml($path); - } - } - } -} diff --git a/source/administrator/components/com_jedchecker/libraries/rules/index.html b/source/administrator/components/com_jedchecker/libraries/rules/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/libraries/rules/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/models/index.html b/source/administrator/components/com_jedchecker/models/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/models/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/views/index.html b/source/administrator/components/com_jedchecker/views/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/views/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/views/uploads/index.html b/source/administrator/components/com_jedchecker/views/uploads/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/views/uploads/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/administrator/components/com_jedchecker/views/uploads/tmpl/index.html b/source/administrator/components/com_jedchecker/views/uploads/tmpl/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/administrator/components/com_jedchecker/views/uploads/tmpl/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/media/com_jedchecker/css/index.html b/source/media/com_jedchecker/css/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/media/com_jedchecker/css/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/media/com_jedchecker/icons/index.html b/source/media/com_jedchecker/icons/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/media/com_jedchecker/icons/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/media/com_jedchecker/index.html b/source/media/com_jedchecker/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/media/com_jedchecker/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/source/media/com_jedchecker/js/index.html b/source/media/com_jedchecker/js/index.html deleted file mode 100644 index fa6d84e..0000000 --- a/source/media/com_jedchecker/js/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file