content.php 1006 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Admin control panel widget
  4. */
  5. elgg_register_menu_item('admin_control_panel', array(
  6. 'name' => 'flush',
  7. 'text' => elgg_echo('admin:cache:flush'),
  8. 'href' => 'action/admin/site/flush_cache',
  9. 'is_action' => true,
  10. 'link_class' => 'elgg-button elgg-button-action',
  11. ));
  12. $upgrader = new Elgg\UpgradeService();
  13. $is_locked = $upgrader->isUpgradeLocked();
  14. if (!$is_locked) {
  15. elgg_register_menu_item('admin_control_panel', array(
  16. 'name' => 'upgrade',
  17. 'text' => elgg_echo('upgrade'),
  18. 'href' => 'upgrade.php',
  19. 'link_class' => 'elgg-button elgg-button-action',
  20. ));
  21. } else {
  22. elgg_register_menu_item('admin_control_panel', array(
  23. 'name' => 'unlock_upgrade',
  24. 'text' => elgg_echo('upgrade:unlock'),
  25. 'href' => 'action/admin/site/unlock_upgrade',
  26. 'is_action' => true,
  27. 'link_class' => 'elgg-button elgg-button-action',
  28. 'confirm' => elgg_echo('upgrade:unlock:confirm'),
  29. ));
  30. }
  31. echo elgg_view_menu('admin_control_panel', array(
  32. 'class' => 'elgg-menu-hz',
  33. 'item_class' => 'mrm',
  34. ));