Ticket #472 (closed enhancement: fixed)
Invalid URLs are created by MetaAddEditLinkColumn when using QueryString argument type and existing url already has query string parameters
| Reported by: | vex | Owned by: | somebody |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.1.2 |
| Component: | Codegen | Version: | 1.1.1 Stable |
| Keywords: | codegen, datagrid | Cc: |
Description
When using QMetaControlArgumentType::QueryString? url's rather than pathinfo, and using a datagrid with an edit button, the resulting URL that MetaAddEditLinkColumn? creates is invalid if the existing querystring already contains query parameters. Example:
<?php
$this->dtgUsers->MetaAddEditLinkColumn('index.php?page=edit_user', 'Edit', 'Edit', QMetaControlArgumentType::QueryString);
?>
Results in the Edit button having the URL of index.php?page=edit_user?intId=6
To fix this meta_add_edit_column.tpl needs to be modified to check whether the URL string already has existing parameters or not.
I've included a patch file for includes/qcubed/_core/codegen/templates/db_orm/meta_datagrid/meta_add_edit_column.tpl with the necessary change (not sure what patch file format it should be though!).
