22 ini_set(
'display_errors', 1);
24 define(
'UPGRADING',
'upgrading');
25 require_once(dirname(__FILE__) .
"/engine/start.php");
42 if (
$result[
'failure'] ==
true) {
48 if (!class_exists(
'ElggRewriteTester')) {
49 require dirname(__FILE__) .
'/install/ElggRewriteTester.php';
51 $rewriteTester = new \ElggRewriteTester();
53 if (!$rewriteTester->runRewriteTest(
$url)) {
56 if (!$rewriteTester->runLocalhostAccessTest()) {
58 $msg =
elgg_echo(
"installation:htaccess:localhost:connectionfailed");
59 if ($msg ===
"installation:htaccess:localhost:connectionfailed") {
60 $msg =
"Elgg cannot connect to itself to test rewrite rules properly. Check "
61 .
"that curl is working and there are no IP restrictions preventing "
62 .
"localhost connections.";
69 $msg =
elgg_echo(
"installation:htaccess:needs_upgrade");
70 if ($msg ===
"installation:htaccess:needs_upgrade") {
71 $msg =
"You must update your .htaccess file so that the path is injected "
72 .
"into the GET parameter __elgg_uri (you can use install/config/htaccess.dist as a guide).";
82 $welcome = dirname(__FILE__) .
'/views/default/welcome.php';
$content
Set robots.txt action.
elgg_reset_system_cache()
Reset the system cache by deleting the caches.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
register_error($error)
Display an error on next page load.
forward($location="", $reason='system')
Forward to $location.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
$upgrader
Unlocks the upgrade script.
if(file_exists($welcome)) $vars
if(! $rewriteTester->runRewriteTest($url)) $welcome
elgg_view_page($title, $body, $page_shell='default', $vars=array())
Assembles and outputs a full page.
elgg_set_viewtype($viewtype="")
Manually set the viewtype.