Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-251

PATCH: add_screen_item() lacks ",dynamic" in INSERT

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Frontend (F)
    • 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

            alexei Alexei Vladishev
            freak Sebastian Raible
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: