Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:entwickler:changes_to_functions_and_methods [2016/12/25 15:30] – ximex | en:entwickler:changes_to_functions_and_methods [2022/04/15 20:11] (current) – fasse | ||
---|---|---|---|
Line 3: | Line 3: | ||
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 development of Admidio we try to not change our existing methods and functions but sometimes it's necessary 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. | 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 development of Admidio we try to not change our existing methods and functions but sometimes it's necessary 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. | ||
- | ===== Admidio version | + | ===== Admidio version |
- | === New database class === | + | |
- | Within Admidio 3.1 we changed the database class. This was necessary 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 [[https:// | + | |
- | 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. | + | === Changes/ |
- | * $gDb-> | + | == Class == |
- | | + | * **Menu** renamed to **MainMenu** |
- | * $gDb->field_name() | + | == Class methods == |
- | | + | * **HtmlPage->hasNavbar()** was removed |
- | * $gDb->num_fields() | + | * **Email->adminNotification()**: 'Email->sendNotification()' |
- | | + | * **Email->addBlindCopy()**: 'Email->addRecipient()' |
- | * $gDb->server_info() | + | |
- | | + | |
- | 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: | + | ===== Admidio version 4.1 ===== |
- | * $gDb-> | + | |
- | * $gDb-> | + | |
- | * $gDb-> | + | |
- | * $gDb-> | + | |
- | === New syntax in language files === | + | === Call Admidio scripts with the UUID for user or role === |
- | Within this version we use a new format for our translation files. Before it was an Admidio specific xml format. Now its the [[https://developer.android.com/guide/topics/resources/string-resource.html|Android String Resource]]. Version 3.1 will be still compatible to the old Admidio | + | To prevend CSRF attacks as described in [[https://github.com/Admidio/admidio/issues/612|Issue 612]] we have introduce |
+ | $user-> | ||
- | === Changes to DatetimeExtended class === | + | === Call Admidio scripts with the UUID for user or role === |
- | Since our requirements for PHP are changed to 5.3 we could use a lot of methods | + | The following |
- | There are only 4 methods left: | + | **Session:: |
- | | + | **Session:: |
- | | + | **Session:: |
- | * getWeekdays($weekday | + | New methods that could be used instead of them: |
- | * getDateFormatForDatepicker($format = ' | + | **Session:: |
- | If you have used other methods please change your script to use the official DateTime methods. | + | **Session:: |
- | === Other changes | + | |
- | The functions | + | ===== Admidio version 3.3 ===== |
+ | |||
+ | === Bootstrapping === | ||
+ | Simplified the bootstrapping (initialization of the common Admidio stuff). | ||
+ | Most stuff got extracted in separate | ||
+ | Autoload is in it's own **autoload.php**. | ||
+ | Now it could be enough to require only the **bootstrap.php** if you don't need a database connection. | ||
+ | |||
+ | === Prepared Statement === | ||
+ | To improve the security move from **Database-> | ||
+ | |||
+ | === New === | ||
+ | == Constants == | ||
+ | * **SCHEME**: ' | ||
+ | * **COOKIE_PREFIX**: | ||
+ | * **DB_ENGINE**: | ||
+ | * **DB_HOST**: | ||
+ | * **DB_PORT**: | ||
+ | * **DB_NAME**: | ||
+ | * **DB_USERNAME**: | ||
+ | * **DB_PASSWORD**: | ||
+ | == Classes == | ||
+ | * **PhpIniUtils**: | ||
+ | * **FileSystemUtils**: | ||
+ | * **SettingsManager**: | ||
+ | |||
+ | === Changes/ | ||
+ | == Classes == | ||
+ | * **Folder**: Use FileSystemUtils instead | ||
+ | * **MyFiles**: | ||
+ | == Class methods == | ||
+ | * **Email-> | ||
+ | * **Email:: | ||
+ | * **Language-> | ||
+ | * **Language-> | ||
+ | * **Language-> | ||
+ | * **Language-> | ||
+ | * **LanguageData-> | ||
+ | * **LanguageData-> | ||
+ | * **LanguageData-> | ||
+ | * **LanguageData-> | ||
+ | * **Message-> | ||
+ | * **Organization-> | ||
+ | * **Organization-> | ||
+ | * **PhpIniUtils-> | ||
+ | * **TableFile-> | ||
+ | * **TableFolder-> | ||
+ | * **TableRoles-> | ||
+ | * **User-> | ||
+ | == Class method params == | ||
+ | * **new AdmException(' | ||
+ | * **AdmException-> | ||
+ | * **Language-> | ||
+ | * **Language-> | ||
+ | * **Language-> | ||
+ | * **LanguageData-> | ||
+ | == Functions == | ||
+ | * **admFuncMaxUploadSize()**: | ||
+ | * **admFuncGetBytesFromSize()**: | ||
+ | * **admReadTemplateFile()**: | ||
===== Admidio version 3.2 ===== | ===== Admidio version 3.2 ===== | ||
Line 74: | Line 126: | ||
* **FOLDER_MODULES**: | * **FOLDER_MODULES**: | ||
* **FOLDER_PLUGINS**: | * **FOLDER_PLUGINS**: | ||
+ | |||
+ | |||
+ | ===== Admidio version 3.1 ===== | ||
+ | === New database class === | ||
+ | Within Admidio 3.1 we changed the database class. This was necessary 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 [[https:// | ||
+ | |||
+ | 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-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | |||
+ | 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-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | * $gDb-> | ||
+ | |||
+ | === New syntax in language files === | ||
+ | Within this version we use a new format for our translation files. Before it was an Admidio specific xml format. Now its the [[https:// | ||
+ | |||
+ | === Changes to DatetimeExtended class === | ||
+ | Since our requirements for PHP are changed to 5.3 we could use a lot of methods of the PHP class [[https:// | ||
+ | There are only 4 methods left: | ||
+ | * isValid() | ||
+ | * getAge() | ||
+ | * getWeekdays($weekday = 0) | ||
+ | * getDateFormatForDatepicker($format = ' | ||
+ | If you have used other methods please change your script to use the official DateTime methods. | ||
+ | |||
+ | === Other changes === | ||
+ | The functions **admFuncGetFilenameExtension** and **admFuncGetFilenameWithoutExtension** are marked as deprecated and will be removed in future versions. | ||
+ | |||
+ |