This is an old revision of the document!


Changes to functions and methods

With this page we want to help plugin developers to stay compatible with the changes that were made in the Admidio core and that could affect plugins. During the developement of Admidio we try to not change our existing methods and functions but sometimes it's neccessary and could break your working plugin. Here you will find a list of methods and functions that we changed in a specific Admidio version with a notice how you could fix this in your plugin if you have used that method or function.

Within Admidio 3.1 we changed the database class. This was neccessary because PHP7 knocks at the door and in this PHP version our used database functions were no longer supported. So we have rewritten the whole class and now use the PHP class PDO for database access. This is a powerful class that will also allow us to integrate some more database engines in the future much easier. Admidio has a new well documented implementation of the his Database class. The Admidio database object $gDb is still available now with the new class. We also try to implement some compatibility methods for often used methods so there should be not much problems for existing code.

Some methods must be removed because they are no longer necessary or there is another (better) way to find a solution. Please check if you use some of them and find a way to replace them with the new methods.

  • $gDb→data_seek()
  • $gDb→fetch_assoc() - can be implemented with PdoStatement object
  • $gDb→field_name()
  • $gDb→free_result() - can be removed without new implementation
  • $gDb→num_fields()
  • $gDb→select_db() - can be removed without new implementation
  • $gDb→server_info()
  • $gDb→setCurrentDB() - can be removed without new implementation

Some methods are marked as deprecated. You can still use them but should switch to the new methods if there is time. Within our class documentation you will find hints how to implement the new methods:

  • $gDb→fetch_array()
  • $gDb→fetch_object()
  • $gDb→num_rows()
  • $gDb→insert_id()
  • en/entwickler/changes_to_functions_and_methods.1446148599.txt.gz
  • Last modified: 2015/10/29 20:56
  • by fasse