mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Extra warnings/alerts added for possible upgrade issues.
This commit is contained in:
parent
ab26e0cb13
commit
59e97ba8dc
@ -56,6 +56,12 @@ if(isset($_E107['cli']) && !isset($_E107['debug']) && isset($_SERVER["HTTP_USER_
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(function_exists('utf8_encode') === false)
|
||||||
|
{
|
||||||
|
echo "e107 requires the PHP <a href='http://php.net/manual/en/book.xml.php'>XML parser</a> package. Please install it to use e107. ";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($_E107['cli']))
|
if(!isset($_E107['cli']))
|
||||||
{
|
{
|
||||||
while (@ob_end_clean()); // destroy all ouput buffering
|
while (@ob_end_clean()); // destroy all ouput buffering
|
||||||
|
@ -118,6 +118,7 @@ class admin_start
|
|||||||
$this->checkSuspiciousFiles();
|
$this->checkSuspiciousFiles();
|
||||||
$this->checkDeprecated();
|
$this->checkDeprecated();
|
||||||
$this->checkPasswordEncryption();
|
$this->checkPasswordEncryption();
|
||||||
|
$this->checkHtaccess();
|
||||||
|
|
||||||
if($this->refresh == true)
|
if($this->refresh == true)
|
||||||
{
|
{
|
||||||
@ -130,7 +131,7 @@ class admin_start
|
|||||||
{
|
{
|
||||||
$create_dir = array(e_MEDIA,e_SYSTEM,e_CACHE,e_CACHE_CONTENT,e_CACHE_IMAGE, e_CACHE_DB, e_LOG, e_BACKUP, e_CACHE_URL, e_TEMP, e_IMPORT);
|
$create_dir = array(e_MEDIA,e_SYSTEM,e_CACHE,e_CACHE_CONTENT,e_CACHE_IMAGE, e_CACHE_DB, e_LOG, e_BACKUP, e_CACHE_URL, e_TEMP, e_IMPORT);
|
||||||
|
|
||||||
$refresh = false;
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
foreach($create_dir as $dr)
|
foreach($create_dir as $dr)
|
||||||
{
|
{
|
||||||
@ -140,6 +141,10 @@ class admin_start
|
|||||||
{
|
{
|
||||||
$this->refresh = true;
|
$this->refresh = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mes->addWarning("Unable to create <b>".$dr."</b>. Please check your folder permissions.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,6 +247,11 @@ class admin_start
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function checkDependencies()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkDeprecated()
|
function checkDeprecated()
|
||||||
@ -287,6 +297,20 @@ class admin_start
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkHtaccess() // upgrade scenario
|
||||||
|
{
|
||||||
|
if(!file_exists(e_BASE.".htaccess") && file_exists(e_BASE."e107.htaccess"))
|
||||||
|
{
|
||||||
|
if(rename(e_BASE."e107.htaccess", e_BASE.".htaccess")===false)
|
||||||
|
{
|
||||||
|
e107::getMessage()->addWarning("Please rename your <b>e107.htaccess</b> file to <b>.htaccess</b>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function checkFileTypes()
|
function checkFileTypes()
|
||||||
{
|
{
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
@ -1301,7 +1301,10 @@ function update_706_to_800($type='')
|
|||||||
{
|
{
|
||||||
if(!is_dir(e_MEDIA.$md))
|
if(!is_dir(e_MEDIA.$md))
|
||||||
{
|
{
|
||||||
mkdir(e_MEDIA.$md);
|
if(mkdir(e_MEDIA.$md)===false)
|
||||||
|
{
|
||||||
|
e107::getMessage()->addWarning("Unable to create ".e_MEDIA.$md.".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1319,7 +1322,10 @@ function update_706_to_800($type='')
|
|||||||
{
|
{
|
||||||
$apath = (strstr($av['path'],'public/')) ? e_AVATAR_UPLOAD : e_AVATAR_DEFAULT;
|
$apath = (strstr($av['path'],'public/')) ? e_AVATAR_UPLOAD : e_AVATAR_DEFAULT;
|
||||||
|
|
||||||
@rename($av['path'].$av['fname'], $apath. $av['fname']);
|
if(rename($av['path'].$av['fname'], $apath. $av['fname'])===false)
|
||||||
|
{
|
||||||
|
e107::getMessage()->addWarning("Unable to more ".$av['path'].$av['fname']." to ".$apath. $av['fname'].". Please move manually.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user