diff options
| author | Nicofuma <github@nicofuma.fr> | 2014-04-14 06:56:04 +0200 |
|---|---|---|
| committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-28 22:15:47 +0200 |
| commit | e0b2ceef833dee55a1701216d4f0823375e8fa74 (patch) | |
| tree | f3db259b786638897e90a009db10009171ac8941 /phpBB/adm | |
| parent | 47b240660b688fab7a3dc57c46392506f1350daa (diff) | |
| download | forums-e0b2ceef833dee55a1701216d4f0823375e8fa74.tar forums-e0b2ceef833dee55a1701216d4f0823375e8fa74.tar.gz forums-e0b2ceef833dee55a1701216d4f0823375e8fa74.tar.bz2 forums-e0b2ceef833dee55a1701216d4f0823375e8fa74.tar.xz forums-e0b2ceef833dee55a1701216d4f0823375e8fa74.zip | |
[ticket/11366] Extension's version's check
Add a feature to check automatically the version of the installed
extensions. The informations are cached for 24 hours (like for the
global update check on the main page of the acp).
The informations about the versions are display both on the global list
and on the detailled page.
To do this the developper has to to let the composer.json of the latest
version available and add some informations into it :
"extra": {
"version-check": {
"host": "<the host>",
"directory": "<the directory containing the file>",
"filename": "<the composer.json of the latest version>"
}
}
He can also add two extra informations which will be displayed if a new
version is available :
"extra": {
"download": "<download link>",
"annoucement": "<announcement link>",
}
Currently a notice is displayed when the "extra.version-check"
informations are
missing.
Ticket: https://tracker.phpbb.com/browse/PHPBB3-11366
Signed-off-by: Nicofuma <github@nicofuma.fr>
PHPBB3-11366
Diffstat (limited to 'phpBB/adm')
| -rw-r--r-- | phpBB/adm/style/acp_ext_details.html | 35 | ||||
| -rw-r--r-- | phpBB/adm/style/acp_ext_list.html | 24 |
2 files changed, 54 insertions, 5 deletions
diff --git a/phpBB/adm/style/acp_ext_details.html b/phpBB/adm/style/acp_ext_details.html index 6aff4b29cc..435c36ccc6 100644 --- a/phpBB/adm/style/acp_ext_details.html +++ b/phpBB/adm/style/acp_ext_details.html @@ -6,6 +6,19 @@ <h1>{L_EXTENSIONS_ADMIN}</h1> + <!-- IF S_VERSIONCHECK_FAIL --> + <div class="errorbox notice"> + <p>{L_VERSIONCHECK_FAIL}</p> + <p>{VERSIONCHECK_FAIL_REASON}</p> + <p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p> + </div> + <!-- ENDIF --> + <!-- IF S_VERSIONCHECK --> + <div class="<!-- IF S_UP_TO_DATE -->successbox<!-- ELSE -->errorbox<!-- ENDIF -->"> + <p>{UP_TO_DATE_MSG} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p> + </div> + <!-- ENDIF --> + <fieldset> <legend>{L_EXT_DETAILS}</legend> <!-- IF META_DISPLAY_NAME --> @@ -46,6 +59,28 @@ </dl> </fieldset> + <!-- IF S_VERSIONCHECK && not S_UP_TO_DATE --> + <fieldset> + <legend>{L_LATEST_VERSION}</legend> + <dl> + <dt><label>{L_VERSION}{L_COLON}</label></dt> + <dd><span id="latest_version">{LATEST_VERSION}</span></dd> + </dl> + <!-- IF LATEST_DOWNLOAD --> + <dl> + <dt><label>{L_DOWNLOAD_LATEST}</label></dt> + <dd><strong id="latest_download"><a href="{LATEST_DOWNLOAD}">{L_DOWNLOAD} {META_NAME} {LATEST_VERSION}</a></strong></dd> + </dl> + <!-- ENDIF --> + <!-- IF LATEST_ANNOUNCEMENT --> + <dl> + <dt><label>{L_ANNOUNCEMENT_TOPIC}</label></dt> + <dd><strong id="latest_announcement"><a href="{LATEST_ANNOUNCEMENT}">{L_RELEASE_ANNOUNCEMENT}</a></strong></dd> + </dl> + <!-- ENDIF --> + </fieldset> + <!-- ENDIF --> + <!-- IF META_REQUIRE_PHPBB || META_REQUIRE_PHP --> <fieldset> <legend>{L_REQUIREMENTS}</legend> diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index 2fcc6eab31..d612a959e8 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -7,22 +7,30 @@ <p>{L_EXTENSIONS_EXPLAIN}</p> <table class="table1"> - <col class="row1" ><col class="row2" ><col class="row2" > + <col class="row1" ><col class="row1" ><col class="row1" ><col class="row2" ><col class="row2" > <thead> <tr> <th>{L_EXTENSION_NAME}</th> - <th>{L_EXTENSION_OPTIONS}</th> - <th>{L_EXTENSION_ACTIONS}</th> + <th width="10%">{L_CURRENT_VERSION}</th> + <th width="10%">{L_LATEST_VERSION}</th> + <th width="10%">{L_EXTENSION_OPTIONS}</th> + <th width="10%">{L_EXTENSION_ACTIONS}</th> </tr> </thead> <tbody> <!-- IF .enabled --> <tr> - <td class="row3" colspan="3"><strong>{L_EXTENSIONS_ENABLED}</strong></td> + <td class="row3" colspan="5"><strong>{L_EXTENSIONS_ENABLED}</strong></td> </tr> <!-- BEGIN enabled --> <tr class="ext_enabled"> <td><strong>{enabled.META_DISPLAY_NAME}</strong></td> + <td style="text-align: center;">{enabled.META_VERSION}</td> + <td style="text-align: center;"> + <!-- IF enabled.S_VERSIONCHECK --> + <strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.LATEST_VERSION}</strong> [ <a href="{enabled.U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ] + <!-- ENDIF --> + </td> <td style="text-align: center;"><a href="{enabled.U_DETAILS}">{L_DETAILS}</a></td> <td style="text-align: center;"> <!-- BEGIN actions --> @@ -36,11 +44,17 @@ <!-- IF .disabled --> <tr> - <td class="row3" colspan="3"><strong>{L_EXTENSIONS_DISABLED}</strong></td> + <td class="row3" colspan="5"><strong>{L_EXTENSIONS_DISABLED}</strong></td> </tr> <!-- BEGIN disabled --> <tr class="ext_disabled"> <td><strong>{disabled.META_DISPLAY_NAME}</strong></td> + <td style="text-align: center;">{disabled.META_VERSION}</td> + <td style="text-align: center;"> + <!-- IF disabled.S_VERSIONCHECK --> + <strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.LATEST_VERSION}</strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ] + <!-- ENDIF --> + </td> <td style="text-align: center;"> <!-- IF disabled.U_DETAILS --><a href="{disabled.U_DETAILS}">{L_DETAILS}</a><!-- ENDIF --> </td> |
