Skip to content

Commit

Permalink
Use an absolute url for the upgrader link. Also, clear the upgrade_now
Browse files Browse the repository at this point in the history
site status message every time we go to Admin > Modules.
Fixes #1695.
  • Loading branch information
bharat committed Apr 23, 2011
1 parent 1da0551 commit c1df782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/gallery/controllers/admin_modules.php
Expand Up @@ -19,6 +19,9 @@
*/
class Admin_Modules_Controller extends Admin_Controller {
public function index() {
// If modules need upgrading, this will get recreated in module::available()
site_status::clear("upgrade_now");

$view = new Admin_View("admin.html");
$view->page_title = t("Modules");
$view->content = new View("admin_modules.html");
Expand Down Expand Up @@ -103,9 +106,6 @@ private function _do_save() {

module::event("module_change", $changes);

// If modules need upgrading, this will get recreated
site_status::clear("upgrade_now");

// @todo this type of collation is questionable from an i18n perspective
if ($activated_names) {
message::success(t("Activated: %names", array("names" => join(", ", $activated_names))));
Expand Down
2 changes: 1 addition & 1 deletion modules/gallery/helpers/module.php
Expand Up @@ -101,7 +101,7 @@ static function available() {
$m->locked = false;

if ($m->active && $m->version != $m->code_version) {
site_status::warning(t("Some of your modules are out of date. <a href=\"%upgrader_url\">Upgrade now!</a>", array("upgrader_url" => url::site("upgrader"))), "upgrade_now");
site_status::warning(t("Some of your modules are out of date. <a href=\"%upgrader_url\">Upgrade now!</a>", array("upgrader_url" => url::abs_site("upgrader"))), "upgrade_now");
}
}

Expand Down

0 comments on commit c1df782

Please sign in to comment.