本文整理汇总了PHP中module::get_obsolete_modules_message方法的典型用法代码示例。如果您正苦于以下问题:PHP module::get_obsolete_modules_message方法的具体用法?PHP module::get_obsolete_modules_message怎么用?PHP module::get_obsolete_modules_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module
的用法示例。
在下文中一共展示了module::get_obsolete_modules_message方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$session = Session::instance();
// Make sure we have an upgrade token
if (!($upgrade_token = $session->get("upgrade_token", null))) {
$session->set("upgrade_token", $upgrade_token = random::hash());
}
// If the upgrade token exists, then bless this session
if (file_exists(TMPPATH . $upgrade_token)) {
$session->set("can_upgrade", true);
@unlink(TMPPATH . $upgrade_token);
}
$available_upgrades = 0;
foreach (module::available() as $module) {
if ($module->version && $module->version != $module->code_version) {
$available_upgrades++;
}
}
$failed = Input::instance()->get("failed");
$view = new View("upgrader.html");
$view->can_upgrade = identity::active_user()->admin || $session->get("can_upgrade");
$view->upgrade_token = $upgrade_token;
$view->available = module::available();
$view->failed = $failed ? explode(",", $failed) : array();
$view->done = $available_upgrades == 0;
$view->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}
示例2: index
public function index()
{
$view = new Admin_View("admin.html");
$view->page_title = t("Dashboard");
$view->content = new View("admin_dashboard.html");
$view->content->blocks = block_manager::get_html("dashboard_center");
$view->sidebar = "<div id=\"g-admin-dashboard-sidebar\">" . block_manager::get_html("dashboard_sidebar") . "</div>";
$view->content->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}
示例3: index
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");
$view->content->available = module::available();
$view->content->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}