Buzzinoffbond / phpliteadmin

Automatically exported from code.google.com/p/phpliteadmin
0 stars 0 forks source link

Browsing Views: e.g. clicking "Show" get you from "view-view" to "table-view" #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open a view
2. click "Show"

What is the expected output? What do you see instead?
Expected: Same page opens.
Actual: "Edit" and "delete" links appear like for a table.

What version of the product are you using?
PLA 1.9.4 r352 (and prior)

Please provide any additional information below.

This issue was e-mailed to me by Lonnie (who could not open an issue because he 
has no google account). He also attached a patch which I attach here to the 
issue (based on a custom version of 1.9.3.3). Thanks a lot!

I will have a look at this.

The problem is that the GET-parameter "view=1" is not kept across links/forms. 
Lonnie's patch adds the parameter.

I will have a look at this, but I think we should probably drop the "view=1" 
parameter completely and rather detect whether it is a view or table. But maybe 
we do a quick fix for 1.9.4 and a better fix next.

Original issue reported on code.google.com by crazy4ch...@gmail.com on 12 Mar 2013 at 4:21

Attachments:

GoogleCodeExporter commented 9 years ago
It is especially bad that we use a GET parameter called "view" for this as 
"view" is used with different semantics on the db-level (like view=export or 
view=sql).
I think we should remove view=1 completely and instead _detect_ if it's a table 
or view.

Original comment by crazy4ch...@gmail.com on 13 Mar 2013 at 5:40

GoogleCodeExporter commented 9 years ago
As this is spread all over the code we probably better do a quick fix for 1.9.4 
like the patch above, otherwise we will only introduce new bugs.

But we should definitely have a look at view=1. There is loads of redundant 
code in there that could be removed together with the parameter.

Original comment by crazy4ch...@gmail.com on 14 Mar 2013 at 12:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r363.

Original comment by crazy4ch...@gmail.com on 17 Mar 2013 at 11:05

GoogleCodeExporter commented 9 years ago
Okay, I fixed this in SVN very similar to the patch attached above.
Another thing I fixed:
If a view is empty (no rows), PLA proposed to insert new rows, which won't work 
and the link also did not include the view=1 parameter. I removed this proposal 
(if it's a view).

I will open another issue proposing the removal of view=1 alltogether.

Original comment by crazy4ch...@gmail.com on 17 Mar 2013 at 11:08