aboutsummaryrefslogtreecommitdiffstats
path: root/public/install/controller/startup/upgrade.php
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-08-18 21:14:58 -0500
committerJesús <heckyel@hyperbola.info>2019-08-18 21:14:58 -0500
commit2eed7b082f83630301e51f57ca8394de228a8605 (patch)
tree1d19962d22d30f99317d9276e4bae7744fc93fc2 /public/install/controller/startup/upgrade.php
downloadlibrecart-2eed7b082f83630301e51f57ca8394de228a8605.tar.lz
librecart-2eed7b082f83630301e51f57ca8394de228a8605.tar.xz
librecart-2eed7b082f83630301e51f57ca8394de228a8605.zip
first commit
Diffstat (limited to 'public/install/controller/startup/upgrade.php')
-rw-r--r--public/install/controller/startup/upgrade.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/public/install/controller/startup/upgrade.php b/public/install/controller/startup/upgrade.php
new file mode 100644
index 0000000..abc9ddd
--- /dev/null
+++ b/public/install/controller/startup/upgrade.php
@@ -0,0 +1,20 @@
+<?php
+class ControllerStartupUpgrade extends Controller {
+ public function index() {
+ $upgrade = false;
+
+ if (is_file(DIR_OPENCART . 'config.php') && filesize(DIR_OPENCART . 'config.php') > 0) {
+ $upgrade = true;
+ }
+
+ if (isset($this->request->get['route'])) {
+ if (($this->request->get['route'] == 'install/step_4') || (substr($this->request->get['route'], 0, 8) == 'upgrade/') || (substr($this->request->get['route'], 0, 10) == '3rd_party/')) {
+ $upgrade = false;
+ }
+ }
+
+ if ($upgrade) {
+ $this->response->redirect($this->url->link('upgrade/upgrade'));
+ }
+ }
+} \ No newline at end of file