Extension updates

How Cotonti updates extensions

Эта страница еще не переведена на украинский. Отображен оригинал страницы на английском языке. Вы можете зарегистрироваться и помочь с переводом.

You have probably read about updates in Cotonti and know how to update the system in general. This article describes extension updates in detail. The word 'extension' means both 'module' and 'plugin' as a more general term in Cotonti.

#1. When extensions are updated

There are 2 cases when extensions are updated:

  1. When you run install.php script to update your system as described here. In this case the update script checks versions of all installed extensions against versions of extension setup files on disk and updates only those, which have been updated on disk (have higher version numbers).
  2. When you click "Update" button in Administration → Extensions → Extension_name. In this case the system attempts to update the extension regardless of installed / available version numbers.

It is highly recommended to use "Update" feature instead of reinstalling extensions. Reinstalls were necessary in Cotonti 0.6.x, but there is no need to do them anymore. Update works a lot smarter.

#2. Update process for a particular extension

For each updated extension Cotonti applies the following procedure:

  1. Calculates difference between installed extension version in the database and available extension version in extension_name.setup.php on disk.
  2. Removes current hook handlers and installs them all again. This is necessary if there are new hook handler parts in the extension or some old parts have been removed or meta-information for some parts (e.g. used hooks) has changed.
  3. Updates configuration. It adds new options if there are any. It removes options which have been removed from the extension. It modifies and resets to default values those options for which option type has been changed. All the rest is left untouched.
  4. The same as step 3 is applied to structure configuration.
  5. Updates permission Auth/Lock masks for 'members' and 'guests' groups.
  6. Applies PHP and SQL patches from extension's 'setup' subfolder in the sequential order, based on the difference between installed and available version.
  7. Updates extension version in the database and clears cache.

Коментарі відсутні
Додавання комментарів доступно лише зареєстрованим користувачам