Skip to content

url generated by qrcode is always going to computer with id=1 #65

@rheritahiana

Description

@rheritahiana

I am using glpi on version 9.4.5 with barcode plugins version 2.4.1
Everything seems to be working fine except from the url generated.
il always point to computer of id=1.
I am trying to check the file checkItembyInv.php to understand.
it figures out that tsis code is always redirecting to '1' instead of redirectind to computer's Id.

include ('../../../inc/includes.php');
Session::checkRight("config", UPDATE);
// To be available when plugin is not activated
Plugin::load('barcode');
Html::header(__('Barcode', 'barcode'), $_SERVER['PHP_SELF'], "config", "plugins");
$itemtype = $_GET['itemtype'];
$item = new $itemtype();
$itemInventoryNumber[] = $_GET['inventoryNumber'];
foreach ($itemInventoryNumber as $key => $value) {
   $item = $item->getFromDBByCrit(['otherserial' => $value]);
   Html::redirect($itemtype::getFormURLWithID($item));
};
Html::footer();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions