Ticket #4740 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 2 years ago

make class to manage amp_conf settings (freepbx_settings)

Reported by: p_lindheimer Assigned to: mbrevda
Priority: minor Milestone: 2.9
Component: FreePBX Framework Version: 2.8-branch
Keywords: Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

This may be a duplicate ticket, couldn't find the original for the change form amportal.conf to using database.

Now that we have the foundations for this, we will move the amportal.conf functions into a class which can be used going forward for modules to add new amportal.conf settings. Given it's prevalence, $amp_conf will not go away any time soon but we can move towards using the class vs. the global which will have access to the same information.

Change History

01/12/11 22:20:38 changed by p_lindheimer

(In [10953]) initial changes for amportal.conf class setup (probably will want to rename config.functions.php to freepbx_settings.class.php) re #4740 - partially done but should still be operational

01/13/11 01:49:10 changed by mbrevda

We probably want to use something like of $freepbxconf? or $freepbx->conf() (vs $freepbx_conf), so that the $freepbx object can be extended to include a lot more than just settings. Also, considering that your passing by reference, you may want to go all out and make the object a setter as well.

01/13/11 10:00:24 changed by p_lindheimer

you input is pretty vague, you may want to clarify a bit.

As far as the pass by reference, it is simply to bridge the gap for now that almost everything uses $amp_conf which isn't going to change over night, though we will probably want to move at some point to using the class more properly for the settings. Making it reference will allow for any behavior that may be happening 'out there' where someone is setting it that we are not aware of, stay consistent as people do move to puling the information from the class.

01/14/11 14:17:17 changed by p_lindheimer

(In [10959]) mostly finished with config.functions.php re #4740

01/14/11 17:55:14 changed by p_lindheimer

(In [10961]) changes to schema and migration info re #4740, this migration method will probably change though bug for now...

01/14/11 19:30:58 changed by p_lindheimer

(In [10962]) don't use sql() as will probably want to use as part of install_amp, and a few fixes re #4740

01/15/11 03:30:27 changed by p_lindheimer

(In [10964]) validation on some optional settings when defining re #4740

01/15/11 03:39:07 changed by p_lindheimer

(In [10965]) partially done work to intialize freepbx_settings, will replace migration insert table, the plan is that we will be able to run this from framework modules or install_amp like ugrades, need to make sure we can run this class from install_amp though re #4740, this work is untested and should not currently do anything

01/15/11 10:40:02 changed by mbrevda

  • owner set to mbrevda.

Reassigning so that I remember to take a closer look

01/15/11 23:54:21 changed by p_lindheimer

(In [10969]) more prep for creating all settings and found a bunch more that were not accounted for re #4740, still have not tested it, will do so tomorrow

01/15/11 23:59:24 changed by p_lindheimer

(In [10970]) add freepbx_settings to various modules and misc minor tweaks re #4740

01/16/11 02:04:52 changed by p_lindheimer

(In [10972]) change from config.functions.php to freepbx_conf.class.php re #4740

01/16/11 13:36:43 changed by p_lindheimer

(In [10975]) convert falses from conf file and provide optional to not commit re #4740

01/16/11 15:56:59 changed by p_lindheimer

(In [10977]) couple errors re #4740

01/16/11 16:26:01 changed by p_lindheimer

(In [10979]) get freepbx_conf re #4740

01/16/11 16:37:01 changed by p_lindheimer

(In [10980]) adds freepbx_settings to newinstall sql schema re #4740

01/16/11 16:40:01 changed by p_lindheimer

(In [10981]) install_amp needs access to die_freepbx, and enable freepbx_settings_init re #4740

01/16/11 16:41:23 changed by p_lindheimer

(In [10982]) fix duplicate setting and add AMPWEBADDRESS re #4740

01/16/11 16:55:49 changed by p_lindheimer

(In [10984]) key should be $key re #4740

01/16/11 16:56:47 changed by p_lindheimer

(In [10985]) initializ freepbx_conf re #4740

01/16/11 17:44:02 changed by p_lindheimer

(In [10986]) typo and make sure not only exist but is a proper object as some situations during testing resulted in this subsequently becoming cleared but still existing re #4740

01/16/11 22:30:47 changed by p_lindheimer

(In [10993]) adds get_conf_settings method re #4740

01/16/11 22:35:29 changed by p_lindheimer

(In [10994]) more changes to use class methods and other tweaks and notes re #4740

01/16/11 22:51:02 changed by p_lindheimer

(In [10995]) oops get_conf_settings properly this time re #4740

01/17/11 18:45:42 changed by p_lindheimer

(In [11003]) make category madatory even for modules, makes things more clear re #4740

01/18/11 15:53:26 changed by p_lindheimer

(In [11010]) get rid of UINT, adds validation and method to check results of last update re #4740, this checking may momentarily break stuff as it has not been tested with setting values, about to do that so fixes to come shortly

01/18/11 16:35:41 changed by p_lindheimer

(In [11012]) adds range and emptyok info to tooltip re #4740

01/19/11 01:27:44 changed by p_lindheimer

(In [11014]) changes ajax to json, sends back result array used in messaging, resets value if changed to something else, added a couple methods to freepbx_conf array re #4740

01/19/11 20:16:05 changed by p_lindheimer

(In [11026]) add name field and use more friendly names re #4740

01/19/11 20:55:10 changed by p_lindheimer

(In [11028]) adds freepbx_settings to i18n module utility re #4740, non-modules settings are generated for framework module

01/19/11 21:56:00 changed by p_lindheimer

(In [11031]) adds reset_all_conf_settings method so we can add a cli ability somewhere to restore a damaged system, re #4740, good call Tony

01/20/11 12:35:53 changed by p_lindheimer

(In [11035]) make sure INT value is numeric or blank and set to blank if not re #4740

01/21/11 17:52:16 changed by p_lindheimer

(In [11058]) moves generation of amportal.conf to retrieve_conf and adds method in freepbx_conf to generate re #4740

01/22/11 00:32:47 changed by p_lindheimer

(In [11061]) this should be 100% documentation and re-organization, no code changes re #4740

01/22/11 15:17:20 changed by p_lindheimer

(In [11071]) closes #4758 as well as updates mulitple modules to use this (and a tweak to one view) re #4740

01/22/11 21:09:06 changed by p_lindheimer

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

affectively complete, new issues or request changes should have new tickets opened against them.

01/25/11 13:33:59 changed by p_lindheimer

(In [11110]) use existing attributes on define_conf_setting if setting exists and attributes not sepcified re #4740

01/25/11 13:37:11 changed by p_lindheimer

(In [11111]) missed a few default settings re #4740

01/26/11 00:12:04 changed by p_lindheimer

(In [11128]) add ability to override non-hidden readonly values, and set a bunch of volatile values to readonly re #4740