mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2010-08-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_filemanager.php: added parameter $readOnly in the function "file_explorer". *pandoradb.sql, extras/pandoradb_migrate_v3.1_to_v3.2.sql: added into the table "talert_template_modules" the column "id_policy_alerts". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3106 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
23a7e047a3
commit
33e11d7034
@ -1,3 +1,10 @@
|
|||||||
|
2010-08-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
* include/functions_filemanager.php: added parameter $readOnly in the
|
||||||
|
function "file_explorer".
|
||||||
|
|
||||||
|
*pandoradb.sql, extras/pandoradb_migrate_v3.1_to_v3.2.sql: added into the
|
||||||
|
table "talert_template_modules" the column "id_policy_alerts".
|
||||||
|
|
||||||
2010-08-05 Sergio Martin <sergio.martin@artica.es>
|
2010-08-05 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/networkmap.php: Change the default map to topology map
|
* operation/agentes/networkmap.php: Change the default map to topology map
|
||||||
|
@ -67,3 +67,8 @@ CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
|||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
|
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `id_policy_module` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `nombre`;
|
ALTER TABLE `tagente_modulo` ADD COLUMN `id_policy_module` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `nombre`;
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `talert_template_modules`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
ALTER TABLE `talert_template_modules` ADD COLUMN `id_policy_alerts` int(10) unsigned NOT NULL default '0';
|
||||||
|
@ -423,7 +423,7 @@ function read_recursive_dir($dir, $relative_path = '') {
|
|||||||
* @param string $father The directory father don't navigate bottom this.
|
* @param string $father The directory father don't navigate bottom this.
|
||||||
* @param boolean $editor The flag to set the edition of text files.
|
* @param boolean $editor The flag to set the edition of text files.
|
||||||
*/
|
*/
|
||||||
function file_explorer($real_directory, $relative_directory, $url, $father = '', $editor = false) {
|
function file_explorer($real_directory, $relative_directory, $url, $father = '', $editor = false, $readOnly = false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -606,7 +606,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
$data[4] .= print_input_hidden ('delete_file', 1, true);
|
$data[4] .= print_input_hidden ('delete_file', 1, true);
|
||||||
$data[4] .= '</form>';
|
$data[4] .= '</form>';
|
||||||
|
|
||||||
if ($editor) {
|
if (($editor) && (!$readOnly)) {
|
||||||
if ($fileinfo['mime'] == MIME_TEXT) {
|
if ($fileinfo['mime'] == MIME_TEXT) {
|
||||||
$data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
$data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
||||||
}
|
}
|
||||||
@ -617,6 +617,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$readOnly) {
|
||||||
if (is_writable ($real_directory)) {
|
if (is_writable ($real_directory)) {
|
||||||
echo "<div style='text-align: right; width: " . $table->width . ";'>";
|
echo "<div style='text-align: right; width: " . $table->width . ";'>";
|
||||||
echo "<a href='javascript:show_form_create_folder();' style='margin-right: 3px;' title='" . __('Create directory') . "'>";
|
echo "<a href='javascript:show_form_create_folder();' style='margin-right: 3px;' title='" . __('Create directory') . "'>";
|
||||||
@ -635,6 +636,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
echo "<image src='images/info.png' />" . __('The directory is only readble.');
|
echo "<image src='images/info.png' />" . __('The directory is only readble.');
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print_table ($table);
|
print_table ($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,6 +280,7 @@ CREATE TABLE IF NOT EXISTS `talert_template_modules` (
|
|||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_agent_module` int(10) unsigned NOT NULL,
|
`id_agent_module` int(10) unsigned NOT NULL,
|
||||||
`id_alert_template` int(10) unsigned NOT NULL,
|
`id_alert_template` int(10) unsigned NOT NULL,
|
||||||
|
`id_policy_alerts` int(10) unsigned NOT NULL default '0',
|
||||||
`internal_counter` int(4) default '0',
|
`internal_counter` int(4) default '0',
|
||||||
`last_fired` bigint(20) NOT NULL default '0',
|
`last_fired` bigint(20) NOT NULL default '0',
|
||||||
`last_reference` bigint(20) NOT NULL default '0',
|
`last_reference` bigint(20) NOT NULL default '0',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user