diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index b06c561978..bb46d57171 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2062,11 +2062,17 @@ function delete_dir($dir) { return rmdir($dir); } +/** + * Returns 1 if the data contains a codified image (base64) + */ +function is_image_data ($data) { + return (substr($data,0,10) == "data:image"); +} + /** * Returns 1 if this is Snapshot data, 0 otherwise * Looks for two or more carriage returns. */ - function is_snapshot_data ($data) { // TODO IDEA: In the future, we can set a variable in setup @@ -2076,7 +2082,7 @@ function is_snapshot_data ($data) { $temp = array(); $count = preg_match_all ("/\n/", $data, $temp); - if ($count > 2) + if ( ($count > 2) || (is_image_data($data) ) return 1; else return 0; diff --git a/pandora_console/operation/agentes/snapshot_view.php b/pandora_console/operation/agentes/snapshot_view.php index b8b50857c2..3425464c21 100644 --- a/pandora_console/operation/agentes/snapshot_view.php +++ b/pandora_console/operation/agentes/snapshot_view.php @@ -1,102 +1,109 @@ -load_tables(); -} - -$id = get_parameter('id'); -$label = get_parameter ("label"); - -// TODO - Put ACL here -?> - -
- 0) { - $query = ui_get_url_refresh (false); - echo ''; - } - ?> - -