Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ./libraries/tbl_info.inc.php by moving it's code to Table class #12567

Closed
nijel opened this issue Sep 19, 2016 · 8 comments
Closed

Remove ./libraries/tbl_info.inc.php by moving it's code to Table class #12567

nijel opened this issue Sep 19, 2016 · 8 comments
Assignees
Milestone

Comments

@nijel
Copy link
Contributor

nijel commented Sep 19, 2016

There is ./libraries/tbl_info.inc.php which does some basic preprocessing of table information and stores it into global variables.

This code should be integrated into Table class and all callers adjusted to use Table class directly instead of relying on the global variables ./libraries/tbl_info.inc.php currently sets.

nijel added a commit that referenced this issue Sep 19, 2016
…mespace

This is just a minor cleanup to avoid possible problems when MySQL
create table options would collide with our variable names.

See also issue #12567

Signed-off-by: Michal Čihař <michal@cihar.com>
@Lakshya1605
Copy link

Hello! I am new to open source and I would like to work on this issue and start contributing.Please can someone help me get started

@nijel
Copy link
Contributor Author

nijel commented Oct 3, 2016

Look at the mentioned file and all places where it's used. You can see it currently sets dozen of global variables, where most of them are not really needed in all cases.

The work can be done in few steps:

  1. Move any functionality from this file to Table class.
  2. Migrate all uses of the data to use existing or new methods on Table class.
  3. Remove no longer needed file.

@flash1452
Copy link
Contributor

@nijel If no one is working on this issue I would like to take up this task.

@nijel
Copy link
Contributor Author

nijel commented Jan 18, 2017

Probably nobody is working on this, so feel free to look at it.

@flash1452
Copy link
Contributor

flash1452 commented Jan 18, 2017

@nijel So what I am assuming is that we need to shift the code from tbl_info.inc.php to Table class and develop new methods to set the global variables like - $showtable, $tbl_is_view, $tbl_storage_engine etc.
I need to know if I am getting this right.

@nijel
Copy link
Contributor Author

nijel commented Jan 20, 2017

I'm not sure if global variables are really needed, you should look at their usage and probably move (some of) the method calls there.

@flash1452
Copy link
Contributor

@nijel I have found two files that are including tbl_info.inc.php. First one is in $tbl_operations.php and second one is in TableChartController. TableChartController doesn't seem to use any of the variables that are set in tbl_info.inc.php. On the other hand tbl_operations.php uses $tbl_is_view, $auto_increment, $show_comment etc.
So why was it included in TableChartController in the first place??? Or am I missing somethings.

@nijel
Copy link
Contributor Author

nijel commented Jan 23, 2017

Maybe some of it's methods access it as globals? Or it can be also used in the templates, so rather look for the variables themselves.

@nijel nijel closed this as completed in 5da44ce Mar 20, 2017
@nijel nijel self-assigned this Mar 20, 2017
@nijel nijel added this to the 4.8.0 milestone Mar 20, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants