mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2010-07-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_filemanager.php: cleaned source code. And added function "read_recursive_dir" to give a content of dir in a array. * include/functions_config.php: added $config['collection_max_size']. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2982 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
207e8625b9
commit
8eef6915a4
@ -1,3 +1,10 @@
|
|||||||
|
2010-07-08 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_filemanager.php: cleaned source code. And added function
|
||||||
|
"read_recursive_dir" to give a content of dir in a array.
|
||||||
|
|
||||||
|
* include/functions_config.php: added $config['collection_max_size'].
|
||||||
|
|
||||||
2010-07-08 Dario Rodriguez <dario.rodriguez@artica.es>
|
2010-07-08 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* operation/agentes/networkmap.php: fixed order in combo box of zoom
|
* operation/agentes/networkmap.php: fixed order in combo box of zoom
|
||||||
|
@ -310,6 +310,10 @@ function process_config () {
|
|||||||
if (!isset ($config["gis_purge"])){
|
if (!isset ($config["gis_purge"])){
|
||||||
update_config_value ('gis_purge', 7);
|
update_config_value ('gis_purge', 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["collection_max_size"])){
|
||||||
|
update_config_value ('collection_max_size', 1000000);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*Parse the ACL IP list for access API that it's save in chunks as
|
*Parse the ACL IP list for access API that it's save in chunks as
|
||||||
|
@ -346,8 +346,8 @@ function delete_directory($dir)
|
|||||||
{
|
{
|
||||||
if ($handle = opendir($dir))
|
if ($handle = opendir($dir))
|
||||||
{
|
{
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if (($file != ".") && ($file != "..")) {
|
if (($file != ".") && ($file != "..")) {
|
||||||
|
|
||||||
if (is_dir($dir . $file))
|
if (is_dir($dir . $file))
|
||||||
{
|
{
|
||||||
@ -367,6 +367,44 @@ function delete_directory($dir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read a directory recursibly and return a array with the files with
|
||||||
|
* the absolute path and relative
|
||||||
|
*
|
||||||
|
* @param string $dir absoute dir to scan
|
||||||
|
* @param string $relative_path Relative path to scan, by default ''
|
||||||
|
*
|
||||||
|
* @return array The files in the dirs, empty array for empty dir of files.
|
||||||
|
*/
|
||||||
|
function read_recursive_dir($dir, $relative_path = '') {
|
||||||
|
$return = array();
|
||||||
|
|
||||||
|
if ($handle = opendir($dir))
|
||||||
|
{
|
||||||
|
while (false !== ($entry = readdir($handle))) {
|
||||||
|
if (($entry != ".") && ($entry != "..")) {
|
||||||
|
|
||||||
|
// debugPrint($entry);
|
||||||
|
// debugPrint($return);
|
||||||
|
|
||||||
|
if (is_dir($dir . $entry))
|
||||||
|
{
|
||||||
|
// debugPrint('dir');
|
||||||
|
$return = array_merge($return, read_recursive_dir($dir . $entry . '/', $relative_path . $entry . '/' ));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// debugPrint('file');
|
||||||
|
$return[] = array('relative' => $relative_path . $entry, 'absolute' => $dir . $entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main function to show the directories and files.
|
* The main function to show the directories and files.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user