mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Legacy avatars folder check to allow for moving of files during upgrade.
This commit is contained in:
@@ -155,6 +155,14 @@ class admin_start
|
|||||||
$mes->addWarning("The folder ".e_SYSTEM." is not writable. Please correct before proceeding.");
|
$mes->addWarning("The folder ".e_SYSTEM." is not writable. Please correct before proceeding.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$files = e107::getFile()->scandir(e_IMAGE."avatars",'jpg,gif,png,jpeg');
|
||||||
|
|
||||||
|
|
||||||
|
if(is_dir(e_IMAGE."avatars") && !is_writable(e_IMAGE."avatars") && !empty($files))
|
||||||
|
{
|
||||||
|
$mes->addWarning("Legacy avatars folder detected. Please make sure ".e_IMAGE."avatars/ is writable. Please correct before proceeding.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -165,7 +173,7 @@ class admin_start
|
|||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
if (is_dir(e_ADMIN.'htmlarea') || is_dir(e_HANDLER.'htmlarea'))
|
if (is_dir(e_ADMIN.'htmlarea') || is_dir(e_HANDLER.'htmlarea'))
|
||||||
{
|
{
|
||||||
$mes->addWarning($HANDLERS_DIRECTORY."htmlarea/<br />".$ADMIN_DIRECTORY."htmlarea/");
|
$mes->addWarning(e_HANDLER_ABS."htmlarea/<br />".e_ADMIN_ABS."htmlarea/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,6 +205,11 @@ class admin_start
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function checkDeprecated()
|
function checkDeprecated()
|
||||||
{
|
{
|
||||||
$deprecated = array(
|
$deprecated = array(
|
||||||
@@ -244,7 +257,7 @@ class admin_start
|
|||||||
$this->allowed_types = get_filetypes(); // Get allowed types according to filetypes.xml or filetypes.php
|
$this->allowed_types = get_filetypes(); // Get allowed types according to filetypes.xml or filetypes.php
|
||||||
if (count($this->allowed_types) == 0)
|
if (count($this->allowed_types) == 0)
|
||||||
{
|
{
|
||||||
$this->allowed_types = array('zip' => 1, 'gz' => 1, 'jpg' => 1, 'png' => 1, 'gif' => 1);
|
$this->allowed_types = array('zip' => 1, 'gz' => 1, 'jpg' => 1, 'png' => 1, 'gif' => 1, 'pdf'=>1);
|
||||||
$mes->addInfo("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types)));
|
$mes->addInfo("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user