We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How should a custom module self-update when it doesn't have a control panel?

Development and Programming

Chuck Liddell's avatar
Chuck Liddell
57 posts
15 years ago
Chuck Liddell's avatar Chuck Liddell

Small issue I stumbled upon today.

When you have a custom module with an upd.module_name.php file, the file includes an update() function that is called to check if the module needs to be updated.

However, this function is only called when the control panel of the module is accessed. From the EE documentation:

This function is checked on any visit to the module’s control panel, and compares the current version number in the file to the recorded version in the database.

Modules can either have a control panel or not have a control panel depending on what you use for your ‘has_cp_backend’ flag (y/n).

If a module elects NOT to have a control panel (has_cp_backend = n), how can it tell EE that it is a new version and needs to update??

       
Greg Aker's avatar
Greg Aker
6,022 posts
15 years ago
Greg Aker's avatar Greg Aker

Hey Chuck:

a button has been placed on the top right of the main Modules page to run updates. We also automatically trigger updates when the EE updater is run. These both came about in the 2.1.1 build.

-greg

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.