aboutsummaryrefslogtreecommitdiff
path: root/upgrade.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:27:18 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:27:18 +0000
commitc194b2ad8b99621c5bd7bf32f68d3c3d2399073c (patch)
tree04112f964396aebdb2369dc8cc4ebb523ee83063 /upgrade.php
parent210b27ec56ce6f5fffc14c89270865932638c779 (diff)
downloadelgg-c194b2ad8b99621c5bd7bf32f68d3c3d2399073c.tar.gz
elgg-c194b2ad8b99621c5bd7bf32f68d3c3d2399073c.tar.bz2
Fixes #3064. Checking for views/default/welcome.php and aborting upgrade if found. Need to add documention for how to replace views directory to wiki. Also fixed ajax loader during upgrade.
git-svn-id: http://code.elgg.org/elgg/trunk@8678 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'upgrade.php')
-rw-r--r--upgrade.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/upgrade.php b/upgrade.php
index b21b32dd9..c235c3f3e 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -24,7 +24,26 @@ if (get_input('upgrade') == 'upgrade') {
elgg_invalidate_simplecache();
elgg_filepath_cache_reset();
} else {
- echo elgg_view_page(elgg_echo('upgrade'), '', 'upgrade');
+ // if upgrading from < 1.8.0, check for the core view 'welcome' and bail if it's found.
+ // see http://trac.elgg.org/ticket/3064
+ // we're checking the exact view location because it's likely themes will have this view.
+ // we're only concerned with core.
+ $welcome = dirname(__FILE__) . '/views/default/welcome.php';
+ if (file_exists($welcome)) {
+ $content = elgg_view_module('info', elgg_echo('upgrade:unable_to_upgrade'),
+ elgg_echo('upgrade:unable_to_upgrade_info'));
+
+ $params = array(
+ 'content' => $content,
+ 'title' => elgg_echo('upgrade:abort'),
+ );
+
+ $body = elgg_view_layout('one_column', $params);
+ echo elgg_view_page(elgg_echo('upgrade'), $body);
+ exit;
+ }
+
+ echo elgg_view_page(elgg_echo('upgrading'), '', 'upgrade');
exit;
}