From 858390d182c8246897fb0511c47bfdeba63baddc Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 7 Dec 2016 18:23:57 -0800 Subject: [PATCH] Support message added for recent installs and upgrading from old installations. --- e107_admin/admin.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/e107_admin/admin.php b/e107_admin/admin.php index d2f33c6e3..14a508a14 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -138,7 +138,7 @@ class admin_start $this->deleteDeprecated(); } - + $this->checkNewInstall(); $this->checkPaths(); $this->checkTimezone(); $this->checkWritable(); @@ -197,6 +197,33 @@ class admin_start } + + private function checkNewInstall() + { + $pref = e107::getPref('install_date'); + + $v2ReleaseDate = strtotime('August 27, 2015'); + + // $pref = strtotime('yesterday'); + + $numDays = (abs($pref - time())/60/60/24); + + if($numDays < 3) // installed in the past 3 days. + { + echo e107::getMessage()->setTitle('Need Help?',E_MESSAGE_INFO)->addInfo("

Connect with our community for free support with any e107 issues you may encounter.

")->render(); + } + elseif($pref < $v2ReleaseDate) // installed prior to v2 release. + { + echo e107::getMessage()->setTitle('Upgrading?',E_MESSAGE_INFO)->addInfo("

Connect with our community for free support with any upgrading issues you may encounter.

")->render(); + } + + e107::getMessage()->setTitle(null,E_MESSAGE_INFO); + + + } + + + function checkWritable() { $mes = e107::getMessage();