Skip to content

Commit

Permalink
NEW Can disable a module by renaming dir of module into module.disabled
Browse files Browse the repository at this point in the history
(this save time for maintenance when working with FTP).
  • Loading branch information
eldy committed May 2, 2016
1 parent 5823055 commit df4afdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htdocs/core/lib/functions2.lib.php
Expand Up @@ -71,7 +71,8 @@ function jsUnEscape($source)


/**
* Return list of modules directories
* Return list of modules directories. We detect directories that contains a subdirectory /core/modules
* We discard directory modules that contains 'disabled' into their name.
*
* @param string $subdir Sub directory (Example: '/mailings')
* @return array Array of directories that can contains module descriptors
Expand All @@ -95,6 +96,8 @@ function dolGetModulesDirs($subdir='')
{
while (($file = readdir($handle))!==false)
{
if (preg_match('/disabled/',$file)) continue; // We discard module if it contains disabled into name.

if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
{
if (is_dir($dirroot . '/' . $file . '/core/modules'.$subdir.'/'))
Expand Down

0 comments on commit df4afdd

Please sign in to comment.