Elgg  Version master
UpgradeGatekeeper.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Router\Middleware;
4 
7 
12 
21  public function __invoke(\Elgg\Request $request) {
22 
24  return null;
25  }
26 
27  if (!_elgg_services()->config->security_protect_upgrade) {
28  return null;
29  }
30 
31  $url = $request->getURL();
32  if (!_elgg_services()->urlSigner->isValid($url)) {
33  throw new UpgradeGatekeeperException();
34  }
35  }
36 }
Protect upgrade.php from unauthorized execution.
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:52
$request
Definition: livesearch.php:12
__invoke(\Elgg\Request $request)
Protect upgrade.php from unauthorized execution.
Thrown when the request to upgrade.php isn&#39;t valid.
Request container.
Definition: Request.php:12
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
Definition: deactivate.php:39
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351