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';
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 htaccess_dist as a guide).";
82 $welcome = dirname(__FILE__) .
'/views/default/welcome.php';
$upgrader
Unlocks the upgrade script.
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg parse_url
Parse a URL into its parts.
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
elgg_set_viewtype($viewtype="")
Manually set the viewtype.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg echo
Translates a string.
if(!$rewriteTester->runRewriteTest($url)) $welcome
elgg require
Throw an error if the required package isn't present.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg register_error
Wrapper function for system_messages.
$content
Set robots.txt action.
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
if(file_exists($welcome)) $vars