Elgg  Version 3.0
upgrade.php
Go to the documentation of this file.
1 <?php
6 $guid = (int) get_input('guid');
7 
9 
10 if (!$upgrade instanceof \ElggUpgrade) {
11  $msg = elgg_echo('admin:upgrades:error:invalid_upgrade', [$guid]);
12  throw new \Elgg\EntityNotFoundException($msg);
13 }
14 
15 $result = _elgg_services()->upgrades->executeUpgrade($upgrade);
16 
17 return elgg_ok_response($result->toArray());
if(!$upgrade instanceof\ElggUpgrade) $result
Definition: upgrade.php:15
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$upgrade
Definition: upgrade.php:8
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_ok_response($content= '', $message= '', $forward_url=null, $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292
$guid
Runs batch upgrades.
Definition: upgrade.php:6
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:87