Ticket #2645 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

Inventory 1.1.0 Module : Edit error

Reported by: yqueret Assigned to:
Priority: minor Milestone: 2.4
Component: Other Module Version: 2.4-branch
Keywords: inventory edit Cc:
Confirmation: Need Feedback Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

When edit an Inventory, there are a problem with update in database.

In fact in admin/modules/inventorydb/functions.inc.php you have an error on line 35.

function inventorydb_edit($extdisplay, $empnum, $empname, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){

must be :

function inventorydb_edit($extdisplay, $empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){

Change History

02/07/08 14:28:11 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • milestone changed from Cut Line to 2.4.

that's not the only bug. The fact that it could be in this state and never have been reported would be a good sign that this is almost never used. This is a module that had been introduced quite some time ago when there was very little thought to tossing anything into FreePBX that was put together. Not suggesting that it is bad to have a lot of modules but more scrutiny needs to be put in to what makes it in as an official module resulting in an implied support of the product by the development team.

I am inclined to take this as an indication that it may be time to move this module back into the contributed_modules repository where people can still have access to it but it is not official maintained, as it takes resources away from more critical parts of the product.

So if there is not any strong objection, we may likely do that. For now, here are the tow issues I see as a result of peeking at this, and I have barely looked:

Index: page.inventorydb.php
===================================================================
--- page.inventorydb.php        (revision 5627)
+++ page.inventorydb.php        (working copy)
@@ -74,7 +74,7 @@
                redirect_standard();
        break;
        case "edit":
-               inventorydb_edit($extdisplay, $empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo);
+               inventorydb_edit($extdisplay, $empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo);
                //needreload();
                redirect_standard('extdisplay');
        break;
Index: functions.inc.php
===================================================================
--- functions.inc.php   (revision 5627)
+++ functions.inc.php   (working copy)
@@ -32,7 +32,7 @@
        sql($sql);
 }
 
-function inventorydb_edit($extdisplay, $empnum, $empname, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){
+function inventorydb_edit($extdisplay, $empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){
        $sql="UPDATE inventorydb set empnum='$empnum' where id='$extdisplay'";
        sql($sql);
        $sql="UPDATE inventorydb set empname='$empname' where id='$extdisplay'";

r5651 (2.4) and r5652 (2.3) not yet published pending the decision if the module will be moved to contributed directory

02/09/08 15:41:53 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

I'll close this bug and we will likely deprecate this module in a future release but will include these fixes for now.