-
Incident report
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
add_screen_item() lacks ",dynamic" in INSERT.
Additionally, there seems to be a typo in include/screens.inc.php, it says $_REQUEST['dynmic'] thrice - or is this intentional?
This patch should fix both:
-------------8<-------------
— trunk/frontends/php/screenedit.php.orig (revision 5237)
+++ trunk/frontends/php/screenedit.php (working copy)
@@ -61,7 +61,7 @@
);
check_fields($fields);
- $_REQUEST['dynmic'] = get_request('dynamic',SCREEN_SIMPLE_ITEM);
+ $_REQUEST['dynamic'] = get_request('dynamic',SCREEN_SIMPLE_ITEM);
?>
<?php
show_table_header(S_CONFIGURATION_OF_SCREEN_BIG);
@@ -84,7 +84,7 @@
$_REQUEST["resourcetype"],$_REQUEST["resourceid"],$_REQUEST["width"],
$_REQUEST["height"],$_REQUEST["colspan"],$_REQUEST["rowspan"],
$_REQUEST["elements"],$_REQUEST["valign"], - $_REQUEST["halign"],$_REQUEST["style"],$_REQUEST["url"],$_REQUEST['dynmic']);
+ $_REQUEST["halign"],$_REQUEST["style"],$_REQUEST["url"],$_REQUEST['dynamic']);
show_messages($result, S_ITEM_UPDATED, S_CANNOT_UPDATE_ITEM);
}
@@ -95,7 +95,7 @@
$_REQUEST["x"],$_REQUEST["y"],$_REQUEST["resourceid"],
$_REQUEST["width"],$_REQUEST["height"],$_REQUEST["colspan"],
$_REQUEST["rowspan"],$_REQUEST["elements"],$_REQUEST["valign"],
- $_REQUEST["halign"],$_REQUEST["style"],$_REQUEST["url"],$_REQUEST['dynmic']);
+ $_REQUEST["halign"],$_REQUEST["style"],$_REQUEST["url"],$_REQUEST['dynamic']);
show_messages($result, S_ITEM_ADDED, S_CANNOT_ADD_ITEM);
}
— trunk/frontends/php/include/screens.inc.php.orig (revision 5237)
+++ trunk/frontends/php/include/screens.inc.php (working copy)
@@ -126,7 +126,7 @@
$screenitemid=get_dbid("screens_items","screenitemid");
$result=DBexecute('INSERT INTO screens_items '.
'(screenitemid,resourcetype,screenid,x,y,resourceid,width,height,'.
- ' colspan,rowspan,elements,valign,halign,style,url) '.
+ ' colspan,rowspan,elements,valign,halign,style,url,dynamic) '.
' VALUES '.
"($screenitemid,$resourcetype,$screenid,$x,$y,$resourceid,$width,$height,$colspan,".
"$rowspan,$elements,$valign,$halign,$style,".zbx_dbstr($url).",$dynamic)");
-------------8<-------------
Greetings
Sebastian