2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
* include/constants.php: added constant dir for the mibs of snmp. * include/functions_filemanager.php: cleaned source code style. * operation/snmpconsole/snmp_mib_uploader.php: fixed to avoid go upper directory to the mibs. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7654 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bba42abda7
commit
561b99fc61
|
@ -1,3 +1,12 @@
|
||||||
|
2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/constants.php: added constant dir for the mibs of snmp.
|
||||||
|
|
||||||
|
* include/functions_filemanager.php: cleaned source code style.
|
||||||
|
|
||||||
|
* operation/snmpconsole/snmp_mib_uploader.php: fixed to avoid go
|
||||||
|
upper directory to the mibs.
|
||||||
|
|
||||||
2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
|
2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_netflow.php, operation/netflow/nf_live_view.php:
|
* include/functions_netflow.php, operation/netflow/nf_live_view.php:
|
||||||
|
|
|
@ -229,4 +229,7 @@ define ('MODULE_SNMP', 2);
|
||||||
define ('MODULE_PLUGIN', 4);
|
define ('MODULE_PLUGIN', 4);
|
||||||
define ('MODULE_WMI', 6);
|
define ('MODULE_WMI', 6);
|
||||||
define ('MODULE_WEB', 7);
|
define ('MODULE_WEB', 7);
|
||||||
|
|
||||||
|
/* SNMP CONSTANTS */
|
||||||
|
define ('SNMP_DIR_MIBS', "attachment/mibs");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -367,22 +367,17 @@ if ($delete_file) {
|
||||||
*
|
*
|
||||||
* @param string $dir The dir to deletete
|
* @param string $dir The dir to deletete
|
||||||
*/
|
*/
|
||||||
function filemanager_delete_directory($dir)
|
function filemanager_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)) {
|
||||||
{
|
if (!rmdir($dir . $file)) {
|
||||||
if (!rmdir($dir . $file))
|
|
||||||
{
|
|
||||||
filemanager_delete_directory($dir . $file . '/');
|
filemanager_delete_directory($dir . $file . '/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
unlink($dir . $file);
|
unlink($dir . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -510,6 +505,7 @@ function filemanager_file_explorer($real_directory, $relative_directory, $url, $
|
||||||
$prev_dir_str .= "/";
|
$prev_dir_str .= "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (($prev_dir_str != '') && ($father != $relative_directory)) {
|
if (($prev_dir_str != '') && ($father != $relative_directory)) {
|
||||||
$table->data[0][0] = html_print_image ('images/go_previous.png', true);
|
$table->data[0][0] = html_print_image ('images/go_previous.png', true);
|
||||||
$table->data[0][1] = '<a href="' . $url . '&directory='.$prev_dir_str.'&hash2=' . md5($prev_dir_str.$config['dbpass']) . '">';
|
$table->data[0][1] = '<a href="' . $url . '&directory='.$prev_dir_str.'&hash2=' . md5($prev_dir_str.$config['dbpass']) . '">';
|
||||||
|
|
|
@ -34,7 +34,7 @@ if (isset($config['filemanager']['message'])) {
|
||||||
$config['filemanager']['message'] = null;
|
$config['filemanager']['message'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$directory = (string) get_parameter ('directory', "attachment/mibs");
|
$directory = (string) get_parameter ('directory', SNMP_DIR_MIBS);
|
||||||
|
|
||||||
/* Add custom directories here */
|
/* Add custom directories here */
|
||||||
$fallback_directory = "attachment/mibs";
|
$fallback_directory = "attachment/mibs";
|
||||||
|
@ -64,5 +64,8 @@ $real_directory = realpath ($config['homedir'] . '/' . $directory);
|
||||||
|
|
||||||
echo '<h4>' . __('Index of %s', $directory) . '</h4>';
|
echo '<h4>' . __('Index of %s', $directory) . '</h4>';
|
||||||
|
|
||||||
filemanager_file_explorer($real_directory, $directory, 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_mib_uploader');
|
filemanager_file_explorer($real_directory,
|
||||||
|
$directory,
|
||||||
|
'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_mib_uploader',
|
||||||
|
SNMP_DIR_MIBS);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue